Blending and lighting problem
I canno get simple blending (transparency effect) to work on a cube. The cube has one different texture on each side, and all its rotation and movement is controlled directly by the user. When blending is turned on, some sides are invisible, have the side opposite of them showing through, or are not affected at all. I''ve debugged for hours, but cannot get it to work.
Also, I''m having a small lighting problem. The light in my program is either on or off. I can''t get it so there is a light source in front of the cube. I''ve defined normals properly, but it still doesn''t work.
The transparency "problem" doesn''t look like a problem with transparency, but rather a problem with depth buffer.
Idem for the "light" problem.
Could you post some screenshots, or maybe some source code ?
Idem for the "light" problem.
Could you post some screenshots, or maybe some source code ?
// Blending ONglEnable(GL_BLEND);// No writing in Z-BufferglDepthMask(0);// Draw your cube// Writing in Z-BufferglDepthMask[1];
In my engine, I use this for drawing the blended polys and I''ve no problem with this.
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement