progs: Port most of the demos to glew.
A couple of test weren't ported due to glew breakage -- it undefines GLAPIENTRY.
This commit is contained in:
@@ -5,16 +5,16 @@ include $(TOP)/configs/current
|
|||||||
|
|
||||||
INCDIR = $(TOP)/include
|
INCDIR = $(TOP)/include
|
||||||
|
|
||||||
OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
|
OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lglew -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
|
||||||
|
|
||||||
OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
|
OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lglew -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
|
||||||
|
|
||||||
OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
|
OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lglew -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
|
||||||
|
|
||||||
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
|
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
|
||||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
||||||
|
|
||||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
|
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
|
||||||
$(APP_LIB_DEPS)
|
$(APP_LIB_DEPS)
|
||||||
|
|
||||||
PROGS = \
|
PROGS = \
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
#define TEST_DISPLAY_LISTS 0
|
#define TEST_DISPLAY_LISTS 0
|
||||||
@@ -273,6 +273,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 400, 400 );
|
glutInitWindowSize( 400, 400 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||||
Win = glutCreateWindow(argv[0]);
|
Win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutSpecialFunc( SpecialKey );
|
glutSpecialFunc( SpecialKey );
|
||||||
|
@@ -6,11 +6,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
@@ -234,6 +233,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
|
||||||
|
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init(ciMode, filename);
|
Init(ciMode, filename);
|
||||||
Usage();
|
Usage();
|
||||||
|
@@ -5,12 +5,11 @@
|
|||||||
* June 2006
|
* June 2006
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
#include "trackball.h"
|
#include "trackball.h"
|
||||||
@@ -1288,6 +1287,7 @@ main(int argc, char *argv[])
|
|||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
glutCreateWindow("OpenGL Engine Demo");
|
glutCreateWindow("OpenGL Engine Demo");
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutMouseFunc(Mouse);
|
glutMouseFunc(Mouse);
|
||||||
glutMotionFunc(Motion);
|
glutMotionFunc(Motion);
|
||||||
|
@@ -29,11 +29,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
|
|
||||||
@@ -1037,6 +1037,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
Win = glutCreateWindow("fbo_firecube");
|
Win = glutCreateWindow("fbo_firecube");
|
||||||
|
glewInit();
|
||||||
init(argc, argv);
|
init(argc, argv);
|
||||||
|
|
||||||
glutDisplayFunc(draw);
|
glutDisplayFunc(draw);
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -273,6 +273,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 200, 200 );
|
glutInitWindowSize( 200, 200 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||||
Win = glutCreateWindow(argv[0]);
|
Win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutSpecialFunc( SpecialKey );
|
glutSpecialFunc( SpecialKey );
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#undef CLIP_MASK
|
#undef CLIP_MASK
|
||||||
#endif
|
#endif
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include "GL/glut.h"
|
#include "GL/glut.h"
|
||||||
|
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
@@ -1052,6 +1052,7 @@ int main(int argc, char **argv)
|
|||||||
glutInitDisplayMode(type);
|
glutInitDisplayMode(type);
|
||||||
|
|
||||||
if (glutCreateWindow("Isosurface") <= 0) {
|
if (glutCreateWindow("Isosurface") <= 0) {
|
||||||
|
glewInit();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -255,6 +255,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||||
|
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
(void) Init2; /* silence warning */
|
(void) Init2; /* silence warning */
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
/* Some <math.h> files do not define M_PI... */
|
/* Some <math.h> files do not define M_PI... */
|
||||||
@@ -444,6 +444,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
glutCreateWindow("point burst");
|
glutCreateWindow("point burst");
|
||||||
|
glewInit();
|
||||||
glutDisplayFunc(redraw);
|
glutDisplayFunc(redraw);
|
||||||
glutMouseFunc(mouse);
|
glutMouseFunc(mouse);
|
||||||
glutMotionFunc(mouseMotion);
|
glutMotionFunc(mouseMotion);
|
||||||
|
@@ -31,12 +31,12 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include "showbuffer.h"
|
#include "showbuffer.h"
|
||||||
|
|
||||||
@@ -1025,6 +1025,7 @@ main(int argc, char *argv[])
|
|||||||
glutInitWindowSize(WindowWidth, WindowHeight);
|
glutInitWindowSize(WindowWidth, WindowHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
/* Some <math.h> files do not define M_PI... */
|
/* Some <math.h> files do not define M_PI... */
|
||||||
@@ -509,6 +509,7 @@ main(int argc, char **argv)
|
|||||||
glutInitWindowPosition(0, 0);
|
glutInitWindowPosition(0, 0);
|
||||||
glutInitWindowSize(600,300);
|
glutInitWindowSize(600,300);
|
||||||
glutCreateWindow("sprite blast");
|
glutCreateWindow("sprite blast");
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(reshape);
|
glutReshapeFunc(reshape);
|
||||||
glutDisplayFunc(redraw);
|
glutDisplayFunc(redraw);
|
||||||
glutMouseFunc(mouse);
|
glutMouseFunc(mouse);
|
||||||
|
@@ -6,12 +6,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
@@ -303,6 +302,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowPosition( 0, 0 );
|
glutInitWindowPosition( 0, 0 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||||
glutCreateWindow(argv[0] );
|
glutCreateWindow(argv[0] );
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init( argc, argv );
|
Init( argc, argv );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user