progs/tests: Add checks for GL_NV_vertex_program.
This commit is contained in:
@@ -145,6 +145,11 @@ myinit(int argc, char *argv[])
|
|||||||
|
|
||||||
printf("Using vertex program attribs? %s\n", program ? "yes" : "no");
|
printf("Using vertex program attribs? %s\n", program ? "yes" : "no");
|
||||||
|
|
||||||
|
if (program && !glutExtensionSupported("GL_NV_vertex_program")) {
|
||||||
|
printf("Sorry, this requires GL_NV_vertex_program\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (!program) {
|
if (!program) {
|
||||||
glMap2f(GL_MAP2_VERTEX_4,
|
glMap2f(GL_MAP2_VERTEX_4,
|
||||||
0.0, 1.0, 4, 4,
|
0.0, 1.0, 4, 4,
|
||||||
|
@@ -113,6 +113,11 @@ static void Init( void )
|
|||||||
|
|
||||||
GLuint progs[5];
|
GLuint progs[5];
|
||||||
|
|
||||||
|
if (!glutExtensionSupported("GL_NV_vertex_program")) {
|
||||||
|
printf("Sorry, this program requires GL_NV_vertex_program\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
glGenProgramsNV(2, progs);
|
glGenProgramsNV(2, progs);
|
||||||
assert(progs[0]);
|
assert(progs[0]);
|
||||||
assert(progs[1]);
|
assert(progs[1]);
|
||||||
|
@@ -144,6 +144,12 @@ int main( int argc, char *argv[] )
|
|||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
|
||||||
|
if (!glutExtensionSupported("GL_NV_vertex_program")) {
|
||||||
|
printf("Sorry, this program requires GL_NV_vertex_program\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
Test1();
|
Test1();
|
||||||
Test2();
|
Test2();
|
||||||
Test3();
|
Test3();
|
||||||
|
@@ -93,6 +93,11 @@ static void Init( void )
|
|||||||
#endif
|
#endif
|
||||||
"END\n";
|
"END\n";
|
||||||
|
|
||||||
|
if (!glutExtensionSupported("GL_NV_vertex_program")) {
|
||||||
|
printf("Sorry, this program requires GL_NV_vertex_program\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
|
glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
|
||||||
strlen(prog1),
|
strlen(prog1),
|
||||||
(const GLubyte *) prog1);
|
(const GLubyte *) prog1);
|
||||||
|
Reference in New Issue
Block a user