Thanks Smirk!
What parts of a GUI would the SDL non-GL API be good for and what parts would
the OpenGL API be good for?
To help narrow this question, I’ll provide that I’m going to want to have
per-pixel combined per surface alpha blending to do things like fade out an
RGBA image brought in from a PNG file. It seems that I’d need to iterate over
the pixels of the PNG and modify the alpha channel level for each pixel to
account for the surface level alpha I’m trying to set. I would then want to
arrange text onto this surface. Also, I’ll need to do simple per surface alpha
blending on scalled RGB images with text arranged on them. This type of thing
seems more straight-forward to accomplish using or modifying SDL’s blit
methods. Is this the case?
From what I remember, OpenGL is a little more involved in using a "perspective"
and so on, and removes the developer from some low level simple things I’m
trying to accomplish in most cases - e.g. alpha blending, blitting, scalling,
moving, (no rotation, no 3d rotation in most cases). If so, how should certain
components on the screen be made to use SDL blitting and other API, and some to
use OpenGL?
Should I use SDL_BlitSurface for the ‘simple’ stuff and use OpenGL for the
rotation stuff? Or what is a generally good way to break it up?
Also, having devided the work between SDL_BlitSurface and OpenGL API, how are
the two used together?
Is it just an SDL_Flip after the
glBegin(GL_QUADS);
…
glEnd();
I suppose the z-order on the components on the screen will still be set by what
is drawn when.
I.e.,
SDL widget 1 drawn,
glBegin, glEnd polygons drawn,
SDL widget 2 drawn
SDL_Flip
will produce images on the screen in that z-order. Is it as simple as that?
Thanks!
Gary
= = = Original message = = =
If you want to get the most out of hardware accelerated graphics in 2D
or 3D, you should be using OpenGL. There are several OpenGL-native
font-drawing libraries available (some of them are pretty bad, but I’ve
heard good things about gltt.) Also there is an OpenGL-native SVG
rendering library which is thoroughly mediocre, can be found at
svgl.sf.net. I don’t know if the SVG rendering library allows you to
rotate the SVG using its API, however if it preserves the OpenGL
transformation matrix then you should have no problem rotating them on
your own.On Aug 10, 2005, at 2:27 PM, G B wrote:
Hi All,
Do most GUI toolkits (GTK2, QT, Java Swing, etc.) utilize 2D HW
support in
their 2D API calls to do everything from drawing and rotating lines to
rotating
and scaling vector based graphics and fonts? How about support for
rotating
non-vector based graphics (e.g., bitmaps, JPEGs, PNGs, etc.)?
How does SDL compare with these toolkits on these issues?
Thanks!
GB
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com