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
parent 7dd3a2ec9e
commit 199f9bd194

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;
}