SDL_PutPuxel/GetPixel and unrelated asm blit question

Hi, before I write these routines, has anyone else done this yet?

Would the SDL core library be interested in these additions? Maybe even
SDL_PutPixels() also for speed…

BTW has anyone looked into the large amount of assembly blit routines that
can be found in other game SDKs like ClanLib and NukeDX? They have some
pretty highly optimised stuff for normal blitting and alpha blitting - SDL
just uses C at the lowest level for this - correct?

Thanks,

Neil

Neil McGill mailto:Neil_McGill . .
Software Developer:ISDN, Cisco Systems Ltd | |
3rd Floor, 96 Commercial Street, Edinburgh, EH6 6LX, UK ||| |||
Tel: 0131 561 3622 Fax: 0131 561 3601 Mob: 07714 226 281 .:|||||:.:|||||:.

Hi, before I write these routines, has anyone else done this yet?

Would the SDL core library be interested in these additions? Maybe even
SDL_PutPixels() also for speed…

BTW has anyone looked into the large amount of assembly blit routines that
can be found in other game SDKs like ClanLib and NukeDX? They have some
pretty highly optimised stuff for normal blitting and alpha blitting - SDL
just uses C at the lowest level for this - correct?
Neil

I think most SDL users manage the frame buffer themselves, as in pixels,
sprites, blits, etc. I know I do. I think in an API when you start adding
higher level functions you demand more trust of people. They have to trust
that you wrote the function well. If I have access to the raw framebuffer
itself I don’t have to extend too much trust. I just have to believe SDL’s
UpdateRect function is as efficient as possible.

Lots of posts coming by about people who want to add stuff to SDL. I think
SDL is fine just as it is, in fact there are a huge number of functions I’m
unaware of and would never use. Why not take them out :^)?

How about instead of tinkering with SDL, use SDL and write some cool game
or demo?

-Dave

Lots of posts coming by about people who want to add stuff to SDL. I think
SDL is fine just as it is, in fact there are a huge number of functions I’m
unaware of and would never use. Why not take them out :^)?

I see Put/GetPixel as pretty fundamental routines. Most people writing a game
will end up writing their own. It might just save time to provide one.

How about instead of tinkering with SDL, use SDL and write some cool game
or demo?

Guess what - that’s what I’m doing, and hit the need for PutPixel/GetPixel

NeilOn Tue, 14 Sep 1999, Dave Ashley wrote:

Neil McGill mailto:Neil_McGill . .
Software Developer:ISDN, Cisco Systems Ltd | |
3rd Floor, 96 Commercial Street, Edinburgh, EH6 6LX, UK ||| |||
Tel: 0131 561 3622 Fax: 0131 561 3601 Mob: 07714 226 281 .:|||||:.:|||||:.

I had a dream last night about OpenGL and SDL. :slight_smile:

Anyway, there’s no reason why you can’t have PutPixel and GetPixel, as
long as the users understand that they can write faster code themselves.
A general putpixel/getpixel routine will almost always be slower than
special case code. In fact, if you read the SDL intro, you’ll see a
general putpixel routine there:
http://www.devolution.com/~slouken/SDL/intro/toc.html

The biggest thing SDL needs right now are joystick routines.

I apologise for my lack of response the past few weeks. I’ve been
swamped. Hopefully this week, I’ll be able to catch up on my e-mail.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

I had a dream last night about OpenGL and SDL. :slight_smile:

Really? Did the dream happen to cover using SDL input functions with
GLUT? (Glut seems to want to take control of the keyboard) :slight_smile:

The biggest thing SDL needs right now are joystick routines.

I have written joystick routines for PowerPak, would you like the file?
I can write SDL compatible code if you’d tell me how you’d like the
functions to be setup.

Neil McGill wrote:> On Tue, 14 Sep 1999, Dave Ashley wrote:

Lots of posts coming by about people who want to add stuff to SDL. I think
SDL is fine just as it is, in fact there are a huge number of functions I’m
unaware of and would never use. Why not take them out :^)?

I see Put/GetPixel as pretty fundamental routines. Most people writing a game
will end up writing their own. It might just save time to provide one.

I can’t agree. If you want fast graphics you most probably
won’t use put/get
pixel but some kind of sprites bliting - simply because
calling this kind of
function for every single pixel is damn slow. And I agree
with Neil that I
prefer using my own blit which I can trust and about which I
know everything…

This is what I like about SDL - it provides simple interface
to framebuffer. Just personal opinion, of course…

Vasek

At 10:08 AM 9/14/99 -0700, you wrote:

The biggest thing SDL needs right now are joystick routines.

Hmmm this sounds interesting, anyone know any sites with some basic info
on getting joystick info in linux? I did some stuff with a joystick before
in DOS, linux is a bit different though.

-Mongoose WPI student majoring in Computer Science
This messge sent from Windoze… ugh.

Garrett Banuk wrote:

At 10:08 AM 9/14/99 -0700, you wrote:

The biggest thing SDL needs right now are joystick routines.

Hmmm this sounds interesting, anyone know any sites with some basic info
on getting joystick info in linux? I did some stuff with a joystick before
in DOS, linux is a bit different though.

Check the articles/tutorials at http://sunsite.auc.dk/linuxgames/ Does
anybody happen to know how to use the joystick in Windows?

You might look in /usr/src/linux/drivers/char/joystick in a recent
kernel to see the kernel interface.

Garrett Banuk writes:> At 10:08 AM 9/14/99 -0700, you wrote:

The biggest thing SDL needs right now are joystick routines.

Hmmm this sounds interesting, anyone know any sites with some basic info
on getting joystick info in linux? I did some stuff with a joystick before
in DOS, linux is a bit different though.

-Mongoose WPI student majoring in Computer Science
This messge sent from Windoze… ugh.

Sorry guys, I wasn’t trying to offend anyone over this 8) It’s just something
that I need right now for my game and thought I’d check here before I wrote
my own code.

And no, I wasn’t suggesting this as equivalent speed to blitting 8) - just
something handy to use when you want to set a few pixels and don’t mind the
speed hit.

Anyway, I’ll write something up and maybe post it by - if anyone needs it, fine.
If not, equally fine.

Neil

As for speed, the only
(and I agree with the speed issue - I wasn’t talkinOn Tue, 14 Sep 1999, Vaclav Slavik wrote:

Neil McGill wrote:

On Tue, 14 Sep 1999, Dave Ashley wrote:

Lots of posts coming by about people who want to add stuff to SDL. I think
SDL is fine just as it is, in fact there are a huge number of functions I’m
unaware of and would never use. Why not take them out :^)?

I see Put/GetPixel as pretty fundamental routines. Most people writing a game
will end up writing their own. It might just save time to provide one.

I can’t agree. If you want fast graphics you most probably
won’t use put/get
pixel but some kind of sprites bliting - simply because
calling this kind of
function for every single pixel is damn slow. And I agree
with Neil that I
prefer using my own blit which I can trust and about which I
know everything…

This is what I like about SDL - it provides simple interface
to framebuffer. Just personal opinion, of course…

Vasek

Neil McGill mailto:Neil_McGill . .
Software Developer:ISDN, Cisco Systems Ltd | |
3rd Floor, 96 Commercial Street, Edinburgh, EH6 6LX, UK ||| |||
Tel: 0131 561 3622 Fax: 0131 561 3601 Mob: 07714 226 281 .:|||||:.:|||||:.

Hmm looking around, this looks fairly simple for linux, I guess I could
start working on it this weekend, right after I do my 3D rendered for
graphics class, fun fun fun… hope I don’t suffer from code burnout…

At 05:39 PM 9/14/99 -0400, you wrote:

You might look in /usr/src/linux/drivers/char/joystick in a recent
kernel to see the kernel interface.

Garrett Banuk writes:

At 10:08 AM 9/14/99 -0700, you wrote:

The biggest thing SDL needs right now are joystick routines.

Hmmm this sounds interesting, anyone know any sites with some basic
info

on getting joystick info in linux? I did some stuff with a joystick before
in DOS, linux is a bit different though.

-Mongoose WPI student majoring in Computer Science
This messge sent from Windoze… ugh.

I think joystick support is covered by DirectInput in the win32 world,
I don’t know how to do it if directx is’nt installed though.

Phoenix Kokido
members.xoom.com/kokido
@Wes_Poole

John Garrison wrote:

Garrett Banuk wrote:

At 10:08 AM 9/14/99 -0700, you wrote:

The biggest thing SDL needs right now are joystick routines.

Hmmm this sounds interesting, anyone know any sites with some basic
info

on getting joystick info in linux? I did some stuff with a joystick
before> > in DOS, linux is a bit different though.

Check the articles/tutorials at http://sunsite.auc.dk/linuxgames/ Does
anybody happen to know how to use the joystick in Windows?

Phoenix Kokido wrote:

I think joystick support is covered by DirectInput in the win32 world,
I don’t know how to do it if directx is’nt installed though.

OK. I guess I’ll take a look at some DirectInput functions one day. Of
course I have no intention of putting that monster of a lib on my CPU,
but Windows developers might do it.

I used to have the DirectX SDK, but the thing took up 60MB so I got
rid of it, it was tough to find because Microsoft makes them
by-cd-only about a month after a version is released. I think it
takes up significantly less space if you remove the examples from it.

Now if you will all excuse me, since I live in South Carolina, I have
a hurricane to prepare for. (Arrrgh!!! Where’s my Linux partition
backup… No!!!)

Phoenix Kokido
members.xoom.com/kokido
@Wes_Poole

John Garrison wrote:> Phoenix Kokido wrote:

I think joystick support is covered by DirectInput in the win32 world,
I don’t know how to do it if directx is’nt installed though.

OK. I guess I’ll take a look at some DirectInput functions one day. Of
course I have no intention of putting that monster of a lib on my CPU,
but Windows developers might do it.