test/testdyngl.c
changeset 842 0eec9985767d
parent 839 7b255f0290da
child 847 0afe0e38e02c
     1.1 --- a/test/testdyngl.c	Tue Feb 17 22:00:33 2004 +0000
     1.2 +++ b/test/testdyngl.c	Tue Feb 17 22:04:44 2004 +0000
     1.3 @@ -89,15 +89,17 @@
     1.4  	SDL_Event event;
     1.5  	int done=0;
     1.6  	GLfloat pixels[NB_PIXELS*3];
     1.7 -	char default_gl_lib[]="/usr/lib/libGL.so";
     1.8 -	char* current_gl_lib=default_gl_lib;
     1.9 +#ifdef _WIN32
    1.10 +	char *gl_library = "OpenGL32.DLL";
    1.11 +#else
    1.12 +	char *gl_library = "libGL.so.1";
    1.13 +#endif
    1.14  	
    1.15 -	if (argc==2)
    1.16 -	{
    1.17 -		current_gl_lib=argv[1];
    1.18 +	if (argv[1]) {
    1.19 +		gl_library = argv[1];
    1.20  	}
    1.21  	
    1.22 -	if (SDL_Init(SDL_INIT_EVERYTHING)<0)
    1.23 +	if (SDL_Init(SDL_INIT_VIDEO)<0)
    1.24  	{
    1.25  		printf("Unable to init SDL : %s\n",SDL_GetError());
    1.26  		exit(1);
    1.27 @@ -109,7 +111,7 @@
    1.28  		exit(1);
    1.29  	}
    1.30  	
    1.31 -	if (SDL_GL_LoadLibrary(current_gl_lib)<0)
    1.32 +	if (SDL_GL_LoadLibrary(gl_library)<0)
    1.33  	{
    1.34  		printf("Unable to dynamically open GL lib : %s\n",SDL_GetError());
    1.35  		exit(1);