DDS question
Blitz3D Forums/Blitz3D Programming/DDS question
| ||
..okay..I simply create 2 textures, Tex01 is 1024x1024 dds, and second one (Tex02) is same texture but exported as a 512x512 dds..now, when I apply Tex01 on to cube, I got same result from AvailVidMem as when I apply Tex02 later, and run program..there is nothing else loaded except cube and this textures separately (never both textures at once)..so, how come AvailVidMem returning me same value for 2 textures where one of them is 4 times smaller?? |
| ||
Got a little code example of this? Remember that AvailVidMem is updated only after a renderworld ( it appears to be during a RenderWorld call that textures are transferred from system ram into vidram ) so you need to call renderworld at least once after a texture change before testing the available video memory. Also are the textures both the same type? There are all kinds of DDS settings, so one could in fact be four times the size of the other at the same resolution, or the same size at a quarter of the res. |
| ||
When you use EndGraphics between the two tests, it may give you correct numbers. |
| ||
i think that availvidmem is not reliable to do measurements with. take for example this oddity i came across the last couple of days. i had a small project with a sky and a cubemapped mesh. i deleted the sky and some cubes, edited out the updatecubemap() and ran it. uuh, what is this i asked myself?! the cubemap still showed the sky and cubes i had deleted from my project code! this shows how it works, there is stuff in vid mem just sitting there, right now. so how could availvidmem be reliable? it can only show "how much vid mem has been used" not "what size is this texture of mine in vidmem". |
| ||
..this is the code..nothing 'hot'..just testing this DDS thingy how is it working.. Graphics3D 1024,768,32,1 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,80,0 light=CreateLight() RotateEntity light,90,0,0 ; Load mesh drum=CreateCube() TX=LoadTexture("LM.dds");1024x1024 texture ;TX=loadtexture("LM1.dds"); 512x512 texture TextureCoords TX,1 EntityTexture drum,TX,0,0 PositionEntity drum,0,0,MeshDepth(drum)*1 PointEntity camera,drum While Not KeyDown( 1 ) TurnEntity drum,0,.2,0 RenderWorld Text 10,10,AvailVidMem() VWait:Flip False Wend End @Gabe..yes, they are same texture exported from Photoshop, just scaled down at 512x512 with same settings DXTC1, no alpha.. |
| ||
In my machine I get 393216 bytes difference with your code.. I didn't mipmap my textures so if you did it might have only loaded small mipmap.. (Sorry, I don't know how DX7 does this, does it load all mipmaps, or just one you need..) Edit: what GFX card you have? |
| ||
its nVidia 5600FX with 256 MB VRAM...I really dont know is it AvailVidmem for sure showing me exact values..there is no Mipmaps checked for export trough Photoshop nVidia DXTC exporter.. |
| ||
..I got it..'problem' was on graphics card settings itself..it was fixed at 4x antialiasing, so after I turned it off and check for application controlled, things become normal and AvailVidMem returned me different values for different textures as i expected.. |
| ||
AvailVidMem reports the correct amount of video memory remaining. I believe things aren't taken out of VRAM, unless they are forced out. |
| ||
how come same code after I disable 4x antialiasing from within gfx card set up, showing difference between two textures, different size.. while 4x antialiasing is turned on, there is no changes at all at AvailVidMem report...I dont know whats the real reason, but thats whats happening.. |
| ||
don't use drugs! ;-) |
| ||
..hehe..well, actually, it was sake.. :)) |
| ||
Naughty: That's weird, I have Nvidia card too (6600GT) and I tested 4xAA and results are same as I had earlier.. So you are alone with this bug :) |
| ||
hmm..thats weird..I guess, somethings wrong with card/drivers then..in fact few months ago, my card become to be a problem after lightening outside...so, basically even now, after that I am unable to see picture in color from Svideo output (TV)..only black/white...so maybe card is damaged somehow, i am not sure..obviously its time for upgrade.. |