Skip to main content
GameDev.net gamedev.net
🔒 Locked

GLSL setup

Started by dpadam450 Mar 31, 2007 at 4:22 PM 0 replies 650+ views
Original Post
dpadam450
dpadam450
Do I have to write the vertex and pixel shaders on different source code? Do I write them in a .cpp file and call the compile() function from the shaderClass? I have the book "More OGL Game Programming", but it's confusing me.
NBA2K, Madden, Maneater, Killing Floor, Sims 
zedz
zedz
a shader that gets compiled is just a string
eg it can be included in the source

"void main() { ... }"

or usually as a seperate file

file -> shader.glsl
void main
{

}

which gets read in and then few to the glsl compiler

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.