diff options
author | Matthew Waters <matthew@centricular.com> | 2014-12-10 12:48:33 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2014-12-11 19:41:23 +1100 |
commit | 996f19354722826b06f78416fa9ff82970b3516e (patch) | |
tree | a58bc68401b8bec9cf477b54259c5b2ee6685966 | |
parent | a344b99c987a393b7ee460cd6c4e7060bbe0f25c (diff) | |
download | gstreamer-plugins-bad-996f19354722826b06f78416fa9ff82970b3516e.tar.gz |
gl/examples: fixup sdl example for gluPerspective removal
-rw-r--r-- | tests/examples/gl/sdl/sdlshare.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/examples/gl/sdl/sdlshare.c b/tests/examples/gl/sdl/sdlshare.c index adfcc6ad6..6f105e69d 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); |