February 28, 2015

Trying

So I made two separate shader programs: one for the skybox and one for the rest of the scene.  Took a while in doing so because I'm an idiot sometimes and made some dumb mistakes.

Things for Grace to remember next time:
- Before calling glUniform[...] you need to make sure the appropriate shader program is loaded first (uniforms won't get passed through otherwise)
- If you don't bind the correct vao's right before drawing (if you have multiple shaders) then weird stuff happens where attributes of one shader affect the attributes of another.  Left pic below, the weird shape in the bottom is supposed to be my skybox but it was affected by the Gulpin's geometry.  Right pic is correct version.  Hi Gulpin!
- You need to match up the names you're giving variables in the shaders with the names you call in glGetUniformLocation or glGetAttribLocation!  Errors will result if not!

Many more.  These are the ones I remember off the top of my head.

Trying a crack at procedural geometry, I eventually want to use Perlin noise but right now I'm just using a random number generator in the vertex shader to affect the height of the ground


SUCH a hack right now but it's a start.