test/testshader.c
changeset 5236 c7be6ca3a0b8
parent 5232 74bc160186a8
child 5535 96594ac5fd1a
equal deleted inserted replaced
5235:1e28342cb15d 5236:c7be6ca3a0b8
   179     return (glGetError() == GL_NO_ERROR);
   179     return (glGetError() == GL_NO_ERROR);
   180 }
   180 }
   181 
   181 
   182 static void DestroyShaderProgram(ShaderData *data)
   182 static void DestroyShaderProgram(ShaderData *data)
   183 {
   183 {
   184     glDeleteObjectARB(data->vert_shader);
   184     if (shaders_supported) {
   185     glDeleteObjectARB(data->frag_shader);
   185         glDeleteObjectARB(data->vert_shader);
   186     glDeleteObjectARB(data->program);
   186         glDeleteObjectARB(data->frag_shader);
       
   187         glDeleteObjectARB(data->program);
       
   188     }
   187 }
   189 }
   188 
   190 
   189 static SDL_bool InitShaders()
   191 static SDL_bool InitShaders()
   190 {
   192 {
   191     int i;
   193     int i;
   479     printf("No OpenGL support on this system\n");
   481     printf("No OpenGL support on this system\n");
   480     return 1;
   482     return 1;
   481 }
   483 }
   482 
   484 
   483 #endif /* HAVE_OPENGL */
   485 #endif /* HAVE_OPENGL */
       
   486 
       
   487 /* vi: set ts=4 sw=4 expandtab: */