Jump to content
  • Advertisement
Sign in to follow this  
Moriquendi

DDS texutres and Alpha, SOIL and DDS, Texutres powered of 2 - questions

This topic is 3264 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 guys. I have few really important question. I hope you will help me :) 1. DDS textures. How to make them? I downloaded Image Converter Plus and I tried to convert .png image to .DDS using DXT1/2/3/4/5. But I can't. I recive this eror:
Quote:
Src info : C:\Users\Michał\Desktop\panda_stoi.png png, 140x150px, 32bpp, 1 page(s), 300.000000x300.000000 dpi, 9139 bytes Load all pages : ok Save : Can't save file! Error code = BADA (Bad argument)
Why it's happening? And how can I fix it? I also tried another settings:
Quote:
A8R8G8B8: (32bit per pixel, A:8 R:8 G:8 B:8)
And it's working but there's no transparency in the images :| So what should I do? 2. How to Load DDS textures with SOIL? I use:
	GDI[0] = SOIL_load_OGL_texture
	  (
	  "xxxx.png",
		SOIL_LOAD_AUTO,
		SOIL_CREATE_NEW_ID,
		SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT
	  );
Should I change any of the flags? 3. How to check in WinAPI the windows is active or not? I'm using now WM_ACTIVATE in my app. But by this way I can check if the app is minimalized or not, but I can't find out the windows is active or not. 4. Texture and power of 2. I know that old graphic card doesn't support textures witch aren't power of 2. So should I care about it? I make simply 2D platform game, but I use multiple 10 textures. Is it a big problem? Can you say something more about this problem?

Share this post


Link to post
Share on other sites
Advertisement
1. Paint.NET can save as DXT and that worked well for me. Give it a try on your images.

2. No idea. Never used SOIL.

3. Try WM_SETFOCUS

4. I wouldn't worry about those old graphics cards, unless you think you'll be able to get a playable frame rate on them, and you don't need any of the other features they tend to be missing.

Share this post


Link to post
Share on other sites
Quote:
Original post by Adam_42
1. Paint.NET can save as DXT and that worked well for me. Give it a try on your images.

2. No idea. Never used SOIL.

3. Try WM_SETFOCUS

4. I wouldn't worry about those old graphics cards, unless you think you'll be able to get a playable frame rate on them, and you don't need any of the other features they tend to be missing.



Thanks for answer!!! :-)
1. Yea, it's working. It's strange.
I convert my image using Paint.NET. I opened it and there was transparency.
Then I open the same image (converted to dds) in photoshop but the background become white. Maybe you know why?

And one more question about dds texures.
I added dds texures to my game but textures are reversed on Y axle.
Basicly I added textures in soil like:

...
SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y
...

and it was working. But with dds it doesn't. Why? :|

2.-
3.I find something different. That's my code:

while(done)
{
...
if(!(GetForegroundWindow() == hwnd))
continue;
render();
...
}

Looks good, and it's working ;P
4.-

Edit:
Ow, and a question about Paint.NET
Can I convert a lot of images from png to dds just in "one click"...in force.?

[Edited by - Moriquendi on October 14, 2009 10:59:21 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!