73
73
my $Inset_Height = 90;
74
74
my $Window_State ;
75
75
76
- # Texture dimanesions
77
- # my $Tex_File = 'test.jpg';
76
+ # Texture dimensions
78
77
my $Tex_File = ' test.tga' ;
79
78
my $Tex_Width = 128;
80
79
my $Tex_Height = 128;
@@ -325,7 +324,6 @@ sub ourInitVertexBuffers
325
324
($VertexObjID ,$NormalObjID ,$ColorObjID ,$TexCoordObjID ,$IndexObjID ) =
326
325
glGenBuffersARB_p(5);
327
326
328
- # glBindBufferARB(GL_ARRAY_BUFFER_ARB, $VertexObjID);
329
327
$verts -> bind ($VertexObjID );
330
328
glBufferDataARB_p(GL_ARRAY_BUFFER_ARB, $verts , GL_STATIC_DRAW_ARB);
331
329
glVertexPointer_c(3, GL_FLOAT, 0, 0);
@@ -346,24 +344,20 @@ sub ourInitVertexBuffers
346
344
print " glGetBufferSubDataARB_p: $ords \n " ;
347
345
}
348
346
349
- # glBindBufferARB(GL_ARRAY_BUFFER_ARB, $NormalObjID);
350
347
$norms -> bind ($NormalObjID );
351
348
glBufferDataARB_p(GL_ARRAY_BUFFER_ARB, $norms , GL_STATIC_DRAW_ARB);
352
349
glNormalPointer_c(GL_FLOAT, 0, 0);
353
350
354
- # glBindBufferARB(GL_ARRAY_BUFFER_ARB, $ColorObjID);
355
351
$colors -> bind ($ColorObjID );
356
352
glBufferDataARB_p(GL_ARRAY_BUFFER_ARB, $colors , GL_DYNAMIC_DRAW_ARB);
357
353
$rainbow -> assign(0,@rainbow );
358
354
glBufferSubDataARB_p(GL_ARRAY_BUFFER_ARB, $rainbow_offset , $rainbow );
359
355
glColorPointer_c(4, GL_FLOAT, 0, 0);
360
356
361
- # glBindBufferARB(GL_ARRAY_BUFFER_ARB, $TexCoordObjID);
362
357
$texcoords -> bind ($TexCoordObjID );
363
358
glBufferDataARB_p(GL_ARRAY_BUFFER_ARB, $texcoords , GL_STATIC_DRAW_ARB);
364
359
glTexCoordPointer_c(2, GL_FLOAT, 0, 0);
365
360
366
- # glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, $IndexObjID);
367
361
$indices -> bind ($IndexObjID );
368
362
glBufferDataARB_p(GL_ELEMENT_ARRAY_BUFFER_ARB, $indices , GL_STATIC_DRAW_ARB);
369
363
}
@@ -858,7 +852,7 @@ sub cbRenderScene
858
852
{
859
853
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
860
854
}
861
- # If we're blending, we don'$ t want z-buffering.
855
+ # If we're blending, we don't want z-buffering.
862
856
if ($Blend_On )
863
857
{
864
858
glDisable(GL_DEPTH_TEST);
@@ -955,7 +949,7 @@ sub cbRenderScene
955
949
glDisable(GL_TEXTURE_2D);
956
950
glDisable(GL_LIGHTING);
957
951
958
- # We don'$ t want depth-testing either.
952
+ # We don't want depth-testing either.
959
953
glDisable(GL_DEPTH_TEST);
960
954
961
955
# But, for fun, let's make the text partially transparent too.
@@ -987,7 +981,7 @@ sub cbRenderScene
987
981
$buf = sprintf " Inset: %d " , $Inset_On ;
988
982
glRasterPos2i(2,74); ourPrintString(GLUT_BITMAP_HELVETICA_12,$buf );
989
983
990
- # Now we want to render the calulated FPS at the top.
984
+ # Now we want to render the calculated FPS at the top.
991
985
# To ease, simply translate up. Note we're working in screen
992
986
# pixels in this projection.
993
987
glTranslatef(6.0,$Window_Height - 14,0.0);
@@ -1582,7 +1576,6 @@ sub quit {
1582
1576
1583
1577
if (!OpenGL::glpCheckExtension(' GL_ARB_vertex_buffer_object' ))
1584
1578
{
1585
- # $hasVBO = 1;
1586
1579
# Perl 5.10 crashes on VBOs!
1587
1580
$hasVBO = ($PERL_VERSION !~ m | ^5\. 10\. | );
1588
1581
}
0 commit comments