Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-24-08, 11:52 AM   #1
bootstrap
Registered User
 
Join Date: Dec 2007
Posts: 16
Default how to omit glee in linux version of application

I have an OpenGL2 application that runs on linux and win32 by including glee.h and glee.c in my program. I believe glee is necessary on win32, but I do not understand why glee.h and glee.c are necessary in linux.

When I omit glee.h and glee.c from my project in linux, it compiles okay, but generates hundreds of link errors due to undefined symbols. Interestingly, the symbols have an extra p prefix character (pglActiveTexture instead of glActiveTexture).

The gl.h glx.h glext.h glxext.h files apparently contain every GLX and OpenGL function (up to GLX 1.3 and OpenGL 2.1), which is why it compiles okay. Do I need to refer to another library in the linker properties (in addition to GL and X11)?

I believe I am missing something very obvious! Tell me so I can slap my forehead.

In case it matters, my linux is ubuntu 8.04.1 LTS, and my graphics card is nvidia 8600GT. Thanks.
bootstrap is offline   Reply With Quote
Old 08-26-08, 07:24 AM   #2
JohnyDog
Registered User
 
Join Date: Jan 2004
Posts: 2
Send a message via ICQ to JohnyDog
Default Re: how to omit glee in linux version of application

Quote:
Originally Posted by bootstrap View Post
I have an OpenGL2 application that runs on linux and win32 by including glee.h and glee.c in my program. I believe glee is necessary on win32, but I do not understand why glee.h and glee.c are necessary in linux.
GLEE/GLEW etc. are still usefull if you plan to distribute your project, as there are many misconfigured linux systems which supports the GL versiion (running binary drivers), but still have old GL headers.

Quote:
When I omit glee.h and glee.c from my project in linux, it compiles okay, but generates hundreds of link errors due to undefined symbols. Interestingly, the symbols have an extra p prefix character (pglActiveTexture instead of glActiveTexture).

The gl.h glx.h glext.h glxext.h files apparently contain every GLX and OpenGL function (up to GLX 1.3 and OpenGL 2.1), which is why it compiles okay. Do I need to refer to another library in the linker properties (in addition to GL and X11)?
Linking to GL should be sufficient, just be sure you're linking to the right library, you might have multiple libGL*.so on your system, for example from the Mesa software renderer.
JohnyDog is offline   Reply With Quote
Old 08-26-08, 02:45 PM   #3
nemecb
Registered User
 
Join Date: Jan 2005
Location: Rochester, MN
Posts: 4,018
Default Re: how to omit glee in linux version of application

GLEE isn't actually providing the extensions to the application, it's just creating the function pointers to them. The extensions are still provided by the drivers whether you're on Linux or Windows. If you really want to remove GLEE you'll have to create the function pointers yourself, but trust me when I say you don't want to do that. There's documentation out there about how extensions work without GLEE or GLEW (an alternative that does the same thing), but suffice it to say that it's messy.

The short version: If you're using OpenGL extensions you need GLEE, regardless of platform.
nemecb is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mageia 2 Cannot Install 71.86.15 for Riva TNT/TNT2 kbulgrien NVIDIA Linux 3 06-29-12 08:27 AM
X Failed to load NVdriver c00lr4c3r NVIDIA Linux 13 10-22-02 01:44 PM
Error messages... HELP!!!! Imperito NVIDIA Linux 3 09-24-02 10:46 PM
Need help to get the X to work on my Acer TravelMate 630 knchee NVIDIA Linux 16 09-19-02 10:16 PM
RH7.3 and nForce - can't find the module dmw400 NVIDIA Linux 4 08-05-02 12:14 PM

All times are GMT -5. The time now is 08:34 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.