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

Started by
3 comments, last by clum 20 years, 7 months ago
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!
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
Advertisement
Oh, I forgot - OpenGL and SDL on SuSE Linux - nVidia GeForce2 32MB.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
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 ? ;*)
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
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.
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).
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)

This topic is closed to new replies.

Advertisement