Mesa (mesa_7_6_branch): prog/tests: Fix MSVC build.

Vinson Lee vlee at kemper.freedesktop.org
Thu Dec 3 15:07:19 PST 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 3910e88ebf636cb34ae75bc4a7916fc8c2f1a9e1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3910e88ebf636cb34ae75bc4a7916fc8c2f1a9e1

Author: Vinson Lee <vlee at vmware.com>
Date:   Wed Oct 14 07:43:18 2009 -0600

prog/tests: Fix MSVC build.
(cherry picked from commit ea862ec8ff4a52b30b822e737d93a49330be9e31)

---

 progs/tests/arraytexture.c |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/progs/tests/arraytexture.c b/progs/tests/arraytexture.c
index 6c0484d..28252a3 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 */ ;
 



More information about the mesa-commit mailing list