[SDL] SDL 1.3 and rendering API state management
david at olofson.net
Tue Sep 5 08:57:46 PDT 2006
On Tuesday 05 September 2006 17:31, Bob Pendleton wrote:
> > 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.
> I wouldn't even bother with a typedef. Just have one function for
> OpenGL and one for Direct3D. If there are others then add specific
> functions for them. This is not cross platform functionality and it
> should not look like cross platform functionality.
Yeah, you're right, of course. Unless you code for OpenGL or Direct3D,
you don't even care if these calls exist. (Though it's probably nice
if there are dummies even if you build SDL without OpenGL and/or
Direct3D renderers, just so add-on libs will still compile.)
//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