Skip to main content
GameDev.net gamedev.net
🔒 Locked

D3DXCreateTextureFromFile

Started by SGreth Jan 4, 2001 at 10:00 AM 6 replies 800+ views
Original Post
SGreth
SGreth
Does anybody know what kinda image file this function reads in? Thanks, ~S''Greth
"The difference between insanity and genius is measured only by success."~Bruce Feirstein
evaclear
evaclear
I''ve tested the function with Bitmaps, TGA and PNG files. It probably supports more formats give it a shot and find out.
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
mitchw
mitchw
JPEGs too.
Gazza
Gazza
It supports BMP, JPEG, TGA, PNG , GIF and DDS file formats.

It may support more but these are the ones I know of

HTH
SGreth
SGreth
Awesome, thanks for the info =)
~S''Greth
"The difference between insanity and genius is measured only by success."~Bruce Feirstein
Moe
Moe
Here is a question for you experts: would jpeg''s take up the same amount of vid memory as, say, a bmp or less? Does jpeg work on some type of compression or something like a lower color depth?
evaclear
evaclear
Well the jpeg format is based on a very lossy form of compression. Personaly I wouldn''t use them in a 3d game of any sort due to how lossy the compression actualy is. In 3d you end up doing alot of things like mipmapping and other texture techniques that work quite well with normal images like bmp, tga, or png but don''t look very good with jpegs. Obviously because the image is compressed they should take up less memory than a bitmap but in this case your trading memory for quality.
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
+AA_970+
+AA_970+
quote:
Original post by Moe

Here is a question for you experts: would jpeg''s take up the same amount of vid memory as, say, a bmp or less? Does jpeg work on some type of compression or something like a lower color depth?


I''m pretty sure that jpeg''s will take up the same amount of vid memory as a bmp file of the same image. File formats can hold the pixel data in a form of compression, when this data is put in video memory it cannot be compressed (it has to just have the data for the pixels) or the gfx card won''t read the data properly and show something corrupt on the screen (if it dosen''t crash). It might be possible to store the data compressed within system memory and uncompress it when its time to put it in vid memory, but I think you''ll get a large performance decrease and run into a ton of problems with management.

BTW, I agree with evaclear that the jpeg format is not good for games.

Digital Radiation

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.