Author: tewk
Date: Mon Nov 10 21:54:02 2008
New Revision: 32512
Modified:
trunk/examples/opengl/shapes.pir
trunk/examples/opengl/static-triangle.pir
trunk/examples/opengl/triangle.pir
Log:
[opengl examples] change .Sub to 'Sub'
Modified: trunk/examples/opengl/shapes.pir
==============================================================================
--- trunk/examples/opengl/shapes.pir (original)
+++ trunk/examples/opengl/shapes.pir Mon Nov 10 21:54:02 2008
@@ -44,11 +44,11 @@
init_particle_effect()
# Set up GLUT callbacks
- .const .Sub draw = 'draw'
- .const .Sub idle = 'idle'
- .const .Sub reshape = 'reshape'
- .const .Sub keyboard = 'keyboard'
- .const .Sub visibility = 'visibility'
+ .const 'Sub' draw = 'draw'
+ .const 'Sub' idle = 'idle'
+ .const 'Sub' reshape = 'reshape'
+ .const 'Sub' keyboard = 'keyboard'
+ .const 'Sub' visibility = 'visibility'
glutDisplayFunc (draw)
glutIdleFunc (idle)
glutReshapeFunc (reshape)
@@ -80,7 +80,7 @@
.local pmc call_toolkit_init
call_toolkit_init = get_global ['NCI'], 'call_toolkit_init'
- .const .Sub glutInit = 'glutInit'
+ .const 'Sub' glutInit = 'glutInit'
$P0 = call_toolkit_init(glutInit, argv)
copy argv, $P0
@@ -751,7 +751,7 @@
# say state
if state == .GLUT_NOT_VISIBLE goto hidden
- .const .Sub idle = 'idle'
+ .const 'Sub' idle = 'idle'
glutIdleFunc(idle)
.return ()
Modified: trunk/examples/opengl/static-triangle.pir
==============================================================================
--- trunk/examples/opengl/static-triangle.pir (original)
+++ trunk/examples/opengl/static-triangle.pir Mon Nov 10 21:54:02 2008
@@ -38,7 +38,7 @@
.local pmc call_toolkit_init
call_toolkit_init = get_global ['NCI'], 'call_toolkit_init'
- .const .Sub glutInit = 'glutInit'
+ .const 'Sub' glutInit = 'glutInit'
argv = call_toolkit_init(glutInit, argv)
# Set display mode, create GLUT window, save window handle
@@ -52,7 +52,7 @@
set_global 'glut_window', window
# Set up GLUT callbacks
- .const .Sub draw = 'draw'
+ .const 'Sub' draw = 'draw'
glutDisplayFunc (draw)
# Enter the GLUT main loop
@@ -66,14 +66,14 @@
glBegin(.GL_TRIANGLES)
- glColor3f(1, 0, 0)
- glVertex3f(-.5, -.5, 0)
+ glColor3d(1,0,0)
+ glVertex3f(-1, -1, 0)
- glColor3f(0, 1, 0)
- glVertex3f( .5, -.5, 0)
+ glColor3d(0, 1, 0)
+ glVertex3f(1, -1, 0)
- glColor3f(0, 0, 1)
- glVertex3f(0 , .5, 0)
+ glColor3d(0, 0, 1)
+ glVertex3f(0, 1, 0)
glEnd()
Modified: trunk/examples/opengl/triangle.pir
==============================================================================
--- trunk/examples/opengl/triangle.pir (original)
+++ trunk/examples/opengl/triangle.pir Mon Nov 10 21:54:02 2008
@@ -41,7 +41,7 @@
.local pmc call_toolkit_init
call_toolkit_init = get_global ['NCI'], 'call_toolkit_init'
- .const .Sub glutInit = 'glutInit'
+ .const 'Sub' glutInit = 'glutInit'
argv = call_toolkit_init(glutInit, argv)
# Set display mode, create GLUT window, save window handle
@@ -55,9 +55,9 @@
set_global 'glut_window', window
# Set up GLUT callbacks
- .const .Sub draw = 'draw'
- .const .Sub idle = 'idle'
- .const .Sub keyboard = 'keyboard'
+ .const 'Sub' draw = 'draw'
+ .const 'Sub' idle = 'idle'
+ .const 'Sub' keyboard = 'keyboard'
glutDisplayFunc (draw)
glutIdleFunc (idle)
glutKeyboardFunc(keyboard)