View Full Version : .dds file and GUIs

06-13-2008, 07:27 AM
I am currently working on creating a GUI that will go on top of my open GL program. I am not that far into the project, but the person providing the graphics would like to see what the GUI will look like on top of my texture files and I was wondering what the easiest way to go about displaying the graphic as a skin or overlay in my OpenGL window. Oh and the graphic is a .dds file.

06-13-2008, 08:27 AM
I am not sure to understand, are you asking for some libraries to draw a gui on you ogl application?

06-13-2008, 10:17 AM
Well I will do that later and make it an interactive user interface, but right now I just have the mock up image and would like to load that in the front of my window. Would I just need to load the .dds file as a texture?

06-13-2008, 11:07 AM
Would I just need to load the .dds file as a texture

Yes you could and then draw it on a quad that fills the entire viewport.

06-13-2008, 12:15 PM
I am now having problems loading my .dds file as a Texture. It is Friday so maybe my brain is a little fried, but I know this should be easy. I am using the following example code:


I don'tunderstand where I need to specify that it is a .dds format, or I guess I should say where I load in the actual file I would like to use.

Help please!

06-13-2008, 03:10 PM
You don't specify to opengl that it is a dds format, dds is a microsoft directX image format, you need to code a dds loader or find a loader the web. When you have obtained an array of bytes containing image data, you can give it to the glTexImage2D function to build a texture.