View Full Version : Can't use GL_FRAGMENT_PROGRAM_NV
Before I get flamed I'll state that I'm new to this and am now tired of searching the web to no avail.
The problem: I'm trying to compile the HDR sample code that comes with the nVidia SDK, also available at https://jogl-demos.dev.java.net/. After a whole day of arrangements the only error that keeps popping out is that GL_FRAGMENT_PROGRAM_NV is undeclared in as simple a line as 'glEnable(GL_FRAGMENT_PROGRAM_NV);'.
My import list includes glh_extensions.h, glh_glut.h, glut.h, cgGL.h and glext.h as well as some others that don't seem to be from OpenGL or GLUT.
I don't know if I'm missing a library or what, I have tried impoting glew.h too and it makes the other libraries not to compile.
Thanks for any help.
11-19-2006, 11:21 AM
i think it is GL_NV_FRAGMENT_PROGRAM, not GL_FRAGMENT_PROGRAM_NV. just take a look into the header files. btw, GL_NV_FRAGMENT_PROGRAM is a bit obsolete, there is a GL_ARB_fragment_program.
I have tried GL_ARB_fragment_program plus some variations on the name of the GL_FRAGMENT_PROGRAM_NV and it still does not compile. I checked glext.h per your suggestion and it's got a clear: '#define GL_FRAGMENT_PROGRAM_NV 0x8870'.
So I keep trying.
11-19-2006, 12:47 PM
Check that the correct glext.h is used by the compiler. Some compilers have their own version of the glext.h and gl.h files, which is usually very old.
I downloaded the glext.h file from www.opengl.org (http://www.opengl.org) and added the include myself so as to avoid such kind of errors. And I mean that the include wasn't in the original. The original only includes glh_extensions.h, glh_glut.h, glut.h cgGL.h plus other libraries form nVidia.
11-19-2006, 02:15 PM
Originally posted by X:
I downloaded the glext.h file from www.opengl.org (http://www.opengl.org) and added the include myself so as to avoid such kind of errors.There are several directories in which the compiler looks for .h files (the directories are different if <glext.h> is used inside the include directive than if "glext.h" is used) If it finds any older version before it finds yours file, it will use that other version. You can check that if you add following line to beginning of the glext.h you downloaded.
#error "File used"If the compilation fails with specified error message, it is used. Otherwise different glext.h is used.
The file is not used. Nonetheless I have changed all references from all files I could spot with an include to anything that remotely looks like gl*.h to point to my library directory. Now I'm sure that at least most of them are including the ones I downloaded.
It worked but now glh_extensions.h can't find the reference to glGetString(...) although no inclusions where deleted and all are correct according to the compiler. Plus I can't find the library it needs though it should be among the files I have, as the error didn't happen before.
Fixed one, broke another...
11-19-2006, 05:13 PM
Originally posted by X:
Nonetheless I have changed all references from all files I could spot with an include to anything that remotely looks like gl*.h to point to my library directory.Return all changes back. There are two ways to solve solve this problem:
You can find gl*.h files in include directories used by the compiler and replace them with the new ones.
Or you can change the list of include directories, which is usually stored within the INCLUDE environment variable, to start with directory where the new files are located so the compiler finds them first.
I think I'll give up on running this demo and start coding myself an HDR renderer.
I have redone the project setting an include directory where all the libraries where placed and still there are errors left.
Thanks for the help.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.