--------------0022211E9D1E612C8D636B95
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I am experimenting with SDL, OpenGL with blitting access and SDL_ttf
with blended fonts and can’t seem to get the keying and blending
working.
Starting from the stock gltest.c I’ve added:
…
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, rgb_size[3] );
…
SDL_GL_GetAttribute( SDL_GL_ALPHA_SIZE, &value );
printf( “SDL_GL_ALPHA_SIZE: requested %d, got %d\n”,
rgb_size[3],value);
…
Problem(?): Alpha is reported to be 0.
Text is drawn usiung the code below. It shows a white box only (i.e no
text) while using a solid-mode black/white text drawing works and shows
the text but overwrites the background.
…
screen = SDL_GetVideoSurface();
if (text == NULL) {
text = TTF_RenderText_Blended (font, “Welcome to SDL!”, white);
} else {
dst.x = 100;
dst.y = 100;
dst.w = text->w;
dst.h = text->h;
SDL_BlitSurface(text, NULL, screen, &dst);
SDL_UpdateRects(screen, 1, &dst);
}
…
I also can’t get the icon.bmp’s white background to be keyed to black.
The gltest.c source code mentions some cool effects when changing alpha
setup. Can anyone send me some more specific code.
Any ideas, suggestions, pointers to tutorials or sample code would be
welcome. What I’d like to do is to blit with SDL to a GL window first,
draw GL second and blit again lastly.
Sorry to be so amateurish about this, but I am just starting to use SDL
and haven’t figured everything out yet… My setup for reference: Linux
RH 6.2/SDL 1.1.6/Mingw32-crosscompiled to run on a Voodoo3500 on Win32.
Thanks
Andreas–
| Andreas Schiffler aschiffler at home.com |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |
--------------0022211E9D1E612C8D636B95
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public “-//w3c//dtd html 4.0 transitional//en”>
Hi,I am experimenting with SDL, OpenGL with blitting access and SDL_ttf with blended fonts and can't seem to get the keying and blending working.
Starting from the stock gltest.c I've added:
...
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, rgb_size[3] );
...
SDL_GL_GetAttribute( SDL_GL_ALPHA_SIZE, &value );
printf( "SDL_GL_ALPHA_SIZE:
requested %d, got %d\n", rgb_size[3],value);
...
Problem(?): Alpha is reported to be 0.
Text is drawn usiung the code below. It shows a white box only (i.e no text) while using a solid-mode black/white text drawing works and shows the text but overwrites the background.
...
screen = SDL_GetVideoSurface();
if (text == NULL) {
text = TTF_RenderText_Blended (font, "Welcome to SDL!", white);
} else {
dst.x = 100;
dst.y = 100;
dst.w = text->w;
dst.h = text->h;
SDL_BlitSurface(text, NULL, screen, &dst);
SDL_UpdateRects(screen, 1, &dst);
}
...
I also can't get the icon.bmp's white background to be keyed to black. The gltest.c source code mentions some cool effects when changing alpha setup. Can anyone send me some more specific code.
Any ideas, suggestions, pointers to tutorials or sample code would be welcome. What I'd like to do is to blit with SDL to a GL window first, draw GL second and blit again lastly.
Sorry to be so amateurish about this, but I am just starting to use SDL and haven't figured everything out yet.. My setup for reference: Linux RH 6.2/SDL 1.1.6/Mingw32-crosscompiled to run on a Voodoo3500 on Win32.
Thanks
Andreas
-- | Andreas Schiffler aschiffler at home.com | | 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada | | +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |
--------------0022211E9D1E612C8D636B95–