loading dds files onto opengl application

hi,

I need to load a texture in .dds format into an opengl application. I downloaded from nvidia developer’s page their nv_dds.cpp and nv_dds.h files which do just that. However when I try to compile nv_dds.cpp I get the compilation error
(I am compiling in a linux machine)

nv_dds.cpp: 496 ‘GL_TEXTURE_RECTANGLE_NV’ undeclared (first use this function)

Any idea what the problem is?

You need to define that constant. Try getting glext.h from SGI, NVidia, or ATi’s website.

If you don’t want to add that header, just use:

#ifndef GL_NV_texture_rectangle
#define GL_TEXTURE_RECTANGLE_NV           0x84F5
#define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6
#define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8
#endif

thanks, that worked.