vpglsl: build with scons and glew
This commit is contained in:
@@ -5,5 +5,6 @@ SConscript([
|
||||
'samples/SConscript',
|
||||
'trivial/SConscript',
|
||||
'vp/SConscript',
|
||||
'vpglsl/SConscript',
|
||||
'fp/SConscript',
|
||||
])
|
||||
|
@@ -7,7 +7,7 @@
|
||||
TOP = ../..
|
||||
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$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
SOURCES = \
|
||||
vp-tris.c
|
||||
|
@@ -4,7 +4,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static const char *filename = NULL;
|
||||
@@ -99,6 +100,7 @@ static void setup_uniforms()
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
GLuint loc1f = glGetUniformLocationARB(program, "KernelValue1f");
|
||||
GLuint loc2f = glGetUniformLocationARB(program, "KernelValue2f");
|
||||
GLuint loc4f = glGetUniformLocationARB(program, "KernelValue4f");
|
||||
@@ -120,6 +122,7 @@ static void setup_uniforms()
|
||||
|
||||
if (loc4f >= 0)
|
||||
glUniform4fv(loc4f, 4, vecKer);
|
||||
}
|
||||
}
|
||||
|
||||
static void prepare_shaders()
|
||||
@@ -303,6 +306,7 @@ int main( int argc, char *argv[] )
|
||||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
Reference in New Issue
Block a user