store texture in vram

Blitz3D Forums/Blitz3D Programming/store texture in vram

Osoko(Posted 2006) [#1]
Hi there a problem concerning the storage of texture ( i presume )

I use this code for loading 8 meshes

Mesh1= LoadMesh("1.x")
Mesh1Tex= LoadTexture ("2_2048.jpg",256)
EntityTexture Mesh1,Mesh1Tex
EntityFX Mesh1,1

and so on on for the 8.

Whern i run the panoramic , i get saccade, which i havent as i was using a single mesh with the 8 textures.
I've tried the flag 256 on Loadtexture, but no result

I presume blitz is removing the texture from vram for object which are not visible.

Flag 256 isn't for having always the texture stored in Vram ?

What is the solution ?

Thank's


Ross C(Posted 2006) [#2]
Could you try and rephrase that. I don't quite get what you mean :o)


jfk EO-11110(Posted 2006) [#3]
My english dictionary only has Saccarin between sabre and sack, so what in the world is "saccade"?

Please note, maybe your 2048 texel texture is resized automaticly. Check TextureWidth() after loading to see if the size is supported at all.


b32(Posted 2006) [#4]
A saccade is either an anti-ship missile http://en.wikipedia.org/wiki/C-802
or a "quick change" http://en.wikipedia.org/wiki/Saccade


jfk EO-11110(Posted 2006) [#5]
oopsie - but it still doesn't make sense to me.


b32(Posted 2006) [#6]
No, me neiter. It reminds of Babelfish, because some words seem untranslated.
"Panoramic" might be program. First, I though "saccade" was simply "error", but then I saw the wikipedia description, so I thought it might be "strange alternating effect". However, in context, that doesn't help much.
Maybe single mesh=static mesh ?

But I don't believe Blitz disposes textures from meshes that are not in view. I don't really get flag 256. Maybe it determines where the texture is stored, in either system RAM or video RAM. Whatever the problem is, I don't think it is caused by losing the texture and setting flag 256 will probably not solve it.
Maybe 'saccade' means 'jitter'. Hmm, then it could be caused by placing multiple meshes at exactly the same spot. Maybe try EntityOrder or "WBuffer true" ? Or move all the entities a bit in different directions.


OverDozing(Posted 2006) [#7]
lol most be a French dude ^^
‘Saccade’ mean.... lags… no expected FPS drop... stuff like that…


Mustang(Posted 2006) [#8]

I presume blitz is removing the texture from vram for object which are not visible.



No it isn't. 3D and texture management is handled by DirectX, Blitz just sends info to it what it would like to have on screen and DX does it (broadly so---). Usually you DON'T want to mess with VRAM flags unless you really know what you are doing and why...in this case I'd leave it untouched.

Lag can also be a result of many things, like camera placement (too close-> fillrate might get a hit).

You're loading 8 2048*2048 textures if I guessed right - that's a lot of pixels so unless you have a very speedy card and 256-512 MB VRAM on it you will get swapping - and that might slow it down occasionally. Fast camera paths / movement can also cause lag.


Osoko(Posted 2006) [#9]
Sorry for the word saccade, which means lags as overdozing said And yes i'm a french dude.

Yes, it's 8 2048*2048 but perfect panoramic on 128 mb card.
If i load all textures within one mesh, it's work.
If i load them with one mesh per texture i get lags.
I'm doing this for retexture the mesh according the amount of vram of the user, with 1024*1024 or 512*512.
I prefer using several sets that scaledown the image by code.
i've got problems for retexturing with getchild(), entitytexture gets memory access violation.


Stevie G(Posted 2006) [#10]

i've got problems for retexturing with getchild(), entitytexture gets memory access violation.



Try using the Entityclass command to make sure the child is actually a mesh rather than a pivot or other.

Stevie