I need to create a graphic system where objects should
interact each other commonly as in the real world.
This System will use physical concepts of classic
physics, starting with just Newtonian mechanics.
In for some serious hacking there… 
I?ve got to choose an API for the development and
implementation of this system but I don?t know how to
do it. I?m a beginner with SDL and OpenGL and I?m
amused with both, but then lots of questions came into
my mind, and they will surely affect my decision.
There they are:
Is it possible to use the common (native 2D) SDL
graphic functions altogether with SDL?
(With OpenGL, you mean…?)
Things like
loading images to surfaces and then blitting them to
the screen using surfaces and all other nice cool
things SDL 2D gives us?
Yes, works fine. I rely heavily on that when using glSDL, and inside
glSDL. The only thing you can’t do is blit to the display surface.
(That’s what glSDL does for you, sort of. However, note that glSDL is
not designed to mix with native OpenGL code. If you do OpenGL, do
OpenGL. Better rip code from glSDL if you find it useful, than
actually using glSDL together with OpenGL.)
In fact, I’ve used the SDL s/w blitting stuff for image processing
without even setting up a display, though I’m not sure you’re
really supposed to do that.
If not, is it hard to create and to use functions that
do the same kind of behavior as simple and as easy as
using SDL 2D with SDL/GL?
Well, yes and no. It’s pretty easy to get the job done if you did your
low level computer graphics homework, but it’s a great deal of work
to do it as fast as the SDL s/w blitters. Especially note the RLE
acceleration, which can bost the speed of colorkey and alpha blits
tremendously.
When I try to put a texture in an SDL/GL program, GL
asks for a lot of info about the image, and a pointer
for where the pixels are in memory. Can I load an
image in an SDL Surface, use the pointer to the pixels
given in the surface, and read the image info from the
surface ?header??
Yes.
Will that kind of thing work?
Well, it’s always worked in my code… 
Is
that a stupid way of doing things?
On the contrary, it would be rather stupid to have SDL’s powerful and
carefully tuned s/w blitting code around, and then roll your own just
because your display surface happens to wrap an OpenGL context. 
Are there better
ways?
Not really, provided SDL does the job. You could probably find various
helper libs for this - but the SDL blitters are already there, since
you’re using SDL to set up the OpenGL display…
This project is very important to me and I hope you
can help me! Thanks anyway! I always find relevant
info in this list!
Well, I hope that helped a little. Feel free to look at the code in
glSDL and smoothscroll over at olofson.net;
http://olofson.net/mixed.html
http://olofson.net/examples.html
//David Olofson - Programmer, Composer, Open Source Advocate
.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
— http://olofson.net — http://www.reologica.se —On Thursday 29 April 2004 06.04, Romulo Gnomo wrote: