LoadImage loading to VRAM?

Blitz3D Forums/Blitz3D Programming/LoadImage loading to VRAM?

t3K|Mac(Posted 2006) [#1]
Hi!

I recently checked this while loading 30 lightmaps (each 1024x1024 in size). It seems that LoadImage loads into VRAM. with BlitzPlus, you can set flags for loading the images - with b3d you cant. any chance to get the flags working for b3d? mark?


b32(Posted 2006) [#2]
I was wondering, lightmaps, aren't they textures ? Because for LoadTexture, there is flag 256. For LoadImage, I don't know..


t3K|Mac(Posted 2006) [#3]
I have lightmaps in DDS format and in BMP. Those BMPs are loaded with LoadImage() for ReadPixelFast() access. DDS & ReadPixel won't work. The DDS-lightmaps are loaded with the appropriate model automatically. I have no clue why my vram usage gets higher and higher the more images i load with loadimage.


mr.keks(Posted 2006) [#4]
... you could also load the bmp lightmapps with loadtexture(), couldn't you? i mean, afair, one can access textures using readpixelfast, too.


t3K|Mac(Posted 2006) [#5]
but i don't want them in texture ram. they are 30 lightmaps each 3 MB (BMP, 1024x1024). i need vram for real textures and models. DDS does a good job here.


Dreamora(Posted 2006) [#6]
Images will end in VRAM as well if they are drawn because you can only draw to the backbuffer what is within the VRAM (at least usefully unless you want to copy pixels from image buffer to back buffer)


t3K|Mac(Posted 2006) [#7]
i do not draw them, i just readpixel them.


Matty(Posted 2006) [#8]
If you just wish to 'readpixel' the images and not use them as textures, and never wish to display them then the following should work:

1.load the image as normal.(loadimage not loadtexture)
2.readpixel all the pixels of the image into a bank.
3.free the image
4.use the pixel data as stored in the bank when needed.


t3K|Mac(Posted 2006) [#9]
lots of work, compared to loadimage with flags like in blitzplus... i'll try this code around.