Sign in to follow this  
lc_overlord

Mind boggeling bug.

Recommended Posts

ok i got a bug, a weird one. this is my VBO rendering code for my main object class
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[s][shInstance]);  //sets the current skin
	
		vbo.renderSub(s);

		tx.unbind();  //sets the current skin
		s++;
	}
		vbo.endRendering();




	glDisable( GL_TEXTURE_2D );
	glColorMask(1, 1, 1, 1);

}





and when i run this nothing happens. Unless i comment out the lines tx.bind(skin[s][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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this