View Full Version : The Dark Side Of The QUAD
08-27-2003, 05:12 AM
I'm wandering how do you do when you want to draw a quad that has a texture on one side and looks black from the other side...
Any ideas, other than draw another black quad? http://www.opengl.org/discussion_boards/ubb/smile.gif
08-27-2003, 05:57 AM
it can be done using lighting.
set a white front material, a black back material on the quad, and set the texenv to GL_MODULATE.
it doesn't work for other color (black modulated by a texture is black but yellow modulated by a texture is not yellow).
08-27-2003, 07:36 AM
Only the front of the quad will show.
Two-sided lighting should work too, but is a much bigger burden on the hardware.
08-28-2003, 11:23 AM
However, if you wish for the back of the quad to appear BLACK you cannot use Culling as the cull will simply not render the face, not draw it as Black. Two sided lighting however, will.
[This message has been edited by Clayton (edited 08-28-2003).]
It is possible to do that with back face culling, but you have to draw your object twice; once for front and once for back faces.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.