Trouble GLee....

Started by
16 comments, last by coba2 16 years, 10 months ago
I using library GLee for my shadow map project.... And I use C++ code with MFC.. I has been include GLee in my program.. and success. But while my program running. The GLee cannot be work. If i trace the program.. The program message that the version is not compatible, so the function cannot work. I confuse because I has been include the newest version of GLee (2.1). Is somebody know?? Thanx
Advertisement
What is not possible? To use a certain extension? If that's the case: it depends on your graphics card which extensions are supported and which are not. Hasn't to do something with GLee
http://3d.benjamin-thaut.de
But..if depend on my graphic card... I was try to open a project that using the same GLee library in my computer. And it's work and the version is compatible.

But if I using it in my own project. It is not work..because the version is not compatible.

Why????
Sorry, but I can't nobody can help you, if you don't describe the problem further, post a few lines of code where the error occurs, post the exact error message or problem description, etc.

http://3d.benjamin-thaut.de
I'm sorry because i cannot pick the sample code. Because there is no error in my project.. But my project didnot doing right thing like I want.. My shadow map project didn't show the shadow.. it's because the GLee library didn't work.

I think the GLee library didnot match with my VC++ 2005 or VC++ 6.0. Because after I read the explain from Glee.. I know that GLee can operated in VC++ 7 or VC++ 2003. It is my opinion...

Are my opinion is right???
No, I use GLee successfully with Visual Studios 2005.

Here's some things to check:

-Are you *sure* that GLee is the problem? Not drawing shadows could be caused by a dozen other things.
-Did you call GLeeInit() after intializing OpenGL but before using extensions?
-Have you checked to make sure that any extensions that you are using are available on your hardware? For example, this checks for the extension ARB_fragment_shader and prints out whether it's available or not.

if(GLEE_ARB_fragment_shader)	printf("ARB_fragment_shader available for use.\n");else	printf("No ARB_fragment_shader support.\n");
Where the GLeeInit() must be place??? Before using extention??? Or where??

I has been do like what you do.. This is my code:

if (!GLEE_ARB_shadow)
{
return false;
}


But,it was always return false.. And i tried to debug it... After I debug.. I know that inside the Glee.cpp, one of the code is doing wrong. The section that doing wrong is in:

const char *__GLeeGetExtStrPlat()
{
#ifdef WIN32
if (!_GLEE_WGL_ARB_extensions_string)
>>>> pwglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB");

if (pwglGetExtensionsStringARB)
return (const char *)pwglGetExtensionsStringARB(wglGetCurrentDC());
#elif defined(__APPLE__) || defined(__APPLE_CC__)
#else
Display *dpy=glXGetCurrentDisplay();
if(dpy)
{
int dpynr=DefaultScreen(dpy);
return (const char*)glXQueryExtensionsString(dpy,dpynr);
}
#endif
return 0;
}

In sign >>>, the result is NULL. So the return always false...

Maybe you can help me why it's happen... Thank..
Given how basic that 'extension' is I would guess that you haven't successfully setup an OpenGL context before trying to use the extension; make sure you have done this!
I'm sorry.. I don't understand what you mean about. Can you explain more about your statement.. Thnx
Like I said in my first post, you call GLeeInit() after initializing OpenGl, but before using any extensions. For example:

InitOpenGL(); //start up OpenGL

GLeeInit();

if(!GLEE_ARB_shadow)
{
return false;
}

This topic is closed to new replies.

Advertisement