Archived

This topic is now archived and is closed to further replies.

clum

Help-Everything's yellow! (or, more precisely, not blue)

Recommended Posts

clum    217
In my game (a clone of a fun game - see screenshot), I draw a background (a textured quad) that covers the entire screen. Then, I draw another background over only the playing area, with no texture and just some nice color blending (temporarily, evetually that will also be texture mapped). Then it draws the bubbles (that''s a hint to what game it is) using masks. The problem is that both the bubbles and the masks of the bubbles aren''t displaying blue! To demonstrate the problem further, I replaced the background with the bubble that''s supposed to be blue but is appearing green. There''s also a yellow halo around each bubble because the white is appearing as red and green without blue which makes yellow. The white bubble also has yellow where its supposed to be white. Here''s a screenshot: (click on the thumbnail to enlarge) (sorry about the bad jpeg compression) Help!

Share this post


Link to post
Share on other sites
rodzilla    133
Could this be a RGB / BGR (or similar) problem ?

If you''re using SDL/SDL_image to load image files, you should check the SDL_Surface''s format before creating the texture.

BTW, you''re not re-creating the excellent Frozen Bubble, do you ? ;*)

Share this post


Link to post
Share on other sites
lc_overlord    436
Check so that you don''t have a bad glColor, set it to glColor3f(1,1,1); just before rendering the polygons.

glColorMask could allso be acting up, it should be glColorMask(1, 1, 1, 1);

To me it looks like your texture loading works fine, the problem is in the rendering.

Post some code if you can''t find the problem.

Share this post


Link to post
Share on other sites
clum    217
You''re right - thank you. In between rendering the drawing of the backgrounds and the drawing of the bubbles, I called glColor3d. You see, when I was designing the game, I used temporary solid color objects to represent the behind-the-scenes of the game. Now that I''m switching over to a publishable graphics system, I''m changing everything into texturemapped objects a bit at a time. The color was changed to yellow for the arrow pointy thingy at the bottom and was never changed back to white for the rendering of the rest of the frame (though it was changed to white at the beginning of the frame so the background was working fine).

Share this post


Link to post
Share on other sites