PDA

View Full Version : Problem with lighting after rendering Cylinder



bobbie12
04-11-2013, 02:47 AM
Hello, already tried everything and cann't find reason why after rendering Cylinder whole lighting system is not working.
World I'm rendering is full of quads and triangles, and work perfect till I'm not trying to add Cylinder into it.
I'm using LWJGL library - org.lwjgl.util.glu.Cylinder - for rendering cylinder.
Cylinder c = new Cylinder();
c.setTextureFlag(true);
glBindTexture(GL_TEXTURE_2D, textureID);
c.draw(baseRadius, topRadius, height, slices, stacks); - (when this line is commented all works great).
After drawing cylinder all elements get darker, and no mater how far i move camera cylinder is highlighted.