progs/trivial: Use glew where needed.
Builds on windows now.
This commit is contained in:
@@ -10,9 +10,23 @@ env = Environment(
|
|||||||
|
|
||||||
|
|
||||||
# Use Mesa's headers and libs
|
# Use Mesa's headers and libs
|
||||||
if 0:
|
if 1:
|
||||||
|
build_topdir = 'build'
|
||||||
|
build_subdir = env['platform']
|
||||||
|
if env['machine'] != 'generic':
|
||||||
|
build_subdir += '-' + env['machine']
|
||||||
|
if env['debug']:
|
||||||
|
build_subdir += "-debug"
|
||||||
|
if env['profile']:
|
||||||
|
build_subdir += "-profile"
|
||||||
|
build_dir = os.path.join(build_topdir, build_subdir)
|
||||||
|
|
||||||
|
env.Append(CPPDEFINES = ['GLEW_STATIC'])
|
||||||
env.Append(CPPPATH = ['#../include'])
|
env.Append(CPPPATH = ['#../include'])
|
||||||
env.Append(LIBPATH = ['#../lib'])
|
env.Append(LIBPATH = [
|
||||||
|
'#../' + build_dir + '/glew/',
|
||||||
|
'#../' + build_dir + '/glut/glx',
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
conf = Configure(env)
|
conf = Configure(env)
|
||||||
@@ -32,6 +46,13 @@ if conf.CheckCHeader('GL/glut.h'):
|
|||||||
env['GLUT_LIB'] = 'glut'
|
env['GLUT_LIB'] = 'glut'
|
||||||
env['GLUT'] = True
|
env['GLUT'] = True
|
||||||
|
|
||||||
|
# GLEW
|
||||||
|
env['GLEW'] = False
|
||||||
|
if conf.CheckCHeader('GL/glew.h'):
|
||||||
|
env['GLEW_LIB'] = 'glew'
|
||||||
|
env['GLEW'] = True
|
||||||
|
env.Prepend(LIBS = ['glew'])
|
||||||
|
|
||||||
conf.Finish()
|
conf.Finish()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ TOP = ../..
|
|||||||
include $(TOP)/configs/current
|
include $(TOP)/configs/current
|
||||||
|
|
||||||
|
|
||||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
LIBS = -L$(TOP)/$(LIB_DIR) -l $(GLEW_LIB) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
clear-fbo-tex.c \
|
clear-fbo-tex.c \
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -210,6 +210,8 @@ main( int argc, char *argv[] )
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -195,6 +195,8 @@ main( int argc, char *argv[] )
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
|
|
||||||
@@ -118,6 +118,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
GLfloat verts[][4] = {
|
GLfloat verts[][4] = {
|
||||||
@@ -111,6 +111,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
GLfloat verts[][4] = {
|
GLfloat verts[][4] = {
|
||||||
@@ -109,6 +109,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
GLfloat verts[][4] = {
|
GLfloat verts[][4] = {
|
||||||
@@ -111,6 +111,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -142,6 +142,7 @@ main(int argc, char **argv)
|
|||||||
if (glutCreateWindow("tri-long-fixedfunc") == GL_FALSE) {
|
if (glutCreateWindow("tri-long-fixedfunc") == GL_FALSE) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Draw);
|
glutDisplayFunc(Draw);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -146,6 +146,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -167,6 +168,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -171,6 +171,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -91,6 +91,8 @@ int main(int argc, char **argv)
|
|||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
Zoom = atof(argv[1]);
|
Zoom = atof(argv[1]);
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@@ -110,6 +110,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -131,6 +132,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -41,8 +41,9 @@
|
|||||||
* to demonstrate the effect order has on alpha blending results.
|
* to demonstrate the effect order has on alpha blending results.
|
||||||
* Use the 't' key to toggle the order of drawing polygons.
|
* Use the 't' key to toggle the order of drawing polygons.
|
||||||
*/
|
*/
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
|
||||||
static int leftFirst = GL_TRUE;
|
static int leftFirst = GL_TRUE;
|
||||||
|
|
||||||
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
|
|||||||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
||||||
glutInitWindowSize (200, 200);
|
glutInitWindowSize (200, 200);
|
||||||
glutCreateWindow (argv[0]);
|
glutCreateWindow (argv[0]);
|
||||||
|
glewInit();
|
||||||
init();
|
init();
|
||||||
glutReshapeFunc (reshape);
|
glutReshapeFunc (reshape);
|
||||||
glutKeyboardFunc (keyboard);
|
glutKeyboardFunc (keyboard);
|
||||||
|
@@ -41,8 +41,9 @@
|
|||||||
* to demonstrate the effect order has on alpha blending results.
|
* to demonstrate the effect order has on alpha blending results.
|
||||||
* Use the 't' key to toggle the order of drawing polygons.
|
* Use the 't' key to toggle the order of drawing polygons.
|
||||||
*/
|
*/
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
|
||||||
static int leftFirst = GL_TRUE;
|
static int leftFirst = GL_TRUE;
|
||||||
|
|
||||||
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
|
|||||||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
||||||
glutInitWindowSize (200, 200);
|
glutInitWindowSize (200, 200);
|
||||||
glutCreateWindow (argv[0]);
|
glutCreateWindow (argv[0]);
|
||||||
|
glewInit();
|
||||||
init();
|
init();
|
||||||
glutReshapeFunc (reshape);
|
glutReshapeFunc (reshape);
|
||||||
glutKeyboardFunc (keyboard);
|
glutKeyboardFunc (keyboard);
|
||||||
|
@@ -41,8 +41,9 @@
|
|||||||
* to demonstrate the effect order has on alpha blending results.
|
* to demonstrate the effect order has on alpha blending results.
|
||||||
* Use the 't' key to toggle the order of drawing polygons.
|
* Use the 't' key to toggle the order of drawing polygons.
|
||||||
*/
|
*/
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
|
||||||
static int leftFirst = GL_TRUE;
|
static int leftFirst = GL_TRUE;
|
||||||
|
|
||||||
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
|
|||||||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
||||||
glutInitWindowSize (200, 200);
|
glutInitWindowSize (200, 200);
|
||||||
glutCreateWindow (argv[0]);
|
glutCreateWindow (argv[0]);
|
||||||
|
glewInit();
|
||||||
init();
|
init();
|
||||||
glutReshapeFunc (reshape);
|
glutReshapeFunc (reshape);
|
||||||
glutKeyboardFunc (keyboard);
|
glutKeyboardFunc (keyboard);
|
||||||
|
@@ -41,8 +41,9 @@
|
|||||||
* to demonstrate the effect order has on alpha blending results.
|
* to demonstrate the effect order has on alpha blending results.
|
||||||
* Use the 't' key to toggle the order of drawing polygons.
|
* Use the 't' key to toggle the order of drawing polygons.
|
||||||
*/
|
*/
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
|
||||||
static int leftFirst = GL_TRUE;
|
static int leftFirst = GL_TRUE;
|
||||||
|
|
||||||
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
|
|||||||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
|
||||||
glutInitWindowSize (200, 200);
|
glutInitWindowSize (200, 200);
|
||||||
glutCreateWindow (argv[0]);
|
glutCreateWindow (argv[0]);
|
||||||
|
glewInit();
|
||||||
init();
|
init();
|
||||||
glutReshapeFunc (reshape);
|
glutReshapeFunc (reshape);
|
||||||
glutKeyboardFunc (keyboard);
|
glutKeyboardFunc (keyboard);
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -256,6 +256,7 @@ main(int argc, char *argv[])
|
|||||||
glutInitWindowSize(Width, Height);
|
glutInitWindowSize(Width, Height);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||||
Win = glutCreateWindow(argv[0]);
|
Win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Display);
|
glutDisplayFunc(Display);
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -190,6 +190,8 @@ main( int argc, char *argv[] )
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -159,6 +159,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -157,6 +157,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -148,6 +148,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -160,6 +161,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
|
|
||||||
@@ -124,6 +124,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@@ -128,6 +128,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
#define ELTOBJ 0
|
#define ELTOBJ 0
|
||||||
@@ -136,6 +136,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
GLint verts[][4] = {
|
GLint verts[][4] = {
|
||||||
@@ -108,6 +108,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
GLfloat verts[][4] = {
|
GLfloat verts[][4] = {
|
||||||
@@ -108,6 +108,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -93,6 +93,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -107,6 +107,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.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>
|
||||||
|
|
||||||
|
|
||||||
@@ -146,11 +146,13 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Draw);
|
glutDisplayFunc(Draw);
|
||||||
glutMainLoop();
|
glutMainLoop();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.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>
|
||||||
|
|
||||||
|
|
||||||
@@ -179,6 +179,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -98,6 +98,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -92,6 +92,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -94,6 +94,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -128,6 +128,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -95,6 +95,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
@@ -5,7 +5,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>
|
||||||
|
|
||||||
static void Init( void )
|
static void Init( void )
|
||||||
@@ -95,6 +95,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowSize( 250, 250 );
|
glutInitWindowSize( 250, 250 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||||
glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
|
Reference in New Issue
Block a user