using the 256 flag in LoadTexture command

Blitz3D Forums/Blitz3D Programming/using the 256 flag in LoadTexture command

NotAGamer(Posted 2014) [#1]
hello to all... i'm new to blitz3d but i have programming background on C/C++ and JAva...


just want to ask what does "store in Vram " mean in the Loadtexture command.. i mean , what's the difference if i use it or not... will it make the game run faster? or do some compression or something on the texture... hmmm


Guy Fawkes(Posted 2014) [#2]
It will store your texture in memory for as long as the program is running.

Nice to meet you, btw! :)

~GF


Guy Fawkes(Posted 2014) [#3]
If possible, I would like to add you to yahoo messenger, NG! :)


NotAGamer(Posted 2014) [#4]
oh thanks Guy Fawkes!


here's my email "ervin_cezar_09@..."


i'm currently making a 3d rpg game in blitz3d ... i know programming and 3d modeling(well at least lowpoly ones).. but i suck at character design(2d).. and i realized that i need to do it that just "modeling blindly"


RemiD(Posted 2014) [#5]
@Guy Fawkes>>I had one smart comment to make but i kept it for myself. Take note of my incredible self control. (i don't know if this will last long...)


Guy Fawkes(Posted 2014) [#6]
Added, NG! :) Check your messenger! :)


_PJ_(Posted 2014) [#7]
I'm not sure the above entirely correct.

ANY Textures Loaded will all remain in memory until Free'd, regardless of flags - this makes them especially prone to memory leaks.

I understand the flag to mean that the texture will be stored within the Graphics Adapater RAM (VRAM) as opposed to the standard computer RAM (Heap).
Graphics3D 800,600,32,0
Local Iter
Global Sample[100]

;TEST A
Local TestA1=AvailVidMem()

For Iter=0 To 99
	Sample[Iter]=CreateTexture(1,1,1)
Next
Local TestA2=AvailVidMem()
For Iter=0 To 99
	FreeTexture Sample[Iter]
Next
Local TestAResult=TestA1-TestA2

;TEST B
Local TestB1=AvailVidMem()
For Iter=0 To 99
	Sample[Iter]=CreateTexture(1,1,257)
Next
Local TestB2=AvailVidMem()
For Iter=0 To 99
	FreeTexture Sample[Iter]
Next
Local TestBResult=TestB1-TestB2

Print "Test A Used: "+Str(TestAResult)+" VRAM"
Print "Test B Used: "+Str(TestBResult)+" VRAM"