PDA

View Full Version : loading dds files onto opengl application



artintel2
08-17-2004, 12:18 PM
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?

CatAtWork
08-17-2004, 01:07 PM
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

artintel2
08-17-2004, 03:11 PM
thanks, that worked.