static GLfloat texZ_dir = 0.01;
static GLint num_layers;
-static PFNGLBINDPROGRAMARBPROC bind_program;
-static PFNGLPROGRAMSTRINGARBPROC program_string;
-static PFNGLGENPROGRAMSARBPROC gen_programs;
-
static void
PrintString(const char *s)
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, 0);
+ glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
glColor3f(1,1,1);
glRasterPos3f(-0.9, -0.9, 0.0);
sprintf(str, "Texture Z coordinate = %4.1f", texZ);
PrintString(str);
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, 1);
+ glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 1);
GL_CHECK_ERROR();
glEnable(GL_TEXTURE_2D_ARRAY_EXT);
GL_CHECK_ERROR();
glDisable(GL_TEXTURE_2D_ARRAY_EXT);
GL_CHECK_ERROR();
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, 0);
+ glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
GL_CHECK_ERROR();
glutSwapBuffers();
int err;
err = glGetError();
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, id);
- (*program_string)(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
+ glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, id);
+ glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(prog), (const GLubyte *) prog);
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
require_extension("GL_MESA_texture_array");
require_extension("GL_SGIS_generate_mipmap");
- bind_program = glutGetProcAddress("glBindProgramARB");
- program_string = glutGetProcAddress("glProgramStringARB");
- gen_programs = glutGetProcAddress("glGenProgramsARB");
-
-
for (num_layers = 0; textures[num_layers] != NULL; num_layers++)
/* empty */ ;