Advertisement

DDS loading

Started by April 21, 2003 05:35 PM
4 comments, last by sinistrx 21 years, 10 months ago
I am trying to implement dds textures in my program as opposed to tga''s (so I can have alpha and also have it compressed). I''m running into some weird problems when trying to compile via the nv_dds.cpp on developer.nvidia.com. The file itself will compile, but once it''s implemented, using the example for loading a compressed dds (that I saved in photoshop as dxt3 w/ alpha using the dxtc plugin hosted on nvidia''s site) trying to compile the main file tells me that glCompressedTexImage2DARB(..) is an undeclared identifier even though that function is used in the nv_dds.cpp file and I have tried including all the necessary headers. Can anyone tell me why this is not working? Also, I tried saving a RGBA dds (8:8:8:8) of the same and used the uncompressed method which compiles, but it will show white where the texture is supposed to be!
Use this glext.h:

http://cvs1.nvidia.com/inc/GL/glext.h

and you should have no problems compiling nv_dds.cpp.

[edited by - Jallen on April 21, 2003 6:41:10 PM]
---I write code.DelphiGL (http://delphigl.cfxweb.net)
Advertisement
Still no go:

C:\code\fuckyou\fuckyou.cpp(492) : error C2065: 'glCompressedTexImage2DARB' : undeclared identifier

here are my includes at the beginning of the code:


    #include	<windows.h>										// Header File For Windows#include	<stdio.h>										// Header File For Standard Input / Output#include	<stdarg.h>										// Header File For Variable Argument Routines#include	<stdlib.h>#include	<string.h>										// Header File For String Management#include	<gl\gl.h>										// Header File For The OpenGL32 Library#include	<gl\glu.h>										// Header File For The GLu32 Library#include	<gl\glaux.h>#include	<gl\glext.h>#include	<iostream.h>#include	<string.h>#include	<math.h>#include	<shared\nv_dds.cpp>#include	"article1.cpp"  


the article1.cpp is just a local file (some raw data), as you can see I would be having probs way before the line that it's crapping out if the nv_dds.cpp was actually screwed, any ideas from here?

[edited by - sinistrx on April 21, 2003 7:23:03 PM]
You should never #include a .cpp file, only headers (.h). Change your file to include nv_dds.h instead of nv_dds.cpp and see if that fixes things.
---I write code.DelphiGL (http://delphigl.cfxweb.net)
I''m STILL getting the same results even doing that. Just as a side note the program compiles fine when I take out the code to load a dds in the main program and just use tga, but I want compression! (:
Can you post the .cpp file where you include nv_dds.h? Does the compile error occur when compiling nv_dds.cpp or the file that includes nv_dds.h?
---I write code.DelphiGL (http://delphigl.cfxweb.net)

This topic is closed to new replies.

Advertisement