Hi guys,
In my application there is a framework, which renders models in the screen. Everything worked alright, but when I changed the rendering part to draw the Bounding boxes of the skeleton I got something pretty strange. Even setting the boxes to be red, some of them remained black:
I do not have any clues, since I modified a lot of the rendering parts and make sure that every model was being called with the exact same opengl settings.
The following code is called in the rendering part, after disabling any shaders.
void drawReducedSkeleton()
{
glPushAttrib(GL_ALL_ATTRIB_BITS);
glDisable(GL_LIGHTING);
--drawing bounding boxes
for all bones
{
glColor3f(1.0f,0.0f,0.0f);
//glColor4f (1.0f, 0.0f, 0.0f,0.2f);
glBegin(GL_QUADS);
glVertex3f(max[0],max[1],min[2]);
glVertex3f(min[0],max[1],min[2]);
glVertex3f(min[0],max[1],max[2]);
glVertex3f(max[0],max[1],max[2]);
glVertex3f(max[0],min[1],max[2]);
glVertex3f(min[0],min[1],max[2]);
glVertex3f(min[0],min[1],min[2]);
glVertex3f(max[0],min[1],min[2]);
glVertex3f(max[0],max[1],max[2]);
glVertex3f(min[0],max[1],max[2]);
glVertex3f(min[0],min[1],max[2]);
glVertex3f(max[0],min[1],max[2]);
glVertex3f(max[0],min[1],min[2]);
glVertex3f(min[0],min[1],min[2]);
glVertex3f(min[0],max[1],min[2]);
glVertex3f(max[0],max[1],min[2]);
glVertex3f(min[0],max[1],max[2]);
glVertex3f(min[0],max[1],min[2]);
glVertex3f(min[0],min[1],min[2]);
glVertex3f(min[0],min[1],max[2]);
glVertex3f(max[0],max[1],min[2]);
glVertex3f(max[0],max[1],max[2]);
glVertex3f(max[0],min[1],max[2]);
glVertex3f(max[0],min[1],min[2]);
glEnd();
}
glPopAttrib();
I think it is not related to it, though this code renders to a FBO, but changing it to render to the screen did not solve the issue either way.
I am on this for more than a week, so I appreciate any feedback.
Do you happen to have faced something similar?
Any tips?