void entety::renderVbo( int shInstance)
{
int i,s;
shader tx;
i=0;
CFvbo vbo;
glDepthMask(GL_TRUE);
glColor3f(1,1,1);
glEnable(GL_TEXTURE_2D );
glDepthFunc(GL_LEQUAL);
vbo.startRendering(vboTag);
s=0;
while(s<snum)
{
tx.bind(skin[shInstance]); <span class="cpp-comment">//sets the current skin</span>
vbo.renderSub(s);
tx.unbind(); <span class="cpp-comment">//sets the current skin</span>
s++;
}
vbo.endRendering();
glDisable( GL_TEXTURE_2D );
glColorMask(<span class="cpp-number">1</span>, <span class="cpp-number">1</span>, <span class="cpp-number">1</span>, <span class="cpp-number">1</span>);
}
</pre></div><!–ENDSCRIPT–>
and when i run this nothing happens.
Unless i comment out the lines
tx.bind(skin[shInstance]);
tx.unbind();
this is bad because those two line should bind the current shader to the geometry i am rendering, no shader = everything is gray and untextured.
So then i thought, perhaps there is something in the shader code, so i started comenting out things.
No change.
not even after i comented out all the code in those function.
Thats right they now contain no code at all.
But still nothing is renderd(unless i coment out those two little lines that is).
It allso doesn't matter where they are in the function, the result is still the same.
The odd thing is that it used to work with my previous VBO implementation, and the only change i made to this one is is where the data about the VBO is stored and how it's accesed.
Any thought's?
Mind boggeling bug.
ok i got a bug, a weird one.
this is my VBO rendering code for my main object class
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement