namespace
10-21-2003, 01:33 AM
Hi!
Thats my first post on this board, so
dont take it too serios http://www.opengl.org/discussion_boards/ubb/wink.gif
Im writing my Renderer and
I dont know which statechanges i should manage my self.
Example:
void renderer::BindTexture(uint id)
{
if(id != bound_texture)
{
glBindTexture(GL_TEXTURE_2D,id);
bound_texture = id;
}
}
Is this really neccessary, or does the driver
this kind of optimization for me?
Managing all the important states (textures,
vertexprograms, vbos) my self is ... well, a bit work intesive
especially when you use textureunits and cubemaps which
require even more state changes.
I sort everything in my scene by texture, but every object calls
renderer->SetTexture(mytexture); in their Render() function.
So the state managing would only cut down the
amount of glDoSomeThing calls. Is this really worth the effort?
Sorry for my bad english
Thats my first post on this board, so
dont take it too serios http://www.opengl.org/discussion_boards/ubb/wink.gif
Im writing my Renderer and
I dont know which statechanges i should manage my self.
Example:
void renderer::BindTexture(uint id)
{
if(id != bound_texture)
{
glBindTexture(GL_TEXTURE_2D,id);
bound_texture = id;
}
}
Is this really neccessary, or does the driver
this kind of optimization for me?
Managing all the important states (textures,
vertexprograms, vbos) my self is ... well, a bit work intesive
especially when you use textureunits and cubemaps which
require even more state changes.
I sort everything in my scene by texture, but every object calls
renderer->SetTexture(mytexture); in their Render() function.
So the state managing would only cut down the
amount of glDoSomeThing calls. Is this really worth the effort?
Sorry for my bad english