[SDL] Hello, new member reporting
Antonio Marcos
amcmr2003 at yahoo.com.br
Mon Jan 26 05:39:02 PST 2009
> Hey, welcome to the community!
Hey, Thanks! :)
> I don't know how it would work in video memory, but it
> sounds like something
> that can be done (in software, at least) by twiddling with
> void*
> SDL_Surface::pixels and Uint16 SDL_Surface::pitch.
I was thinking about something like that, but I have no idea how the inner workings would proceed to know if its doing th actual thing. I was thinking about creating a bigger resolution surface with the SetVideoMode, get the pointer, and then reset to a lower resolution. The problem with this is that SDL have privileges to work with the hardware (at least on some OS'es i guess), and this would probably bypass it.. also, I dont know if the 'freed' parts of the memory would be used by something else.
> I've never tried it, of
> course, but I hope you can find a way to achieve your
> desired effect.
>
It would be nice because changing a "camera view" would just be a matter of incrementing/decrementing a pointer :)
> Jonny D
AM.
--- Em seg, 26/1/09, Jonathan Dearborn <grimfang4 at gmail.com> escreveu:
> De: Jonathan Dearborn <grimfang4 at gmail.com>
> Assunto: Re: [SDL] Hello, new member reporting
> Para: "A list for developers using the SDL library. (includes SDL-announce)" <sdl at lists.libsdl.org>
> Data: Segunda-feira, 26 de Janeiro de 2009, 11:03
> Hey, welcome to the community!
> I don't know how it would work in video memory, but it
> sounds like something
> that can be done (in software, at least) by twiddling with
> void*
> SDL_Surface::pixels and Uint16 SDL_Surface::pitch.
> I've never tried it, of
> course, but I hope you can find a way to achieve your
> desired effect.
>
> Jonny D
>
>
> On Sun, Jan 25, 2009 at 4:22 PM, David Olofson
> <david at olofson.net> wrote:
>
> > On Sunday 25 January 2009, Donny Viszneki wrote:
> > [...hardware scrolling...]
> > > I could be wrong, but I don't think modern
> graphics hardware
> > > supports this.
> >
> > Actually, most hardware does support it, but it's
> only used
> > for "virtual desktop" (desktop larger than
> the display) and things
> > like that... Probably not very portable or reliable
> stuff, if it's at
> > all accessible to normal applications. (From what
> I've seen of this
> > stuff on Windows, it may as well be internal driver
> hacks.)
> >
> > So, full screen redrawing it is!
> >
> > If performance is an issue, you could implement it
> over OpenGL or
> > Direct3D, for hardware blitting and keeping it all in
> VRAM. With SDL
> > 1.3/2.0, you don't even have to touch those APIs
> directly to do this,
> > and it'll still work with
> "software-only" displays as a fallback.
> >
> > On the bright side, using blitting instead of hardware
> scrolling gives
> > you a lot more freedom when it comes to layering,
> screen layout,
> > blending effects etc.
> >
> >
> > //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
> >
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
More information about the SDL
mailing list