summaryrefslogtreecommitdiff
path: root/progs/tests
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-10-14 07:43:18 -0600
committerVinson Lee <vlee@vmware.com>2009-12-03 15:05:44 -0800
commit3910e88ebf636cb34ae75bc4a7916fc8c2f1a9e1 (patch)
tree489813c79c5c35b806443b42478bba0030533525 /progs/tests
parent2b5618fc5bdcbee3434f8b5aa3a31eb06fb479c0 (diff)
prog/tests: Fix MSVC build.
(cherry picked from commit ea862ec8ff4a52b30b822e737d93a49330be9e31)
Diffstat (limited to 'progs/tests')
-rw-r--r--progs/tests/arraytexture.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/progs/tests/arraytexture.c b/progs/tests/arraytexture.c
index 6c0484df0d..28252a354b 100644
--- a/progs/tests/arraytexture.c
+++ b/progs/tests/arraytexture.c
@@ -77,10 +77,6 @@ static GLfloat texZ = 0.0;
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)
@@ -125,13 +121,13 @@ static void Display(void)
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();
@@ -159,7 +155,7 @@ static void Display(void)
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();
@@ -226,8 +222,8 @@ compile_fragment_program(GLuint id, const char *prog)
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);
@@ -264,11 +260,6 @@ static void Init(void)
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 */ ;