PDA

View Full Version : OpenGL nVidia SDK problem



pawel
06-10-2003, 06:18 AM
Hi!
I have downloaded OpenGL SDK to write a little programme. I tried to use extension "glConvolutionFilter2D/glConvolutionFilter2DEXT"
and I encountered some problems.
I use Visual Studio C++ ver. 6. Even though I included all essential header files
#include <GL/glext.h>
#define GLH_EXT_SINGLE_FILE
#include <glh_extensions.h>
I still get an error:
'glConvolutionFilter2D': undeclared identifier
So, I placed my line with "glConvolutionFilter2D" command in one of demo source file included in SDK
The result was the same. Then I'v started to add other GL commands from 1.2 version. Parameter are unimportant.
glBlendEquation(1);
..
glColorTable(1, 1, 1, 1, 1, filter);
glCopyColorTable (1, 1, 1, 1, 1);
glGetColorTable (1, 1, 1, filter);
glGetColorTableParameterfv (1, 1, filter);
glGetColorTableParameteriv (1, 1, &kk);
Everything was OK to this command ^^.
After:
glColorSubTable(1,1,3,3,1,filter);
I got
'glColorSubTable': undeclared identifier.
What do I do wrong?
Paul Kaczmarzyk

147-2
06-10-2003, 08:57 AM
Looks to me like you have a glext.h that isn't up to date. I may be wrong here, but one thing I have found, there are a lot of sites with the "current" glext.h which is missing a lot of current extentions.

matt_weird
06-11-2003, 06:50 AM
Maybe then it worth of try to get a function pointer, something like this:

PFNGLCONVOLUTIONFILTER2DPROC glConvolutionFilter2D;

glConvolutionFilter2D = (PFNGLCONVOLUTIONFILTER2DPROC)wglGetProcAddress("glConvolutionFilter2DEXT");

Also check if it is available scanning the string returned by glGetString(GL_EXTENSIONS) for the extension name, and check your glext.h if it has the typedefs and declares for it, i.e. it is up to date, repeating 147-2's words http://www.opengl.org/discussion_boards/ubb/wink.gif

pawel
06-11-2003, 07:34 PM
Thanks for reply 147-2 & matt_weird.
I got latest nVidia SDK, so I think that
the "glext.h" is up-to -date. It looks OK.
It has all lines, even those containing:
glColorSubTable
..
glConvolutionFilter2D.
Obviously I can define it manually as
matt_weird wrote, but all it's done in glext.h.
I know that I should check if extension is available.
I'm confused because the compiler doesn't see
the part of declarations. There are a few declarations
in glext.h. I mean glConvolutionFilter2D and
glConvolutionFilter2DEXT. Maybe that's the problem.
Paul