/* * Test glTexSubImage mid-way through a frame. * * The same texture is used for both quads but it gets redefined * with glTexSubImage (or glTexImage) after the first quad. */ #include #include #include #include "GL/glew.h" #include "GL/glut.h" static GLuint Window = 0; static GLboolean Anim = GL_FALSE; static GLfloat Angle = 0.0f; static void first_texture(void) { static int width=8, height=8; static GLubyte tex1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; GLubyte tex[64][3]; GLint i, j; /* red on white */ for (i=0;i