Advertisement

Colour blends go blue!?!

Started by March 07, 2001 10:14 AM
6 comments, last by rhianan 23 years, 8 months ago
I've only just started attempting OpenGL programming. I am running through the tutorials on NeHe and I am starting to have problems. I completed the tutorial (4? 5?) which colours a quad flat blue and a triangle with a blend r->g->b from vertex to vertex. This ran fine but when moving onto tut 6 where rotation is applied I ran into a problem. When I run the rotation code everything (rotation, colour of quad) is fine except for the colouring of the triangle. This is now 100% blue. In the very first frame it isn't, you can sometimes just see this as the app starts. It's not a problem with the code (I don't think) as I downloaded the tut file from NeHe and had the same problem. I've also tried going back to the static tutorial and this now displays the triangle at 100% blue. There is one way to get the triangle to display properly and that is if I change the program to load in 24 bit colour. Can anyone shed some light on this? Tnx. btw: Using NT4 (SP4) with opengl32.dll (version 4.00). + The graphics card is an ATI 3D Rage Pro 8MB. Edited by - rhianan on March 8, 2001 3:52:20 AM
I have moved on to the 5th tutorial (cube and pyramid) and the colour blend is restored. I went back to the flat triangle to check and this still displays blue. What''s going on?
Advertisement
Make sure you''re in the GL_SMOOTH mode. If your not, the whole polygon will be the last color you specify. In this case it looks like blue.

-SirKnight
Does 32-bit color work too? I have an ATI mobility under NT5, and I get the same type of problem, although I get it with lighting under 16-bit color: that which should be white becomes aqua. I guess it''s maybe just an ATI thing...
It''s not cos of GL_SMOOTH, the blue is different. The quad is being shaded with 0.5, 0.5, 0. The triangle is displaying as 0, 1, 0. Also the shademode is set to gl_smooth.

Re: 32 bit mode, I tried it and it is again solid blue. I think this is cos it couldn''t switch to 32 bit and chose 16 instead as it ran exactly the same speed as 16 bit, whereas 24 bit was visibly slower.

I''m beginning to think it''s probably an ATI thing, but the thing that''s strange is that it DID work in 16 bit to start with. The only possible cause I can think of is when I was attmpting to run a program there was a bug in the code and the program exited leaving the display set to 640x480x16x??(prob 60 hz). I then had to reset the display manualy to my desktop settings (1280x1240x16x75hz).
oops, that was me above.
Advertisement
rhianan -

It''s not just you. Disasteroids 3D does the same thing on my laptop, which has an ATI Rage Pro Mobility 8MB video chipset.

I tried adding 24bit color mode to Dis3d, but it didn''t help.

Thom Wetzel
www.LMNOpc.com
I would think that ATI would have a fix for this... I always thought it was a problem I had, but I guess it''s pretty common. I guess I''ll go for nVidia in the future (geForce2Go, woohoo!).

This topic is closed to new replies.

Advertisement