;Positioning my entity results in video memory not being ;restored? Here is the section of code. The comments
;explain the situation,I'm very confused ;(
;Is this a bug with blitz3d or my set up, or just too many ;hours without a break?
;XP,768 RAM,althon 1.8 gig,Radeon 9600
Const GFX_WIDTH = 800
Const GFX_HEIGHT = 600
Const GFX_XCENTER = GFX_WIDTH/2
Const GFX_YCENTER = GFX_HEIGHT/2
Graphics3D GFX_WIDTH,GFX_HEIGHT,16,2
SetBuffer BackBuffer()
SeedRnd (MilliSecs())
HidePointer()
Global INITIAL_MEM = AvailVidMem()
Global CAMERA = CreateCamera()
; store texture in Vram
Global LOGO = CreateTexture(512,512,1+256)
Global INFOPLANE = CreateSprite()
ScaleSprite INFOPLANE,2,1.5
EntityFX INFOPLANE,1+8+16
EntityTextureINFOPLANE,LOGO
; REM out the line below and videomem is restored to the ;initial value as required
PositionEntity INFOPLANE,0,0,2
;However leave it in and the video memory does not get ;restored, or so it would appear.
;....but leave in positionentity() and REM out renderworld ;and memory is restored?
RenderWorld
Text 0,12,"Initial Video mem : "+ INITIAL_MEM
Text 0,24,"Current Video mem : "+ AvailVidMem()
;MouseWait
; FreeTexture LOGO ;\
; FreeEntity INFOPLANE ; same result as clear world
; FreeEntity CAMERA ;/
ClearWorld
Text 0,36,"clear world Video mem : "+ AvailVidMem()
Flip
MouseWait
End
;explain the situation,I'm very confused ;(
;Is this a bug with blitz3d or my set up, or just too many ;hours without a break?
;XP,768 RAM,althon 1.8 gig,Radeon 9600
Const GFX_WIDTH = 800
Const GFX_HEIGHT = 600
Const GFX_XCENTER = GFX_WIDTH/2
Const GFX_YCENTER = GFX_HEIGHT/2
Graphics3D GFX_WIDTH,GFX_HEIGHT,16,2
SetBuffer BackBuffer()
SeedRnd (MilliSecs())
HidePointer()
Global INITIAL_MEM = AvailVidMem()
Global CAMERA = CreateCamera()
; store texture in Vram
Global LOGO = CreateTexture(512,512,1+256)
Global INFOPLANE = CreateSprite()
ScaleSprite INFOPLANE,2,1.5
EntityFX INFOPLANE,1+8+16
EntityTextureINFOPLANE,LOGO
; REM out the line below and videomem is restored to the ;initial value as required
PositionEntity INFOPLANE,0,0,2
;However leave it in and the video memory does not get ;restored, or so it would appear.
;....but leave in positionentity() and REM out renderworld ;and memory is restored?
RenderWorld
Text 0,12,"Initial Video mem : "+ INITIAL_MEM
Text 0,24,"Current Video mem : "+ AvailVidMem()
;MouseWait
; FreeTexture LOGO ;\
; FreeEntity INFOPLANE ; same result as clear world
; FreeEntity CAMERA ;/
ClearWorld
Text 0,36,"clear world Video mem : "+ AvailVidMem()
Flip
MouseWait
End