gl/examples: fixup generic cube example for NDC

translating outside the clip region doesn't work
This commit is contained in:
Matthew Waters 2015-03-14 18:10:24 +00:00 committed by Tim-Philipp Müller
parent 8ca59af389
commit a4287991ae

View file

@ -120,7 +120,7 @@ static gboolean drawCallback (GstElement * gl_sink, GstGLContext *context, GstSa
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-5.0f);
glScalef(0.5f,0.5f,0.5f);
glRotatef(xrot,1.0f,0.0f,0.0f);
glRotatef(yrot,0.0f,1.0f,0.0f);
@ -165,6 +165,9 @@ static gboolean drawCallback (GstElement * gl_sink, GstGLContext *context, GstSa
yrot+=0.2f;
zrot+=0.4f;
glDisable (GL_DEPTH_TEST);
glDisable (GL_TEXTURE_2D);
return TRUE;
}