summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
594e633)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@337
7f0cb862-5218-0410-a997-
914c9d46530a
* Have an orthogonal projection matrix set
*/
glOrtho( 0, glutGet( GLUT_WINDOW_WIDTH ),
* Have an orthogonal projection matrix set
*/
glOrtho( 0, glutGet( GLUT_WINDOW_WIDTH ),
- 0, glutGet( GLUT_WINDOW_HEIGHT ),
- -1, +1
+ 0, glutGet( GLUT_WINDOW_HEIGHT ),
+ -1, +1
for( p=pszText, lines=0; *p; p++ )
{
for( p=pszText, lines=0; *p; p++ )
{
- if( *p == '\n' )
- {
- lines++;
- glRasterPos2i( nX, nY-(lines*18) );
- }
-
- glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p );
+ if( *p == '\n' )
+ {
+ lines++;
+ glRasterPos2i( nX, nY-(lines*18) );
+ }
+
+ glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p );
* And then drawn...
*/
glColor3f( 1, 1, 0 );
* And then drawn...
*/
glColor3f( 1, 1, 0 );
- //glutWireCube( 20.0 );
- glutWireTeapot( 20.0 );
+ //glutWireCube( 20.0 );
+ glutWireTeapot( 20.0 );
//glutWireSpher( 15.0, 15, 15 );
//glColor3f( 0, 1, 0 );
//glutWireCube( 30.0 );
//glutWireSpher( 15.0, 15, 15 );
//glColor3f( 0, 1, 0 );
//glutWireCube( 30.0 );
/*
* Don't forget about the model-view matrix
*/
/*
* Don't forget about the model-view matrix
*/
/*
* Draw a silly text
*/
if( g_InGameMode == 0 )
/*
* Draw a silly text
*/
if( g_InGameMode == 0 )
- PrintText( 20, 20, "Hello there cruel world!" );
+ PrintText( 20, 20, "Hello there cruel world!" );
- PrintText( 20, 20, "Press ESC to leave the game mode!" );
+ PrintText( 20, 20, "Press ESC to leave the game mode!" );
/*
* And swap this context's buffers
*/
/*
* And swap this context's buffers
*/
if( g_LeaveGameMode == 1 )
{
if( g_LeaveGameMode == 1 )
{
* Move back the camera a bit
*/
glMatrixMode( GL_MODELVIEW );
* Move back the camera a bit
*/
glMatrixMode( GL_MODELVIEW );
glTranslatef( 0.0, 0.0, -40.0f );
/*
glTranslatef( 0.0, 0.0, -40.0f );
/*
*/
void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
{
*/
void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
{
- printf( "SampleKeyboard(): keypress '%c' at (%i,%i)\n", cChar, nMouseX, nMouseY );
+ printf( "SampleKeyboard(): keypress '%c' at (%i,%i)\n",
+ cChar, nMouseX, nMouseY );
void SampleGameModeKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
{
if( cChar == 27 )
void SampleGameModeKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
{
if( cChar == 27 )
*/
void SampleSpecial( int nSpecial, int nMouseX, int nMouseY )
{
*/
void SampleSpecial( int nSpecial, int nMouseX, int nMouseY )
{
- printf( "SampleSpecial(): special keypress %i at (%i,%i)\n", nSpecial, nMouseX, nMouseY );
+ printf( "SampleSpecial(): special keypress %i at (%i,%i)\n",
+ nSpecial, nMouseX, nMouseY );
glutAttachMenu( GLUT_LEFT_BUTTON );
printf( "current window is %ix%i+%i+%i",
glutAttachMenu( GLUT_LEFT_BUTTON );
printf( "current window is %ix%i+%i+%i",
- glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ),
- glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT )
+ glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ),
+ glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT )
/*
* This is never reached in FreeGLUT. Is that good?
*/
/*
* This is never reached in FreeGLUT. Is that good?
*/
- return( EXIT_SUCCESS );