Openglblit

Hi, I’m new to the list, hopefully guessing right
the address where to send…

I was wondering how am I supposed to combine
opengl and normal blitting.

I tried first doing opengl calls, then glFinish()
(whould glFlush() be enough?), then locking the
surface, doing drawing, unlocking, and finally
updaterects, and glswapbuffers.

That worked, expect If I gave larger updaterects
than the single grey rectangle I draw, the rest
of the area was white; it didn’t combine my sdl
blit drawings to the opengl drawings.

My question is: Can I combine opengl and blit
drawings, so that updaterects wont overwrite
opengl graphics where I have not drawn?

Can I use alpha blitting without to combine
opengl and blit graphics?

How?

Thanks!

– Timo Suoranta – @Timo_K_Suoranta

Sorry if this is duplicate message… I’m
not sure if this went to right place in my
first attempt…

I was wondering how am I supposed to combine
opengl and normal blitting.

I tried first doing opengl calls, then glFinish()
(whould glFlush() be enough?), then locking the
surface, doing drawing, unlocking, and finally
updaterects, and glswapbuffers.

That worked, expect If I gave larger updaterects
than the single grey rectangle I draw, the rest
of the area was white; it didn’t combine my sdl
blit drawings to the opengl drawings.

My question is: Can I combine opengl and blit
drawings, so that updaterects wont overwrite
opengl graphics where I have not drawn?

Can I use alpha blitting without to combine
opengl and blit graphics?

How?

Thanks!

– Timo Suoranta – @Timo_K_Suoranta

I’m sorry if this question has been already made, but I need to know if there is
an alternative to SDL_OPENGLBLIT to blit on a opengl screen.

sorry for bad english and thanks

Write your own OpenGL blitting engine. Setup an orthogonal viewing
transformation such that world coordinates equal screen coordinates.
Then use the OpenGL texturing and geometry primitives to render your
graphics.

OR… if you want a shortcut to the above, get David Olofson’s library
glSDL which emulates the SDL Surface API’s with OpenGL.

http://olofson.net/On Wednesday, June 5, 2002, at 09:48 AM, kalidostor wrote:

I’m sorry if this question has been already made, but I need to know if
there is
an alternative to SDL_OPENGLBLIT to blit on a opengl screen.

sorry for bad english and thanks


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Yes, David’s glSDL exists, which is infinitely superior to OPENGLBLIT.
Additionally, test/testgl.c contains code which demonstrates clearly how
to change OpenGL to draw in ortho mode (useful for 2D images!) and changes
the OpenGL coordinates to match the pixel coordinates of the window.

The former is a good solution and I believe is found on the SDL libraries
page. The latter is the best solution and can be found in the SDL source
code.On Wed, Jun 05, 2002 at 04:48:30PM +0200, kalidostor wrote:

I’m sorry if this question has been already made, but I need to know if
there is an alternative to SDL_OPENGLBLIT to blit on a opengl screen.


Joseph Carter I N33D MY G4M3Z, D00D!!!111!!
(Just … don’t ask)

but, then I used an Atari, I was more likely to win the lottery in
ten countries simultaneously than get accelerated X

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020605/88ffc21d/attachment.pgp