[SDL] SDL_OPENGLBLIT
St0fF 64
st0ff at gmx.net
Sun Feb 17 15:53:01 PST 2002
Hi!
I read the previous solution to your problem, and I gotta say that this one
is not very intelligent.
Try this one:
// render 3d ...
glRasterPos2f(rx,ry); // you gotta try which rx,ry are best
glDrawPixels(draw your bitmap);
This is a much easier version, isn't it?
St0fF 64
At 12:13 14.02.2002 +0100, you wrote:
>Hello everybody, this is my first post here and i'm very new to SDL, but
>not with OpenGL.
>
>I'm trying to work using blit for rendering 3d with OpenGl and 2d with SDL
>in the same screen ... but i find a problem
>
>I open Sdl with SDL_OPENGLBLIT flag in SetVideMode, but after OpenGl rendering
>that comes well,i don't be able to render a bmp into screen surface ...
>this is code
>
>SLD_Surface *screen;
>
>{
>
> ...
> screen=SDL_SetVideoMode(640, 480, 16, SDL_OPENGLBLIT);
>
> ...
>
> // main loop
> { DrawGLScene();
> Render2d();
> ... // key control
>
> }
>quit();
>}
>
>void Render2d()
>{
> SDL_Rect *rects;
> rects->x=100;
> rects->y=100;
> rects->w=bmp->w;
> rects->h=bmp->h;
> // screen=SDL_GetVideoSurface(); I try with this line
> SDL_BlitSurface(bmp,NULL,screen,rects);
> SDL_UpdateRects(screen,1 , rects);
>}
>
>Excuse for bad english,i'm italian
>See you
>
>
>
>
>
>
>__________________________________________________________________
>Abbonati a Tiscali!
>Con Tiscali By Phone puoi anche ascoltare ed inviare email al telefono.
>Chiama Tiscali By Phone all' 892 800 http://byphone.tiscali.it
>
>
>
>
>
>_______________________________________________
>SDL mailing list
>SDL at libsdl.org
>http://www.libsdl.org/mailman/listinfo/sdl
More information about the SDL
mailing list