[Plib-users] Missing glBindTexture stuff.
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-05-26 05:06:16
|
"Srikanth.K.P" wrote: > > I tried to compile plib1.0.20 on my onyx RealityEngine2 workstation with > OS IRIX 5.3. configure was successful. When i do a make, I get errors - > > glBindTextureEXT(GL_TEXTURE_2D, texture) and > glDeleteTexturesEXT(1, &texture) > > undefined in pu.cxx file and the compilation stops. How to get over this > problem ? > > Is my OpenGL version old ? I am not able to find out which version of > OpenGL my machine has. If it is old, where can i get the latest version ? > Is OpenGL module of IRIX 5.3 upgradable without upgrading the OS ? Well, it's possible that you have a really ancient OpenGL - SGI were shipping OpenGL 1.0 back then - and all of the rest of the world is up to rev 1.1 or 1.2. OpenGL 1.0 doesn't implement the glBindTexture stuff that was added into OpenGL 1.1 - however, I thought that SGI had added extension functions to cover for the 'missing' functionality. That's why PLIB is looking for glBindTextureEXT ... the 'EXT' part describes an OpenGL extension. Anyway, if your OpenGL is *so* old that it doesn't even have the BindTexture extension then I'm afraid it's too old to run PLIB. You can verify that you have OpenGL 1.0 by running this: grep VERSION /usr/include/GL/gl.h ...if you have version 1.1 or later, you'll see: #define GL_VERSION_1_1 1 ...if you don't see that then you have 1.0 (I'm *certain* that's true under IRIX 5.3 - so you don't really need to check). What I'm suprised about is that although you have 1.0, it doesn't have those extensions...still. the compiler wouldn't complain if they were there - so you evidently don't have them. I don't think SGI offer a way to upgrade your OpenGL to 1.1 - or even to a version of 1.0 with the BindTexture extensions unless you are prepared to do a complete IRIX upgrade. If you are desperate - you could hack PLIB's texture loader to make this work. You have to create an OpenGL display list, issue all the texture commands (without the missing extension functions) and store the display list handle where PLIB normally stores the texture ID. Then where PLIB applies the texture, you call the display list instead of doing that second glBindTextureEXT. You can find all the relevent sections in the code by searching for '#ifdef GL_VERSION_1_1'. There will be at least three places in the code where this happens - twice in SSG and one in FNT if my memory serves me correctly. Alternatively, toss out your RealityEngine2 and get a modern PC with an nVidia-2 card - it'll cost you about $1000 to do it and it'll be easily ten times faster. Run Linux and you'll hardly know you've switched systems! -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |