PDA

View Full Version : ARB Extensions



05-05-2004, 09:24 AM
What Libraries do I require to use ARB-extensions such as ARB-Multitexturing

I read somewhere they are implemented in the latest opengl lib and header files but where can I download these?

thx in advance Jan Bop

brcain
05-05-2004, 11:37 AM
The driver provides the pointers to the extensions. Update your driver and get the latest header files from http://oss.sgi.com/projects/ogl-sample/registry.

See the OpenGL Programming Guide (e.g. wglGetProcAddress, glXGetProcAddress, chapter 14 Extension to the Standard)

Here's an example (for glMultiDrawElements) that might help.

Sorry about formatting ... some white space is removed when posting ... not sure why.

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">////////////////////////////////////////////////////////////////////////////////
// Filename : glInterleavedArrays.cpp
//
// Description : OpenGL vertex array example using glInterleavedArrays and
// glMultiDrawElementsEXT.
//
// To compile on Linux, use:
// g++ -o glEdgeFlag *.cpp -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
// -L/usr/lib -L/usr/X11R6/lib
//
////////////////////////////////////////////////////////////////////////////////

#include <stdio.h>

#if defined(WIN32)

brcain
05-05-2004, 11:40 AM
Trying again ...

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">////////////////////////////////////////////////////////////////////////////////
// Filename : glInterleavedArrays.cpp
//
// Description : OpenGL vertex array example using glInterleavedArrays and
// glMultiDrawElementsEXT.
//
// To compile on Linux, use:
// g++ -o glEdgeFlag *.cpp -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
// -L/usr/lib -L/usr/X11R6/lib
//
////////////////////////////////////////////////////////////////////////////////

#include <stdio.h>

#if defined(WIN32)

brcain
05-05-2004, 11:44 AM
Okay ... so maybe posts are limited in size. I'll send example if you e-mail me.

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">#include <GL/glext.h
PFNGLMULTIDRAWELEMENTSEXTPROC glMultiDrawElementsEXT = NULL;

...

#if defined(WIN32)

brcain
05-05-2004, 11:46 AM
Okay ... have no idea what's up with posting. I tried :)

harsman
05-06-2004, 01:50 AM
A simple way to get extensions (and newer core versions than 1.1 on windows) is using an extension loading library such as glew. Quick and easy.

http://glew.sourceforge.net/

There are several others available that do more or less the same thing.

05-06-2004, 10:09 AM
thx for reply I will look into it