80 likes | 292 Vues
Knowing the GLSL version of your GPU glGetString (GL_SHADING_LANGUAGE_VERSION). GLSL 1.20 or later?. GLSL 1.3 or Later . Great Tutorial for OpenGL 3.0 or later: http:// www.opengl-tutorial.org. GLFW keyboard call back. glfwSetCharCallback ( My_Key_Callback );.
E N D
Knowing the GLSL version of your GPU glGetString(GL_SHADING_LANGUAGE_VERSION) GLSL 1.20 or later?
GLSL 1.3 or Later Great Tutorial for OpenGL 3.0 or later: http://www.opengl-tutorial.org
GLFW keyboard call back glfwSetCharCallback(My_Key_Callback); void My_Key_Callback(int character, int action) { if (action == GLFW_PRESS) { switch (character) { case '1': light_switch[0] = (light_switch[0]+1)%2; break; case 'f': shader_mode = 'f'; break; default: break; } }
GLSL 1.2 or older Skeleton Code provide on ICG course web Tutorial for GLSL 1.2 http://www.lighthouse3d.com/tutorials/glsl-tutorial/
Strongly recommend to implement some transformations! The difference between the shaders can be easily shown
GLSL quick reference guide http://www.opengl.org/documentation/glsl/