Content deleted Content added
m Removing from Category:Java platform - remove diffusing parent category; already in subcategory - using Cat-a-lot |
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
||
Line 16:
==Example==
This example shows how to draw a polygon (without initialization or repaint code).<ref>Borrowed from the [http://nehe.gamedev.net/lesson.asp?index=01 Nehe tutorial], whose code is free to use elsewhere.</ref> Here is the reference [[C (programming language)|C]] implementation:
<
int DrawGLScene(GLvoid) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Line 36:
return TRUE;
}
</syntaxhighlight>
Which translates to the following [[Java (programming language)|Java]] implementation:
<
public void display(GLAutoDrawable glDrawable) {
final GL gl = glDrawable.getGL();
Line 59:
gl.glFlush();
}
</syntaxhighlight>
== Implementations ==
|