Video memory not restored
Blitz3D Forums/Blitz3D Programming/Video memory not restored
| ||
;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 |
| ||
Add RenderWorld after ClearWorld. |
| ||
that gives me back most of the memory but I'm still 40K down. Don't know why renderworld would free memory anyway? does it clear a memory buffer on the video card? I tried updateworld and that doesn't work either... |
| ||
probably it's a memory segmentation problem. |
| ||
on my comp, renderworld solves it... |
| ||
EndGraphics |