Presentation is loading. Please wait.

Presentation is loading. Please wait.

Knowing the GLSL version of your GPU glGetString(GL_SHADING_LANGUAGE_VERSION) GLSL 1.20 or later?

Similar presentations


Presentation on theme: "Knowing the GLSL version of your GPU glGetString(GL_SHADING_LANGUAGE_VERSION) GLSL 1.20 or later?"— Presentation transcript:

1 Knowing the GLSL version of your GPU glGetString(GL_SHADING_LANGUAGE_VERSION) GLSL 1.20 or later?

2 Great Tutorial for OpenGL 3.0 or later: http://www.opengl-tutorial.org GLSL 1.3 or Later

3 GLFW keyboard call back 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; } glfwSetCharCallback(My_Key_Callback);

4 Skeleton Code provide on ICG course web GLSL 1.2 or older  Tutorial for GLSL 1.2 http://www.lighthouse3d.com/tutorials/glsl-tutorial/

5 HW2 requirement VersionOpenGL 3.0 + GLSL 1.3OpenGL 2.0 + GLSL 1.2 Rrequirement 1.Flat shader and Gouraud shader (+2pts) 2.Phong shader(+ 2pts) 3. Put "at least" three lights in the environment. They should be placed at the top- right-front, bottom-left-front and bottom-left-back sides of the object. (+1pt) 4. Any other efforts you make, including interface design, visual effects…etc. (bonus: +0-1 pt) 1.Flat shading and Gouraud shading by OpenGL function The rest are the same.

6 Flat shading in OpenGL 3.0?

7 Strongly recommend to implement some transformations! The difference between the shaders can be easily shown

8 GLSL quick reference guide http://www.opengl.org/documentation/glsl/


Download ppt "Knowing the GLSL version of your GPU glGetString(GL_SHADING_LANGUAGE_VERSION) GLSL 1.20 or later?"

Similar presentations


Ads by Google