Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

OleKaiwalker

dds files

This topic is 5400 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, How do you make a work around for loading 16-bit dds files. Is it done the same as with TGAs through masking??? Is the rgb565 an extension?? If yes how can I address it?

Share this post


Link to post
Share on other sites
Advertisement
/me presses alt-tab from the OpenGL DDS loader he''d been working on...

Yeah, it''s pretty easy with OpenGL 1.2 on (don''t worry, you have access to everything you need with the Windows OpenGL libraries, even without touching extension stuff). Basically, you just use GL_UNSIGNED_SHORT_5_6_5 (or GL_UNSIGNED_SHORT_5_6_5_REV for BGR data) for your "type" argument to glTexImage2D.

If the DDS data is compressed with S3TC, you do have to query for glCompressedTexImage2DARB, but then you just pass the data in with the appropriate format (which you can determine by looking at the FOURCC in the DDS header).


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
The internal format is the format you want OpenGL to store the data in. It does not have to match the format you use to specify the data. If you want a greyscale texture use an internal format of GL_LUMINANCE. If you want RGB then use GL_RGB. If you want RGBA with 8 bits for each colour then use GL_RGBA8. Pick whichever internal format you need.

Enigma

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!