summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-02-10 16:34:51 -0700
committerBrian Paul <[email protected]>2009-02-10 16:34:51 -0700
commitee4c921b65fb76998711f3c40330505cbc49a0e0 (patch)
treeb4c702af3d93a76e204a3aad012541d4fbcb2101 /progs
parent767b1acbb757186bde30973394f256ab7498a075 (diff)
parent14d808f8fdc41a26cea5264e47a24c903e54ce93 (diff)
Merge commit 'origin/gallium-0.2' into gallium-master-merge
Diffstat (limited to 'progs')
-rw-r--r--progs/SConscript2
-rw-r--r--progs/redbook/SConscript91
-rw-r--r--progs/samples/Makefile2
-rw-r--r--progs/samples/SConscript58
-rw-r--r--progs/samples/blendeq.c7
-rw-r--r--progs/samples/blendxor.c9
6 files changed, 158 insertions, 11 deletions
diff --git a/progs/SConscript b/progs/SConscript
index 631923a38ff..6484c761fc5 100644
--- a/progs/SConscript
+++ b/progs/SConscript
@@ -1,6 +1,8 @@
SConscript([
'util/SConscript',
'demos/SConscript',
+ 'redbook/SConscript',
+ 'samples/SConscript',
'trivial/SConscript',
'vp/SConscript',
])
diff --git a/progs/redbook/SConscript b/progs/redbook/SConscript
new file mode 100644
index 00000000000..242cb6647fc
--- /dev/null
+++ b/progs/redbook/SConscript
@@ -0,0 +1,91 @@
+Import('*')
+
+if not env['GLUT']:
+ Return()
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+ '../util',
+])
+
+env.Prepend(LIBS = [
+ util,
+ '$GLUT_LIB'
+])
+
+if env['platform'] == 'windows':
+ env.Append(CPPDEFINES = ['NOMINMAX'])
+ env.Prepend(LIBS = ['winmm'])
+
+progs = [
+ 'aaindex',
+ 'aapoly',
+ 'aargb',
+ 'accanti',
+ 'accpersp',
+ 'alpha3D',
+ 'alpha',
+ 'anti',
+ 'bezcurve',
+ 'bezmesh',
+ 'checker',
+ 'clip',
+ 'colormat',
+ 'cube',
+ 'depthcue',
+ 'dof',
+ 'double',
+ 'drawf',
+ 'feedback',
+ 'fog',
+ 'fogindex',
+ 'font',
+ 'hello',
+ 'image',
+ 'light',
+ 'lines',
+ 'list',
+ 'material',
+ 'mipmap',
+ 'model',
+ 'movelight',
+ 'nurbs',
+ 'pickdepth',
+ 'picksquare',
+ 'plane',
+ 'planet',
+ 'polyoff',
+ 'polys',
+ 'quadric',
+ 'robot',
+ 'sccolorlight',
+ 'scenebamb',
+ 'scene',
+ 'sceneflat',
+ 'select',
+ 'smooth',
+ 'stencil',
+ 'stroke',
+ 'surface',
+ 'teaambient',
+ 'teapots',
+ 'tess',
+ 'tesswind',
+ 'texbind',
+ 'texgen',
+ 'texprox',
+ 'texsub',
+ 'texturesurf',
+ 'torus',
+ 'trim',
+ 'unproject',
+ 'varray',
+ 'wrap',
+]
+
+for prog in progs:
+ env.Program(
+ target = prog,
+ source = prog + '.c',
+ )
diff --git a/progs/samples/Makefile b/progs/samples/Makefile
index 63dca07d2e8..b300e38b9c2 100644
--- a/progs/samples/Makefile
+++ b/progs/samples/Makefile
@@ -7,7 +7,7 @@ INCDIR = $(TOP)/include
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 = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
font line logo nurb olympic overlay point prim quad select \
diff --git a/progs/samples/SConscript b/progs/samples/SConscript
new file mode 100644
index 00000000000..7a8a0d62d81
--- /dev/null
+++ b/progs/samples/SConscript
@@ -0,0 +1,58 @@
+Import('*')
+
+if not env['GLUT']:
+ Return()
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+ '../util',
+])
+
+env.Prepend(LIBS = [
+ util,
+ '$GLUT_LIB'
+])
+
+if env['platform'] == 'windows':
+ env.Append(CPPDEFINES = ['NOMINMAX'])
+ env.Prepend(LIBS = ['winmm'])
+
+progs = [
+ 'accum',
+ 'bitmap1',
+ 'bitmap2',
+ 'blendeq',
+ 'blendxor',
+ 'copy',
+ 'cursor',
+ 'depth',
+ 'eval',
+ 'fog',
+ 'font',
+ 'line',
+ 'logo',
+ 'nurb',
+ #'oglinfo',
+ 'olympic',
+ 'overlay',
+ 'point',
+ 'prim',
+ 'quad',
+ 'rgbtoppm',
+ 'select',
+ 'shape',
+ 'sphere',
+ 'star',
+ 'stencil',
+ 'stretch',
+ 'texture',
+ 'tri',
+ 'wave',
+]
+
+for prog in progs:
+ env.Program(
+ target = prog,
+ source = prog + '.c',
+ )
diff --git a/progs/samples/blendeq.c b/progs/samples/blendeq.c
index d5143ecdf5c..cd0474c5cea 100644
--- a/progs/samples/blendeq.c
+++ b/progs/samples/blendeq.c
@@ -11,10 +11,7 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#ifdef _WIN32
-#include <windows.h>
-#endif
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
GLenum doubleBuffer;
@@ -274,6 +271,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
/* Make sure blend_logic_op extension is there. */
s = (char *) glGetString(GL_EXTENSIONS);
version = (char*) glGetString(GL_VERSION);
diff --git a/progs/samples/blendxor.c b/progs/samples/blendxor.c
index 5bc4aa9bea4..057143651fd 100644
--- a/progs/samples/blendxor.c
+++ b/progs/samples/blendxor.c
@@ -10,13 +10,8 @@
#include <unistd.h>
#endif
#include <stdlib.h>
-#ifdef _WIN32
-#include <windows.h>
-#endif
-#define GL_GLEXT_LEGACY
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
-#include <GL/glext.h>
GLenum doubleBuffer;
@@ -176,6 +171,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
/* Make sure blend_logic_op extension is there. */
s = (char *) glGetString(GL_EXTENSIONS);
version = (char*) glGetString(GL_VERSION);