2-d Accelerated Drawing - What are the options when using SDL?

2-d Accelerated Drawing - What are the options when using SDL ?

Hi,

I need hardware acceleration
of simple 2-dimensional images
and text being drawn to the screen.
I know nothing about OpenGL.
Is there a simple way to do this
or I have to learn OpenGL?

Jesse “JeZ+Lee” Palser
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

Troll response:

Put your development work space on a notebook and code while in a moving car.

More APT response:

Under win32, you can tell it to take advantage of DX, but that might
break. Under X11, I believe you can try to make it use DGA, but
that’s… meh.

OGL is probably your best bet, and there are several libraries out
there for doing 2D over OGL in SDL. Sadly, I can’t recall names at
the moment.

-WillOn Thu, Jul 24, 2008 at 7:34 PM, Jesse P. wrote:

2-d Accelerated Drawing - What are the options when using SDL ?

Hi,

I need hardware acceleration
of simple 2-dimensional images
and text being drawn to the screen.
I know nothing about OpenGL.
Is there a simple way to do this
or I have to learn OpenGL?

Jesse “JeZ+Lee” Palser
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That’s what glSDL is for. :slight_smile:

Alternatively, you can use SDL 1.3, which has accelerated backends for
OpenGL and Direct3D integrated.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Friday 25 July 2008, Jesse P. wrote:

2-d Accelerated Drawing - What are the options when using SDL ?

Hi David,

I am currently using the current version of the stable 1.2 branch.

Is SDL 1.3 stable enough for a Windows/Linux/MacOSX cross-platform video
game?

Above question is for everyone…

JeZ+Lee
of
Silent Hero Productions®

David Olofson wrote:> On Friday 25 July 2008, Jesse P. wrote:

2-d Accelerated Drawing - What are the options when using SDL ?

That’s what glSDL is for. :slight_smile:

Alternatively, you can use SDL 1.3, which has accelerated backends for
OpenGL and Direct3D integrated.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --’


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Uhm, that said, if your application basically won’t run at all without
full acceleration, maybe using OpenGL directly actually is the right
way of doing it.

Unfortunately, you also need Direct3D support if you want your average
Windows user to be able to run your application without installing
drivers, though how much of an issue that is depends on your target
audience, I guess.

glSDL supports only OpenGL, so using that doesn’t really buy you
anything compared to using OpenGL directly - except that you’ll be
able to port rather easily to SDL 1.3/2.0, and get “free” Direct3D
support that way.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Friday 25 July 2008, David Olofson wrote:

On Friday 25 July 2008, Jesse P. wrote:

2-d Accelerated Drawing - What are the options when using SDL ?

That’s what glSDL is for. :slight_smile:

Unfortunately, you also need Direct3D support if you want your average
Windows user to be able to run your application without installing
drivers, though how much of an issue that is depends on your target
audience, I guess.

The average Windows user these days has bought a new computer sometime in the last several years since 3D graphics cards with OpenGL drivers preloaded became standard-issue. Which doesn’t mean they’ll necessarily have one that supports the latest version of OpenGL with all the newest extensions, though. But Windows users not having OpenGL available ought to be a non-issue these days.>----- Original Message ----

From: David Olofson
Subject: Re: [SDL] 2-d Accelerated Drawing - What are the options when using SDL ?

2-d Accelerated Drawing - What are the options when using SDL ?

That’s what glSDL is for. :slight_smile:

Uhm, that said, if your application basically won’t run at all without
full acceleration, maybe using OpenGL directly actually is the right
way of doing it.

Unfortunately, you also need Direct3D support if you want your average
Windows user to be able to run your application without installing
drivers, though how much of an issue that is depends on your target
audience, I guess.

Maybe this was true way back when NT 4 was around, but AFAIK, all major
vendors bundle both DX & openGL drivers with their driver packages.
Which pretty much means that you can use openGL as easily as DX.On 7/24/08, David Olofson wrote:

On Friday 25 July 2008, David Olofson wrote:

On Friday 25 July 2008, Jesse P. wrote:

But Windows users not having OpenGL available ought to be a non-
issue these days.

It is totally still an issue. Integrated video abounds, and OpenGL is
useless unless users have an ATI or nVidia card and/or are savvy
enough to install drivers . Even then, OpenGL support is pretty
terrible among integrated chipsets, and annoying bugs have begun
appearing even in the recent Catalysts. What a gloomy future for
OpenGL games :frowning:

GregoryOn Jul 24, 2008, at 9:19 PM, Mason Wheeler wrote:

True. In my laptop, I have an Intel integrated video chipset which -
according to the Intel homepage - supports OpenGL, even v2.0. I have
installed all the necessary drivers, but SDL (1.2) still uses the same
old (software based) Microsoft OpenGL implementation.

Z.On Fri, Jul 25, 2008 at 3:40 AM, Gregory Smith wrote:

It is totally still an issue. Integrated video abounds, and OpenGL is
useless unless users have an ATI or nVidia card and/or are savvy enough to
install drivers . Even then, OpenGL support is pretty terrible among
integrated chipsets, and annoying bugs have begun appearing even in the
recent Catalysts. What a gloomy future for OpenGL games :frowning:

Hello !

True. In my laptop, I have an Intel integrated video chipset which -
according to the Intel homepage - supports OpenGL, even v2.0. I have
installed all the necessary drivers, but SDL (1.2) still uses the same
old (software based) Microsoft OpenGL implementation.

I can only guess here. Maybe somehow the MS OpenGL DLL
is getting in the way and is loaded first.

I am not sure, but i think you can tell SDL where to look
for this DLL.

Another way would be to rename the MS OpenGL DLL to something
like opengldll.backup and then see if SDL finds then the right
DLL or copy it where opengldll.backup is now.

CU

Hello !

True. In my laptop, I have an Intel integrated video
chipset which -
according to the Intel homepage - supports OpenGL,
even v2.0. I have
installed all the necessary drivers, but SDL (1.2)
still uses the same
old (software based) Microsoft OpenGL implementation.

I can only guess here. Maybe somehow the MS OpenGL DLL
is getting in the way and is loaded first.

I am not sure, but i think you can tell SDL where to look
for this DLL.

Another way would be to rename the MS OpenGL DLL to
something
like opengldll.backup and then see if SDL finds then the
right
DLL or copy it where opengldll.backup is now.

C:\WINDOWS\system32\opengl32.dll and glu32.dll are the appropriate files. The version numbers shown in explorer can be confusing as they may be the manufacturer driver revision number (as with nVidia).

However. If you have to do this they’ve clearly not been installed properly by the manufacturer, this is the only place these drivers should be as has been the case since Win95. If they’re not going to be properly installed on your computer you can’t assume that someone with a great deal less computer savvy will be able to work around this if they have this problem.

This is why casual games sites don’t like OpenGL. A significant proportion of their customers have computers with integrated chipsets. It doesn’t matter who’s to blame, if a game doesn’t work on the computer of a potential customer that’s a lost sale so if you want even the slightest shot of being promoted on the front page you’ll avoid it.

For now you could have a look at SDL_GFX ( http://www.ferzkopp.net/joomla/content/view/19/14/ ) or SGE ( http://www.etek.chalmers.se/~e8cal1/sge/index.html ). They’re not perfect but they could be useful. Oh, and only use software surfaces for pure 2D blitting, hardware surfaces have to be pulled to main memory before anything can be done with them.— On Fri, 7/25/08, Torsten Giebl wrote:

From: Torsten Giebl
Subject: Re: [SDL] 2-d Accelerated Drawing - What are the options when using SDL ?
To: sdl at lists.libsdl.org
Date: Friday, July 25, 2008, 6:12 AM

Hello !

C:\WINDOWS\system32\opengl32.dll and glu32.dll are the appropriate

If you have somewhere the opengl32.dll and glu32.dll
for your card and know exactly these are the right ones,
an easy thing you could try copy them into the same directory
where your exe is.

CU

Hi,

I’m pretty sure that all mainstream manufacturers (Intel, NVIDIA, ATI)
use an ICD (installable client driver) model now as opposed to a
replacement opengl32.dll (such as the 3dfx “miniport”). So if you have
to copy an opengl32.dll around, you’re almost certainly dealing with a
woefully out of date driver.

My 2p regarding acceleration is that you have 4 choices:

  1. Do without.
  2. Use OpenGL, which is nice and integrated with SDL, cross platform,
    but be prepared for bug reports due to missing/old/bad drivers.
  3. Use Direct3D, which is easy enough to use with SDL but is Windows only.
  4. Use Direct3D on Windows and OpenGL on other platforms. (Adds a
    layer of abstraction/complexity to your code.)

Peter

2008/7/25 Torsten Giebl :> Hello !

C:\WINDOWS\system32\opengl32.dll and glu32.dll are the appropriate

If you have somewhere the opengl32.dll and glu32.dll
for your card and know exactly these are the right ones,
an easy thing you could try copy them into the same directory
where your exe is.

CU


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,

I’m pretty sure that all mainstream manufacturers
(Intel, NVIDIA, ATI)
use an ICD (installable client driver) model now as opposed
to a
replacement opengl32.dll (such as the 3dfx
"miniport"). So if you have
to copy an opengl32.dll around, you’re almost certainly
dealing with a
woefully out of date driver.

Wow, um, been a while since someone knew something so basic that I didn’t know. I’m getting slow (yes, I did find nvoglnt.dll).— On Fri, 7/25/08, Peter Mackay <mackay.pete+sdl at gmail.com> wrote:

From: Peter Mackay <mackay.pete+sdl at gmail.com>
Subject: Re: [SDL] 2-d Accelerated Drawing - What are the options when using SDL ?
To: “A list for developers using the SDL library. (includes SDL-announce)”
Date: Friday, July 25, 2008, 7:38 AM

Gregory Smith wrote

But Windows users not having OpenGL available ought to be a non-
issue these days.

It is totally still an issue. Integrated video abounds, and OpenGL is
useless unless users have an ATI or nVidia card and/or are savvy
enough to install drivers . Even then, OpenGL support is pretty
terrible among integrated chipsets, and annoying bugs have begun
appearing even in the recent Catalysts. What a gloomy future for
OpenGL games :frowning:

You can’t trust any opengl drivers on windows thanks to the untrustworthy
ones that lie about features and crash leaving the user’s monitor in
bizzarro states.

Windows OpenGL is dead to me.

RF> On Jul 24, 2008, at 9:19 PM, Mason Wheeler wrote:

For now you could have a look at SDL_GFX ( http://www.ferzkopp.net/joomla/content/view/19/14/ ) or SGE ( http://www.etek.chalmers.se/~e8cal1/sge/index.html ). They’re not perfect but they could be useful. Oh, and only use software surfaces for pure 2D blitting, hardware surfaces have to be pulled to main memory before anything can be done with them.

Where’s the love? SGE is 5 years old without an update. Check out Sprig.

http://pubpages.unh.edu/~jmb97/SPriG.html

Jonny D

This is why casual games sites don’t like OpenGL. A significant proportion of their customers have computers with integrated chipsets. It doesn’t matter who’s to blame, if a game doesn’t work on the computer of a potential customer that’s a lost sale so if you want even the slightest shot of being promoted on the front page you’ll avoid it.

this is all microsofts poor business practices, giving in to that is bad.
i have not worked opengl yet, but intend on adding to my project. not
sure ill add directx, if i do it would only be to keep my code in check
and modular.

matt

Yeah, it is - but unfortunately, it may be the only option unless you
want to cut your sales in half. :-/

IMHO, the sensible and politically correct solution is to support
both OpenGL and Direct3D, and to actually make use of the OpenGL
portability by supporting a few non-Windows platforms. That way,
casual gamers on Windows have a much better chance of playing your
games, and you still defeat the apparent main point with Direct3D:
Locking everyone into the Windows platform.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Saturday 26 July 2008, mattmatteh at mac.com wrote:

This is why casual games sites don’t like OpenGL. A significant
proportion of their customers have computers with integrated
chipsets. It doesn’t matter who’s to blame, if a game doesn’t work
on the computer of a potential customer that’s a lost sale so if
you want even the slightest shot of being promoted on the front
page you’ll avoid it.

this is all microsofts poor business practices, giving in to that is
bad.

True. In my laptop, I have an Intel integrated video chipset which -
according to the Intel homepage - supports OpenGL, even v2.0. I have
installed all the necessary drivers, but SDL (1.2) still uses the same
old (software based) Microsoft OpenGL implementation.

An important detail is that SDL 1.2 doesn’t normally use OpenGL, it
only wraps WGL/GLX/CGL so that you don’t have to worry about the
details of setting up an OpenGL window on various platforms.

So whether it’s software-based or not, if you’re only using SDL
primitives, Microsoft OpenGL has nothing to do with it (unless you
tweaked some stuff that had big warnings around it saying “do not use,
broken”, in which case, well, it’s normal if it’s broken).On Thu, Jul 24, 2008 at 10:59 PM, Hajd? Zolt?n wrote:


http://pphaneuf.livejournal.com/