19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/*
29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Small SDL example to demonstrate dynamically loading
39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * OpenGL lib and functions
49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *
59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * (FYI it was supposed to look like snow in the wind or something...)
69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *
79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Compile with :
89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * gcc testdyngl.c `sdl-config --libs --cflags` -o testdyngl -DHAVE_OPENGL
99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *
109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * You can specify a different OpenGL lib on the command line, i.e. :
119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * ./testdyngl  /usr/X11R6/lib/libGL.so.1.2
129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * or
139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * ./testdyngl  /usr/lib/libGL.so.1.0.4496
149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *
159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */
169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <stdio.h>
189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <stdlib.h>
199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL.h"
219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef __MACOS__
239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define HAVE_OPENGL
249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef HAVE_OPENGL
279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_opengl.h"
299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstatic void quit(int rc)
329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_Quit();
349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	exit(rc);
359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid* get_funcaddr(const char* p)
389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void* f=SDL_GL_GetProcAddress(p);
409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if (f)
419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		return f;
439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		printf("Unable to get function pointer for %s\n",p);
479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		quit(1);
489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	return NULL;
509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct
539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glBegin)(GLenum);
559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glEnd)();
569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glVertex3f)(GLfloat, GLfloat, GLfloat);
579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat);
589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glClear)(GLbitfield);
599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glDisable)(GLenum);
609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glEnable)(GLenum);
619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glColor4ub)(GLubyte,GLubyte,GLubyte,GLubyte);
629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glPointSize)(GLfloat);
639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glHint)(GLenum,GLenum);
649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glBlendFunc)(GLenum,GLenum);
659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glMatrixMode)(GLenum);
669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glLoadIdentity)();
679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glOrtho)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble);
689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glRotatef)(GLfloat,GLfloat,GLfloat,GLfloat);
699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glViewport)(GLint,GLint,GLsizei,GLsizei);
709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	void(APIENTRY*glFogf)(GLenum,GLfloat);
719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallglfuncs;
739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid init_glfuncs(glfuncs* f)
759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glBegin=get_funcaddr("glBegin");
779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glEnd=get_funcaddr("glEnd");
789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glVertex3f=get_funcaddr("glVertex3f");
799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glClearColor=get_funcaddr("glClearColor");
809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glClear=get_funcaddr("glClear");
819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glDisable=get_funcaddr("glDisable");
829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glEnable=get_funcaddr("glEnable");
839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glColor4ub=get_funcaddr("glColor4ub");
849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glPointSize=get_funcaddr("glPointSize");
859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glHint=get_funcaddr("glHint");
869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glBlendFunc=get_funcaddr("glBlendFunc");
879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glMatrixMode=get_funcaddr("glMatrixMode");
889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glLoadIdentity=get_funcaddr("glLoadIdentity");
899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glOrtho=get_funcaddr("glOrtho");
909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glRotatef=get_funcaddr("glRotatef");
919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glViewport=get_funcaddr("glViewport");
929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f->glFogf=get_funcaddr("glFogf");
939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NB_PIXELS 1000
969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallint main(int argc,char *argv[])
989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	glfuncs f;
1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int i;
1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_Event event;
1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int done=0;
1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	GLfloat pixels[NB_PIXELS*3];
1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	const char *gl_library = NULL; /* Use the default GL library */
1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if (argv[1]) {
1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		gl_library = argv[1];
1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if (SDL_Init(SDL_INIT_VIDEO)<0)
1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		printf("Unable to init SDL : %s\n",SDL_GetError());
1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		return(1);
1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if (SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,1)<0)
1179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
1189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		printf("Unable to set GL attribute : %s\n",SDL_GetError());
1199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		quit(1);
1209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
1219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if (SDL_GL_LoadLibrary(gl_library)<0)
1239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
1249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		printf("Unable to dynamically open GL lib : %s\n",SDL_GetError());
1259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		quit(1);
1269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
1279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if (SDL_SetVideoMode(640,480,0,SDL_OPENGL)==NULL)
1299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
1309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		printf("Unable to open video mode : %s\n",SDL_GetError());
1319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		quit(1);
1329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
1339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	/* Set the window manager title bar */
1359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_WM_SetCaption( "SDL Dynamic OpenGL Loading Test", "testdyngl" );
1369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	init_glfuncs(&f);
1389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	for(i=0;i<NB_PIXELS;i++)
1409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
1419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		pixels[3*i]=rand()%250-125;
1429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		pixels[3*i+1]=rand()%250-125;
1439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		pixels[3*i+2]=rand()%250-125;
1449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
1459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glViewport(0,0,640,480);
1479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glMatrixMode(GL_PROJECTION);
1499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glLoadIdentity();
1509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glOrtho(-100,100,-100,100,-500,500);
1519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glMatrixMode(GL_MODELVIEW);
1539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glLoadIdentity();
1549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glEnable(GL_DEPTH_TEST);
1569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glDisable(GL_TEXTURE_2D);
1579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glEnable(GL_BLEND);
1589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glClearColor(0.0f,0.0f,0.0f,0.0f);
1619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
1629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glEnable(GL_POINT_SMOOTH);
1649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glHint(GL_POINT_SMOOTH_HINT,GL_NICEST);
1659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glPointSize(5.0f);
1669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glEnable(GL_FOG);
1679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glFogf(GL_FOG_START,-500);
1689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glFogf(GL_FOG_END,500);
1699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	f.glFogf(GL_FOG_DENSITY,0.005);
1709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	do
1729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	{
1739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		f.glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
1749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		f.glRotatef(2.0,1.0,1.0,1.0);
1769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		f.glRotatef(1.0,0.0,1.0,1.0);
1779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		f.glColor4ub(255,255,255,255);
1799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		f.glBegin(GL_POINTS);
1809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		for(i=0;i<NB_PIXELS;i++)
1819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		{
1829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall			f.glVertex3f(pixels[3*i],pixels[3*i+1],pixels[3*i+2]);
1839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		}
1849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		f.glEnd();
1859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		SDL_GL_SwapBuffers();
1869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		while(SDL_PollEvent(&event))
1889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		{
1899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall			if(event.type & SDL_KEYDOWN)
1909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall				done=1;
1919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		}
1929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		SDL_Delay(20);
1949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
1959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	while(!done);
1969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_Quit();
1989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	return 0;
1999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
2009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#else /* HAVE_OPENGL */
2029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallint main(int argc, char *argv[])
2049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
2059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	printf("No OpenGL support on this system\n");
2069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	return 1;
2079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
2089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* HAVE_OPENGL */
210