SDL_SetClipping OBSOLETE?

Is anybody using SDL_SetClipping()?
It would greatly simplify the blitter if the function was removed, and
feedback I’ve gotten mostly say that it’s a useless function. If nobody
is using it, I would like to deprecate it and remove it before SDL 1.2

http://sdldoc.sourceforge.net/r943.htm

Comments?
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sam Lantinga writes:

Is anybody using SDL_SetClipping()?
It would greatly simplify the blitter if the function was removed, and
feedback I’ve gotten mostly say that it’s a useless function. If nobody
is using it, I would like to deprecate it and remove it before SDL 1.2

Http://sdldoc.sourceforge.net/r943.htm

I personally wouldn’t mind see it going (never used it). BTW, this
statement:

: Note that blits are automatically clipped to the edges of the source
: and destination surfaces.

Is that true? From what I have noticed, a blit that falls outside the
(destination) surface is not done at all…?–
[ Below is a random fortune, which is unrelated to the above message. ]
Fortune finishes the great quotations, #3

Birds of a feather flock to a newly washed car.

“Sam Lantinga” wrote in message
news:E13HAwf-0008Rv-00 at roboto.devolution.com

Is anybody using SDL_SetClipping()?
It would greatly simplify the blitter if the function was removed, and
feedback I’ve gotten mostly say that it’s a useless function. If nobody
is using it, I would like to deprecate it and remove it before SDL 1.2

Destination-surface clipping would be useful, as it would allow one to draw
a section of the game world clipped to a section of the screen/window
without explicitly passing source and destination rectangles.
Source-surface clipping is indeed useless.–
Rainer Deyke (root at rainerdeyke.com)
Shareware action/role-playing games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

I am designing a 2D game in a 800x600 window. The actual game playarea is
in a 640x480 window in the middle. I clip to that window and update the
game area at a much faster rate than the outside menu area. The outside
menu area is only updated when necessary.

Suggestions are welcome, but I curently use clipping.–
Brian

On 25 Jul 2000, David Hedbor wrote:

Sam Lantinga writes:

Is anybody using SDL_SetClipping()?
It would greatly simplify the blitter if the function was removed, and
feedback I’ve gotten mostly say that it’s a useless function. If nobody
is using it, I would like to deprecate it and remove it before SDL 1.2

Http://sdldoc.sourceforge.net/r943.htm

I personally wouldn’t mind see it going (never used it). BTW, this
statement:

: Note that blits are automatically clipped to the edges of the source
: and destination surfaces.

Is that true? From what I have noticed, a blit that falls outside the
(destination) surface is not done at all…?


[ Below is a random fortune, which is unrelated to the above message. ]
Fortune finishes the great quotations, #3

Birds of a feather flock to a newly washed car.

Source-surface clipping is indeed useless.

I use it now, but for what I do, destination clipping would probably be
more ideal.–
Brian

I for one have never used it>From: Sam Lantinga

Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: [SDL] SDL_SetClipping OBSOLETE?
Date: Tue, 25 Jul 2000 13:04:53 -0700

Is anybody using SDL_SetClipping()?
It would greatly simplify the blitter if the function was removed, and
feedback I’ve gotten mostly say that it’s a useless function. If nobody
is using it, I would like to deprecate it and remove it before SDL 1.2

http://sdldoc.sourceforge.net/r943.htm

Comments?
-Sam Lantinga, Lead Programmer, Loki Entertainment Software


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

I was going to say the same thing, the clipping not so much obsolete as
backwards. I tried the SDL source clipping, but we had switched from MGL,
which has destination clipping, and things just got confused, so I
implemented my own destination clip. A destination clip is very useful for
dirty-rectangle updating.
–Manny

Destination-surface clipping would be useful, as it would allow one to draw>a section of the game world clipped to a section of the screen/window

without explicitly passing source and destination rectangles.
Source-surface clipping is indeed useless.

Destination-surface clipping would be useful, as it would allow one to draw
a section of the game world clipped to a section of the screen/window
without explicitly passing source and destination rectangles.

Since both source and destination clipping can be done easily by user code,
I don’t think SDL should implement it since it will just slow down the
common case. If you don’t want to supply destination clip rectangles,
you can easily write a wrapper around SDL_BlitSurface

Sam Lantinga wrote:

Is anybody using SDL_SetClipping()?

Not here, but that’s because I switched to SDL from XLib, and had
already written my own clipping. I can’t say if it’s really obsolete,
as I haven’t tried it.

“Mattias Engdeg?rd” wrote in message
news:200007252216.AAA19299 at leo.nada.kth.se

Destination-surface clipping would be useful, as it would allow one to
draw

a section of the game world clipped to a section of the screen/window
without explicitly passing source and destination rectangles.

Since both source and destination clipping can be done easily by user
code,
I don’t think SDL should implement it since it will just slow down the
common case. If you don’t want to supply destination clip rectangles,
you can easily write a wrapper around SDL_BlitSurface

If SDL automatically clips to surface boundaries, then there is a speed
advantage if SDL manages all clipping. If it doesn’t, there is no advantage
either way.–
Rainer Deyke (root at rainerdeyke.com)
Shareware action/role-playing games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

If SDL automatically clips to surface boundaries, then there is a speed
advantage if SDL manages all clipping. If it doesn’t, there is no advantage
either way.

SDL already clips to both source and destination surface boundaries, as
well as to the source and destination rectangles passed to SDL_BlitSurface.
That behaviour will not change.

Putting stuff in SDL does not make it free in any way. If it has to clip to
yet another rectangle, then that costs incurs on every blit, even if it
is not needed.

The idea is not to add an additional clip, but to reduce the single
destination clip to a smaller rectangle.
–Manny>Putting stuff in SDL does not make it free in any way. If it has to clip to

yet another rectangle, then that costs incurs on every blit, even if it
is not needed.