projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
48d816b
)
progs: Port fp programs to GLEW.
author
José Fonseca
<jfonseca@vmware.com>
Thu, 11 Jun 2009 12:19:34 +0000
(13:19 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Thu, 11 Jun 2009 12:19:34 +0000
(13:19 +0100)
progs/fp/SConscript
patch
|
blob
|
history
progs/fp/fp-tri.c
patch
|
blob
|
history
progs/fp/point-position.c
patch
|
blob
|
history
progs/fp/tri-depth.c
patch
|
blob
|
history
progs/fp/tri-depth2.c
patch
|
blob
|
history
progs/fp/tri-depthwrite.c
patch
|
blob
|
history
progs/fp/tri-depthwrite2.c
patch
|
blob
|
history
progs/fp/tri-inv.c
patch
|
blob
|
history
progs/fp/tri-param.c
patch
|
blob
|
history
progs/fp/tri-tex.c
patch
|
blob
|
history
diff --git
a/progs/fp/SConscript
b/progs/fp/SConscript
index 553799758b0ddb7f70c0e43c6b58fa01fd9982c7..a78318542c1605f3090b7fcacabb721a372c097c 100644
(file)
--- a/
progs/fp/SConscript
+++ b/
progs/fp/SConscript
@@
-11,7
+11,20
@@
env.Prepend(CPPPATH = [
env.Prepend(LIBS = ['$GLUT_LIB'])
env.Prepend(LIBS = ['$GLUT_LIB'])
-env.Program(
- target = 'fp-tri',
- source = ['fp-tri.c'],
+progs = [
+ 'fp-tri',
+ 'tri-depth',
+ 'tri-depth2',
+ 'tri-depthwrite',
+ 'tri-depthwrite2',
+ 'tri-inv',
+ 'tri-param',
+ 'tri-tex',
+ 'point-position',
+]
+
+for prog in progs:
+ env.Program(
+ target = prog,
+ source = [prog + '.c'],
)
)
diff --git
a/progs/fp/fp-tri.c
b/progs/fp/fp-tri.c
index 6c15540d38d121fe946e6f8b80f4d194d59ba120..52a8fcfc22ac683fdba9ebdcaf1d565747569ee1 100644
(file)
--- a/
progs/fp/fp-tri.c
+++ b/
progs/fp/fp-tri.c
@@
-89,7
+89,7
@@
static void Init( void )
}
fprintf(stderr, "%.*s\n", sz, buf);
}
fprintf(stderr, "%.*s\n", sz, buf);
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
diff --git
a/progs/fp/point-position.c
b/progs/fp/point-position.c
index c352a939cb18d9689d58cd137ee2a1eb2d76492a..c0963d7a0b5a9a67d34baf2ddc9e744f44eb7c0e 100644
(file)
--- a/
progs/fp/point-position.c
+++ b/
progs/fp/point-position.c
@@
-2,9
+2,8
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glut.h>
-#include "GL/gl.h"
@@
-17,7
+16,7
@@
static void Init( void )
;
GLuint modulateProg;
;
GLuint modulateProg;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-109,6
+108,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);
diff --git
a/progs/fp/tri-depth.c
b/progs/fp/tri-depth.c
index a1f0579c8e11d792ea86595c58115843d2b28af8..5488469e806d1b80cf94791d44f12ed856657d4b 100644
(file)
--- a/
progs/fp/tri-depth.c
+++ b/
progs/fp/tri-depth.c
@@
-2,9
+2,8
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glut.h>
-#include "GL/gl.h"
@@
-19,7
+18,7
@@
static void Init( void )
;
GLuint modulateProg;
;
GLuint modulateProg;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-89,8
+88,6
@@
int main(int argc, char **argv)
glutInit(&argc, argv);
glutInit(&argc, argv);
-
-
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
type = GLUT_RGB;
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
type = GLUT_RGB;
@@
-101,6
+98,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);
diff --git
a/progs/fp/tri-depth2.c
b/progs/fp/tri-depth2.c
index f309628283313f6676853ba98b5174a680de14ee..6ed23071157ce02f0e17cc08b882d9789689ecfc 100644
(file)
--- a/
progs/fp/tri-depth2.c
+++ b/
progs/fp/tri-depth2.c
@@
-2,9
+2,8
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glut.h>
-#include "GL/gl.h"
@@
-21,7
+20,7
@@
static void Init( void )
;
GLuint modulateProg;
;
GLuint modulateProg;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-106,6
+105,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);
diff --git
a/progs/fp/tri-depthwrite.c
b/progs/fp/tri-depthwrite.c
index fedeec4577dce41607bd11b6dfb940554d406916..8e4f3e62451b4759eb1625d4aaaa940cc8c8000e 100644
(file)
--- a/
progs/fp/tri-depthwrite.c
+++ b/
progs/fp/tri-depthwrite.c
@@
-2,7
+2,7
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glut.h>
@@
-16,7
+16,7
@@
static void Init(void)
;
GLuint modulateProg;
;
GLuint modulateProg;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-97,6
+97,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);
diff --git
a/progs/fp/tri-depthwrite2.c
b/progs/fp/tri-depthwrite2.c
index 5547092ec9be6beb4464915af861497ed96460fa..3c0b4d30c97ae319ddd612e1dd4c41f5aefea7c7 100644
(file)
--- a/
progs/fp/tri-depthwrite2.c
+++ b/
progs/fp/tri-depthwrite2.c
@@
-2,7
+2,7
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glut.h>
@@
-16,7
+16,7
@@
static void Init(void)
;
GLuint modulateProg;
;
GLuint modulateProg;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-97,6
+97,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);
diff --git
a/progs/fp/tri-inv.c
b/progs/fp/tri-inv.c
index e9023323862a8f475a8b3f9dfbdf6e78703b4e11..7e8d8c5ce2960c3a4d3dbfdc58d4232d0f8421f7 100644
(file)
--- a/
progs/fp/tri-inv.c
+++ b/
progs/fp/tri-inv.c
@@
-2,7
+2,7
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glut.h>
@@
-17,7
+17,7
@@
static void Init( void )
;
GLuint modulateProg;
;
GLuint modulateProg;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-99,6
+99,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);
diff --git
a/progs/fp/tri-param.c
b/progs/fp/tri-param.c
index f3e55af3f1b63b43573a4aa719167cf709b5a0ce..57443d71bd08bc8a968e115ec7adc980582615e0 100644
(file)
--- a/
progs/fp/tri-param.c
+++ b/
progs/fp/tri-param.c
@@
-2,9
+2,9
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glut.h>
-#include "GL/gl.h"
+
static void Init( void )
{
static void Init( void )
{
@@
-15,7
+15,7
@@
static void Init( void )
;
GLuint modulateProg;
;
GLuint modulateProg;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-104,6
+104,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);
diff --git
a/progs/fp/tri-tex.c
b/progs/fp/tri-tex.c
index 87f63894ce9aef74bd5dea01921d63dd88b8e368..1dbbb201cef2e48f2a20a5efc983e26521839604 100644
(file)
--- a/
progs/fp/tri-tex.c
+++ b/
progs/fp/tri-tex.c
@@
-3,7
+3,7
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.c"
#include <GL/glut.h>
#include "readtex.c"
@@
-23,7
+23,7
@@
static void Init( void )
GLuint modulateProg;
GLuint Texture;
GLuint modulateProg;
GLuint Texture;
- if (!
glutExtensionSupported("GL_ARB_fragment_program")
) {
+ if (!
GLEW_ARB_fragment_program
) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
@@
-120,6
+120,8
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
Init();
glutReshapeFunc(Reshape);