gl/examples: fixup generic cube example for NDC
translating outside the clip region doesn't work
This commit is contained in:
parent
7dd3a2ec9e
commit
199f9bd194
@ -120,7 +120,7 @@ static gboolean drawCallback (GstElement * gl_sink, GstGLContext *context, GstSa
|
|||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
glTranslatef(0.0f,0.0f,-5.0f);
|
glScalef(0.5f,0.5f,0.5f);
|
||||||
|
|
||||||
glRotatef(xrot,1.0f,0.0f,0.0f);
|
glRotatef(xrot,1.0f,0.0f,0.0f);
|
||||||
glRotatef(yrot,0.0f,1.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;
|
yrot+=0.2f;
|
||||||
zrot+=0.4f;
|
zrot+=0.4f;
|
||||||
|
|
||||||
|
glDisable (GL_DEPTH_TEST);
|
||||||
|
glDisable (GL_TEXTURE_2D);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user