nothing appears on the screen. If i dont enable the shader code(by not calling glEnable(GL_VERTEX_PROGRAM_ARB)) it draws the rect fine.
also i did check for errors in the compilation of the shader(using GL_PROGRAM_ERROR_POSITION_ARB) and it didnt return any errors so i know that the shader is valid
does anyone know what im doing wrong? Finding resources on openGL shaders is tuff
Just out of curiosity, what’s your clear color? If you don’t write something to the color result registers, the results are undefined (they don’t “pass through” by default). It’s possible that undefined in your case means “black”, so you might try setting your clear color to something other than black and see if your quad shows up.
Alternatively, write something to the result color register. Adding this line should do it: MOV result.color, 1;
THNAKS ALOT man, thats exactly what it was!
i was clearing to black then i cleared to red and this little black rect appeared on the screen.
i guess i forgot that with shaders you have to do EVERYTHING yourself so glColor3f had no effect(d’oh)