OpenGL: Difference between revisions
Content deleted Content added
m →{{header|Phix}}: added syntax colouring the hard way |
No edit summary |
||
Line 2,326:
glutMainLoop()</lang>
=={{header|QB64}}==
<lang QB64>
'Task
'Display a smooth shaded triangle with OpenGL.
Screen _NewImage(600, 600, 32)
Dim Shared glInit As Integer
glInput = 0
Do While InKey$ = "": Loop
End
Sub _GL ()
If glInit = 0 Then
_glViewport 1, 1, 600, 600
_glClearColor 0, 0, 0, 1
glInit = -1
End If
_glClear _GL_COLOR_BUFFER_BIT
_glBegin _GL_TRIANGLES
_glColor4f 1, 0, 0, 1
_glVertex2f -1, -1
_glColor4f 0, 1, 0, 1
_glVertex2f 0, 0
_glColor4f 0, 0, 1, 1
_glVertex2f 1, -1
_glEnd
End Sub
</lang>
=={{header|R}}==
{{libheader|rgl}}
|