GUI elements and lighting
GUI elements and lighting
Dunno, maybe it's supposed to be this way but GUI elements are affected by lighting (same thing with 2D images drawn directly as for example a mouse cursor)
If it helps, I use OpenGL and I don't know if this happens with DirectX, as i can't use it. Oh, and it doesn't happen with software rendering.
by doing
driver->setMaterial(nolight);
before drawing the gui elements etc., i can prevent this, but it does seem wierd
If it helps, I use OpenGL and I don't know if this happens with DirectX, as i can't use it. Oh, and it doesn't happen with software rendering.
by doing
driver->setMaterial(nolight);
before drawing the gui elements etc., i can prevent this, but it does seem wierd
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Yeah, but shouldn't lighting be automatically deactivated for the gui?bal wrote:Quite normal I think. They are drawn by the same engine like any other 3d-object. Or is there another explanation?
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Never effected me. Are you sure you haven't got a slight transparancy on the elements? If it is doing that then it definatly isn't normal and is a bug, I'm not sure how the GUI is represented in a 3D engine but even if it is just a billboard attached to the camera at the right point so it looks like a 2D image blitted over the screen then it would have the lighting flag disabled so the lighting wouldn't effect it.
nope, no transparency is set, I had 50% transparency at the beginning as I noticed it so I turned transparency off to see if it is the transparency causing the problem, but it wasn't.
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Compare the first two screen shots (both OpenGL):
http://www.8ung.at/splugs/screen1.jpg
http://www.8ung.at/splugs/screen2.jpg
Another screenshot (DirectX8):
http://www.8ung.at/splugs/screen3.jpg
Apparently the bug only occurs in OpenGL, and seems to be located in the draw2dimage function, as this is also used by the GUI elements.
http://www.8ung.at/splugs/screen1.jpg
http://www.8ung.at/splugs/screen2.jpg
Another screenshot (DirectX8):
http://www.8ung.at/splugs/screen3.jpg
Apparently the bug only occurs in OpenGL, and seems to be located in the draw2dimage function, as this is also used by the GUI elements.
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
You're right there, definatly not transparency. It seems a fairly isolated problem, I wondered if it were a specific device. The tech demo loads lighting from the BSP file, does it show the same problems? I couldn't see any on my computer, I wonder if it's a problem with a certain make of video cards?
Perhaps. I own an ATI Radeon 9700 Pro. Possibly the error lies in my graphic card's opengl implementation.Tyn wrote:You're right there, definatly not transparency. It seems a fairly isolated problem, I wondered if it were a specific device. The tech demo loads lighting from the BSP file, does it show the same problems? I couldn't see any on my computer, I wonder if it's a problem with a certain make of video cards?
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
-
Robomaniac
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
in that case it possibly is not an error but rather something that isn't clearly defined in the OpenGL specs (if or if not camera-space 2d images should be rendered with or without light)Robomaniac wrote:I had this problem on my GeForce4 GO! and my GeForce2
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Yeah, I just checked, it draw2dimage (which in this case seems to be the buggy function) calls setRenderStates2dMode which disables lighting using glDisable(GL_LIGHTING) unless ERM_2D is already set, but if it were it would cause the images to be diplayed using the wrong projection and transformation matrices, which is not the case. Very wierd...niko wrote:Hm strange. I'm nearly sure that the lighting is turned off everywhere for 2d stuff. Maybe it is a problem with the driver you are using.
EDIT: It gets even wierder: if you set a material with lighting turned off the OpenGL driver also calls glDisable(GL_LIGHTING); ...
EDIT2: The error also occurs when using a Geforce 4 MX
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux