The boards seem a little dead today? Geez I feel bad being the two most recent posts. However, a man has needs
I've gotten significantly further in my program, but I need help with two things: toggling between shaders and testing to see if I've been calculating my normals correctly in a triangle mesh.
In regards to the normals, I just want to know a good method for testing. I know I can subtract the value of the normal from the color so that all normals that are approximately unit length on a single axis (e.g. (1,0,0) or (0,1,0)) will be shaded red, green, or blue, depending on what value remains, but if it's done correctly, should I be seeing distinct shades of RGB, or should I be seeing the in-between as well, such as purple or orange?
As for toggling between shaders, I need a pointer in the right direction. By toggling between shaders I mean between parts of the vertex and fragment shaders. I realize both run each time I run the program, but I would like to have it so that I could have PARTS of the code run from each depending on a certain mode input. I've tried setting up a handler to take input keyboard keys as int values and pass them to an appropriate variable in both the vertex and fragment shaders, but if I try to use a flag with that parameter and put the code inside if statements, a rendering results in a uniformly colored image.
I'm not quite sure where to go from here. I've checked to see if the values are being passed incorrectly or if there aren't proper handles, but that all checks out. I'd post code but there's quite a bit.