mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
progs: Port fp programs to GLEW.
This commit is contained in:
parent
48d816b8ff
commit
e3f14f2f3b
10 changed files with 50 additions and 26 deletions
|
|
@ -11,7 +11,20 @@ env.Prepend(CPPPATH = [
|
|||
|
||||
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'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ static void Init( void )
|
|||
}
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "GL/gl.h"
|
||||
|
||||
|
||||
|
||||
|
|
@ -17,7 +16,7 @@ static void Init( void )
|
|||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
if (!GLEW_ARB_fragment_program) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -109,6 +108,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "GL/gl.h"
|
||||
|
||||
|
||||
|
||||
|
|
@ -19,7 +18,7 @@ static void Init( void )
|
|||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
if (!GLEW_ARB_fragment_program) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -89,8 +88,6 @@ int main(int argc, char **argv)
|
|||
|
||||
glutInit(&argc, argv);
|
||||
|
||||
|
||||
|
||||
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
|
||||
|
||||
type = GLUT_RGB;
|
||||
|
|
@ -101,6 +98,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "GL/gl.h"
|
||||
|
||||
|
||||
|
||||
|
|
@ -21,7 +20,7 @@ static void Init( void )
|
|||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
if (!GLEW_ARB_fragment_program) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -106,6 +105,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ static void Init(void)
|
|||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
if (!GLEW_ARB_fragment_program) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -97,6 +97,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ static void Init(void)
|
|||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
if (!GLEW_ARB_fragment_program) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -97,6 +97,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ static void Init( void )
|
|||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
if (!GLEW_ARB_fragment_program) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -99,6 +99,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "GL/gl.h"
|
||||
|
||||
|
||||
static void Init( void )
|
||||
{
|
||||
|
|
@ -15,7 +15,7 @@ static void Init( void )
|
|||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
if (!GLEW_ARB_fragment_program) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -104,6 +104,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.c"
|
||||
|
|
@ -23,7 +23,7 @@ static void Init( void )
|
|||
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);
|
||||
}
|
||||
|
|
@ -120,6 +120,8 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
glewInit();
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue