Hi. please look at this piece of code:
SDL_SetColorKey(app, SDL_SRCCOLORKEY | SDL_RLEACCEL ,colorkey );
this, I think, will set the color key value to black on the "bmp"
I use this code to create a surface containing a bitmap font to blit on
my opengl screen.
I blit the characters like this…
all is ok…
In the main part of my Game i use this code to draw my stuffs…
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
cuberot->Set(0.01time,0.03time,0); // this rotates my cude
txt->Write(0,140,“THIS IS THE GAME INTRO”); // this will blit some
txt->Write(0,180,“PRESS ESC TO SKIP”);
engine->DrawAll(); // this will draw my 3d stuffs
SDL_UpdateRect(gamesurface, 0, 0, 0, 0); // this is to update sdl
So… what’s the problem?
Characters are blitted on screen with a black box around… color key
The cube and the strings are drawn in the correct order (strings over
And… what’s my main problem??
I want draw a “hud” display on my opengl screen… obviusly with color