From 996f19354722826b06f78416fa9ff82970b3516e Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 10 Dec 2014 12:48:33 +1100 Subject: [PATCH] gl/examples: fixup sdl example for gluPerspective removal --- tests/examples/gl/sdl/sdlshare.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/examples/gl/sdl/sdlshare.c b/tests/examples/gl/sdl/sdlshare.c index adfcc6a..6f105e6 100644 --- a/tests/examples/gl/sdl/sdlshare.c +++ b/tests/examples/gl/sdl/sdlshare.c @@ -84,17 +84,17 @@ DrawGLScene (GstBuffer * buf) glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer glLoadIdentity (); // Reset The View - glTranslatef (-1.5f, 0.0f, -6.0f); // Move Left 1.5 Units And Into The Screen 6.0 + glTranslatef (-0.4f, 0.0f, 0.0f); // Move Left 1.5 Units And Into The Screen 6.0 glRotatef (rtri, 0.0f, 1.0f, 0.0f); // Rotate The Triangle On The Y axis // draw a triangle (in smooth coloring mode) glBegin (GL_POLYGON); // start drawing a polygon glColor3f (1.0f, 0.0f, 0.0f); // Set The Color To Red - glVertex3f (0.0f, 1.0f, 0.0f); // Top + glVertex3f (0.0f, 0.4f, 0.0f); // Top glColor3f (0.0f, 1.0f, 0.0f); // Set The Color To Green - glVertex3f (1.0f, -1.0f, 0.0f); // Bottom Right + glVertex3f (0.4f, -0.4f, 0.0f); // Bottom Right glColor3f (0.0f, 0.0f, 1.0f); // Set The Color To Blue - glVertex3f (-1.0f, -1.0f, 0.0f); // Bottom Left + glVertex3f (-0.4f, -0.4f, 0.0f); // Bottom Left glEnd (); // we're done with the polygon (smooth color interpolation) glEnable (GL_TEXTURE_2D); @@ -106,20 +106,20 @@ DrawGLScene (GstBuffer * buf) glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glLoadIdentity (); // make sure we're no longer rotated. - glTranslatef (1.5f, 0.0f, -6.0f); // Move Right 3 Units, and back into the screen 6.0 + glTranslatef (0.5f, 0.0f, 0.0f); // Move Right 3 Units, and back into the screen 6.0 glRotatef (rquad, 1.0f, 0.0f, 0.0f); // Rotate The Quad On The X axis // draw a square (quadrilateral) - glColor3f (0.5f, 0.5f, 1.0f); // set color to a blue shade. + glColor3f (0.4f, 0.4f, 1.0f); // set color to a blue shade. glBegin (GL_QUADS); // start drawing a polygon (4 sided) glTexCoord3f (0.0f, 1.0f, 0.0f); - glVertex3f (-1.0f, 1.0f, 0.0f); // Top Left + glVertex3f (-0.4f, 0.4f, 0.0f); // Top Left glTexCoord3f (1.0f, 1.0f, 0.0f); - glVertex3f (1.0f, 1.0f, 0.0f); // Top Right + glVertex3f (0.4f, 0.4f, 0.0f); // Top Right glTexCoord3f (1.0f, 0.0f, 0.0f); - glVertex3f (1.0f, -1.0f, 0.0f); // Bottom Right + glVertex3f (0.4f, -0.4f, 0.0f); // Bottom Right glTexCoord3f (0.0f, 0.0f, 0.0f); - glVertex3f (-1.0f, -1.0f, 0.0f); // Bottom Left + glVertex3f (-0.4f, -0.4f, 0.0f); // Bottom Left glEnd (); // done with the polygon glBindTexture (GL_TEXTURE_2D, 0); -- 2.7.4