2 Topics

Member Avatar for
Member Avatar for jackshannon4

shader.vert: #version 120 varying vec3 position; varying vec3 normal; void main() { position = (vec3(gl_ModelViewMatrix*gl_Vertex)); //get the position of the vertex after translation, rotation, scaling normal = gl_NormalMatrix*gl_Normal; //get the normal direction, after translation, rotation, scaling gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } shader.frag: #version 120 varying vec3 position; varying vec3 …

Member Avatar for jackshannon4
0
170
Member Avatar for SgtMe

Hi all, I have a simple OpenGL program (learnt from NeHe of course) and I've tried to implement GLSL shaders into my program. Currently, its meant to draw a cube with a shader and quit on escape. However, at the line **`GLenum program = glCreateProgramObjectARB();`** it stops responding and closes. …

Member Avatar for TTTHXC
0
245

The End.