Texture Id VS pointers

Hello,

I’ve been a little bit lost in the threads, what have been
decided as for the Texture access type (ids VS pointers,
or both maybe) ?

Thanks,

Julien CLEMENT

So there’s these constants

/* The list of textures */
SDL_Texture *textures;

and 2 ways to make a texture?

SDL_CreateTexture(Uint32 format, int access, int w, int h)

int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);

Sure looks like you can use both. Nothing stops you from setting
previous,and next pointers to NULL and having a standalone texture
despite the comment suggesting SDL_Texture is always a list.

But SDL seems to be encourage the use of ids over pointers. Judging by
the big leading capital letters and its higher level in the
abstraction chain.On Fri, Feb 19, 2010 at 6:17 AM, julien CLEMENT wrote:

Hello,

I’ve been a little bit lost in the threads, what have been
decided as for the Texture access type (ids VS pointers,
or both maybe) ?

Thanks,

Julien CLEMENT


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

The current thinking is an opaque pointer, to avoid id lookups and
make it easy to debug if you have the SDL source.On Fri, Feb 19, 2010 at 3:17 AM, julien CLEMENT wrote:

Hello,

I’ve been a little bit lost in the threads, what have been
decided as for the Texture access type (ids VS pointers,
or both maybe) ?

Thanks,

Julien CLEMENT


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


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC