[SDL] SDL 1.3 and rendering API state management
david at olofson.net
Tue Sep 5 08:14:47 PDT 2006
On Tuesday 05 September 2006 16:46, Bob Pendleton wrote:
> > The problem is that the SDL_TextureID returned from
> > SDL_CreateTextureFromSurface() is just an internal identifier, and
> > there is no API to get an OpenGL texture name or a Direct3D
> > texture interface object pointer from that.
> That sounds like a minor API bug. You just need an API to let you
> get at the texture id that SDL has hidden away somewhere else. Just
> like the window id hack that is used to get Windows window ids for
> people who want to tweak them directly.
> That is easy enough to add and does not add complexity to the over
> all design.
Yeah, that's what I'm thinking. There is a minor issue though; OpenGL
uses an integer ID, whereas Direct3D uses a pointer to a texture
interface object. I suppose one could typedef something that will
work for both, on a platform by platform basis.
//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 --'
More information about the SDL