LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
PROGS = aaindex \
aapoly \
* scaling factor and reversing the order of subtraction
* for a combination function.
*/
+#include <GL/glew.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
glutInitWindowSize(400, 400);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
+ glewInit();
init();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
* Use various 2D convolutions filters to find edges in an image.
*
*/
+#include <GL/glew.h>
#include <GL/glut.h>
#include <assert.h>
#include <stdio.h>
static void init(void)
{
+ if (!glutExtensionSupported("GL_ARB_imaging")) {
+ fprintf(stderr, "Sorry, this program requires GL_ARB_imaging.\n");
+ exit(1);
+ }
+
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glClearColor(0.0, 0.0, 0.0, 0.0);
glutInitWindowSize(width, height);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
+ glewInit();
init();
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
* three vertices of the triangle.
*/
-#define GL_GLEXT_PROTOTYPES
-
+#include <GL/glew.h>
#include <GL/glut.h>
#include <math.h>
#include <stdlib.h>
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(500, 500);
glutCreateWindow(argv[0]);
+ glewInit();
init();
glutReshapeFunc (reshape);
glutKeyboardFunc (keyboard);
* use of the glHistogram() function.
*/
+#include <GL/glew.h>
#include <GL/glut.h>
#include <assert.h>
#include <stdlib.h>
static void init(void)
{
+ if (!glutExtensionSupported("GL_ARB_imaging")) {
+ fprintf(stderr, "Sorry, this program requires GL_ARB_imaging.\n");
+ exit(1);
+ }
+
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glClearColor(0.0, 0.0, 0.0, 0.0);
glutInitWindowSize(width, height);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
+ glewInit();
init();
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
* Determine the minimum and maximum values of a group of pixels.
* This demonstrates use of the glMinmax() call.
*/
+#include <GL/glew.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
static void init(void)
{
+ if (!glutExtensionSupported("GL_ARB_imaging")) {
+ fprintf(stderr, "Sorry, this program requires GL_ARB_imaging.\n");
+ exit(1);
+ }
+
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glClearColor(0.0, 0.0, 0.0, 0.0);
glutInitWindowSize(width, height);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
+ glewInit();
init();
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
/* multitex.c
*/
+#include <GL/glew.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
glutInitWindowSize(250, 250);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
+ glewInit();
init();
glutReshapeFunc(reshape);
glutDisplayFunc(display);
* specifically the OpenGL routine glMultiDrawElements().
*/
-#define GL_GLEXT_PROTOTYPES
-
+#include <GL/glew.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
glutInitWindowSize (350, 350);
glutInitWindowPosition (100, 100);
glutCreateWindow (argv[0]);
+ glewInit();
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
* will not get less than 2.0, nor greater than GL_POINT_SIZE_MAX.
*/
-#define GL_GLEXT_PROTOTYPES
-
+#include <GL/glew.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
glutInitWindowSize (500, 500);
glutInitWindowPosition (100, 100);
glutCreateWindow (argv[0]);
+ glewInit();
init ();
glutDisplayFunc (display);
glutReshapeFunc (reshape);
* OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
*/
-#define GL_GLEXT_PROTOTYPES
-
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
/*#include "helpers.h"*/
glutInitWindowSize( 512, 512 );
glutInitWindowPosition( 100, 100 );
glutCreateWindow( argv[0] );
+ glewInit();
init();
* with different texture coordinates to obtain different
* "slices" of the 3D texture.
*/
+#include <GL/glew.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
glutInitWindowSize(250, 250);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
+ glewInit();
init();
glutReshapeFunc(reshape);
glutDisplayFunc(display);