![]() |
.. (לתיקייה המכילה) | |
How do I communicate with shaders (give it parameters, and get back parameters if needed)
|
Use glSetUniform* or glGetUniform*. In order to use these functions (or a variety of others), you need to add their initialization to the "setShaders" function: PFNGLGETUNIFORMFVPROC glGetUniformv = NULL; glGetUniformv = (PFNGLGETUNIFORMFVPROC) wglGetProcAddress("glGetUniformv"); Look for the right declerations in glext.h |
If I want to use a shader for bump mapping, I need a "height map", don't I?
How do I get it?
|
a) you can create one yourself - either by randomizing or gray scaling the original image. b) Look in the course material section, we've added one example there |

