ports between SGi's and Win32 using glut

I have been doing a load of coding stuff for a uni project, some has been developed on Irix, some on win32. All of this has been using glut. But now I have two problems.

I have two questions:

  1. I need to access a hi-res frame counter on the SGi’s. I have that sorted on win32, but I haven’t been able to impliment an irix equivalent. Any suggestions?

  2. I wish to make use of various openGL extensions on win32, that I do not have access to on SGi’s. Although I’ve downloaded quite a few examples, they all seem to be using VC++. I’m only used to makefiles, so although I try to reproduce all that is listed in the code, I still get linker errors. Is there another .dll or lib I need in order to get these to compile. It never seems to work otherwise.

Any help offered is greatly appreciated


I have used both the profile database (libpdb) and the high res counter on our onyx to get frame rates. I am not sure where the man stuff is located for pdb, but I remember having to install new packages from Irix6.5 to get hold of it.

libpdb is in


if you install the ?!something?! package.

alternatively, check out syssgi manpage and the example of getting to the high resolution clock.

hope this helps,

Get GCC for win32, you can get ports of GNU make and other tools too.


What are the linker errors you get ? missing extensions functions or something else ?

unresolved external glMultitexcoordARB2f

(or something like that)

cheers for the info on the clock.

multi-texturing isn’t supported on Onyx. I think that the Onyx is only OpenGL 1.1 compliant under Irix 6.5, and multi-texturing is an extension which doesn’t necessarily have to be implemented for core functionality.

So that’s probably where the unresolved external error message is coming from.

You need to check if the extension is defined - glutExtensionSupported is a good way to start. Then code appropriately for the hardware.

The Onyx has a load of bandwidth so a multi-pass approach would probebly work well on this machine and use multi-texturing on machines which do support it.

You miss understand,

I’ve coded a load of stuff on irix, but now wish to port some of that to Win32, but adding in openGL extensions that werent available before.

ie, add multitexturing into the PC version for example.

However, I’m new to this extensions stuff and can’t get it to work. I can compile the original source on PC; but I can’t get any extensions to work.

I have the glext.h, and set it up as I best know how, but it doesn’t compile.

From what I can work out, it knows that the function is defined, it just can’t link to it.

FYO I’m using glut with Borlands command line compiler.

Is there another lib or something in order to get it to work or am I being a bit thick?

[This message has been edited by Rob The Bloke (edited 09-21-2000).]

Multitexturing is also not inherently supported by Windows OpenGL. Under Windows, you need to query the GL extensions string to see if the appropriate extension is supported, and then use wglGetProcAddress() to load the proceedure into your own function pointer at run time. For example:

void (APIENTRY *glMultiTexCoord2fvARB)(GLenum target, const GLfloat *v);
char *gl_extentions;

gl_extentions= glGetString(GL_EXTENSIONS);

if (gluCheckExtension(“GL_ARB_multitexture”, gl_extentions))
glMultiTexCoord2fvARB= (void *)wglGetProcAddress(“glMultiTexCoord2fvARB”);
glMultiTexCoord2fvARB= NULL;

Hope that helps!

Actually it’s even easier to just call

glMultiTexCoord2fvARB= (void *)wglGetProcAddress(“glMultiTexCoord2fvARB”);

and not bother to check the extensions string at all… heh.

Thanks For the help, sorted it.