http://icculus.org/twilight/release/dyngl3-0.zip
dyngl.c should explain more or less how to use it. Note that all OpenGL
functions are prefixed by q. Example, glColor4fv becomes qglColor4fv. We
do this because the qgl namespace is already used for this by Quake 2/3,
making it essentially forever safe to use. The functions are all
documented as to when to call them and such.
If you understand how SDL handles OpenGL, this works the same way… It
just has more types of function macros is all:
DYNGL_NEED (void, glBegin, (GLenum mode))
DYNGL_WANT (void, glDrawRangeElements, (GLenum, GLuint, GLuint, GLsizei,
GLenum, const GLvoid *), Alt_glDrawRangeElements)
DYNGL_EXT (void, glDrawRangeElementsEXT, (GLenum, GLuint, GLuint, GLsizei,
GLenum, const GLvoid *), “GL_EXT_draw_range_elements”)
The first is a required function - the program will not run without this.
The second is a function whose nonexistance is nonfatal. In this case,
glDrawRangeElements - not always available, but nice enough to use when it
is. The last parameter to the macro is the name of an alternative
function which implements the missing function, or NULL. Note if you use
NULL, you can shoot yourself in the foot.
The third is an extension. (The function Alt_glDrawRangeElements will
use glDrawRangeElementsEXT if it’s not NULL or fall back to lesser means
if it must…) Self-explanitory.
There are no docs except those in the code. The dglfuncs.h file contains
only those functions used by Project: Twilight, not those which are useful
for tutorials or other projects - I intend to do this at some point, but
you’re quite welcome to beat me to it if you like. =)
Basically, you make sure dyngl.c gets compiled in to your project and you
include dyngl.h in place of SDL_opengl.h. Then right after you open your
OpenGL context, call DynGL to have it get all of your function pointers.
In lieu of real docs, please feel free to ask me if you have any questions
with it.On Fri, Aug 02, 2002 at 12:11:56PM +0200, Florian Schulze wrote:
Just tell me where I can get DynGL 3 and how I can use it, then I’ll be
happy.
–
Joseph Carter <-- That boy needs therapy
<Apple_IIe> anyone seen my 80 column card?
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020802/39062ae7/attachment.pgp