How to load a very large bitmap in DX8 ??

Started by
2 comments, last by Evening 21 years, 7 months ago
since, old video can only support 256*256 texture size. How can i load the texture which is bigger than 256*256 ? i tried to use a surface to contain the bmp. but the problem is that i don''t know how to cut the surface into small square and load it as a texture? if I need to display 640*480 image .. how to do it ? can anyone provide some tutorial for me ? thanks all ~~~
Advertisement
you wouldn''t load a 640x480 image because it''s not a texture that is a power of 2. All textures must be a power of two or you''ll slow down your rendering speed alot. other than that you just load it like any other texture, or you can use s3 texture compression.
if i first load the bitmap(640*480) into a surface, then copy some 256*256 Rects from the surface as a texture . And then render all texture at the right position to form the bitmap again, will it work ?
What you should do is write up a class to load a bitmap and split it up into smaller sections. That way with older video cards you would be safe.

- torquel
- torquel

This topic is closed to new replies.

Advertisement