mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 12:55:53 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue