Michael Schnell wrote:
Hi SDL experts,
For a customer I need to create a cross-platform 2D graphic application that
is supposed to do fast panning and zooming of a huge picture. It is supposed
to run in Windows and in Linux environments.
I’d like to use SDL to have the program access the Video hardware in a
I’d like to use OpenGL (and/or DirectX) to grant SDL access to the fast
I did a little test version of some of aspects that application and found
that I need to use a the fast graphic in a (single) Window of the
application. while the rest of the frame should be standard GUI setup. This
does work fine with SDL in Linux and in Windows when I use standard GUI
video mode for SDL. But in Windows I can’t use Direct X. The application
just crashes when the SDL-Windows is initialized while Direct X use is
activated vie the appropriate environment setting. In Linux there is no
Direct X of course . I hope I can get it running in Windows and in
Linux when I use OpenGL. So the next step is testing this.
I recently got an Elsa Victory Erazor video card (RIVA 128 Chip) that I
thought would have OpenGL drivers for Windows and Linux. But I found
neither. (I am very ignorant about how Open GL is to be installed anyway.)
Can anybody tell me how I should proceed ? I easily can buy a Video card,
when this is suggested. But same needs to work with OpenGL in Windows and in
Thanks a lot for any reply !
-Michael Schnell, Krefeld, Germany,
mailto:mschnell at bschnell.de
SDL mailing list
SDL at libsdl.org
I’ll venture to reply, but I can’t gaurentee I’m especially useful. I
have to much learning left to do, myself.
Anyway, and windows openGL: every video card I have messed with does
install OpenGL drivers somewhere. I never have to mess with them, and
they don’t just out and say “here I am.” They just work, and this is
probably your situation as well. The libs and headers for OpenGL are
far more important for a developer, of course, and they come with
VisualC (or whatever tool you are using), not the video card. Linux
OpenGL… ooo, well I can’t remember include+lib locations and names off
of the top of my head, but Linux almost certainly does support OpenGL
acceleration on that video chip. A default Redhat 7.3 install should
set you up (worked for me last time, which is why my memory is fading).
These “standard GUI setup” things you speak of may be outside of the
realm of SDL. (It is also possible that I am confused what you are
talking about.) SDL will give you one window with it’s generic frame.
When I need buttons, I need to draw them myself (and handle clicks
myself, etc). There are SDL libraries for this as well. As far as “the
rest of the frame,” you’ll have to enforce that division youself because
it will all have to be part of the same window. Just draw things where
they belong… I imagine you know what I mean.
As far as directX vs OpenGL, I have found OpenGL works fine for all
platforms (with the possible exception of some persistient full-screen
problems on a few computers). I would recommend you just use OpenGL for
I imagine that you have a method for cleverly reading in from this large
file and converting it to OpenGL or directX textures. SDL’s and
SDL_image’s file readers will not gracefully handle truly large files.
I am also working on a large-image viewer for work (a satallite image
viewer), and I just tiled up the original image so that I didn’t have to
write a sneaky library to read in bits of a monolithic file as needed (I
beleive such libraries do exist, I think gqview ~1.0 uses such a thing,
but it is a RAM hog).
Anyway, I hope some of that was useful.