I've just cracked playing a movie onto a textured cube (based on someone else's code of course) but I've noticed that AvailVidMem() returns a progressively lower figure each time the movie is restarted (in order to loop).
I thought CloseMovie(), then OpenMovie() would cure this but it didn't.
Check out the example with your own avi or mpg (gifs work fine with no memory loss).
I can't see any way around this since there is no movie equivalent of FreeEntity() .
The danger is that if a movie is left to run (say, simulating a TV screen) then eventually the user's system will lock up.
I thought CloseMovie(), then OpenMovie() would cure this but it didn't.
Check out the example with your own avi or mpg (gifs work fine with no memory loss).
I can't see any way around this since there is no movie equivalent of FreeEntity() .
The danger is that if a movie is left to run (say, simulating a TV screen) then eventually the user's system will lock up.
Graphics3D 800,600,32,2 SetBuffer BackBuffer() font=LoadFont("arial",20) : SetFont font camera=CreateCamera() : light=CreateLight() cube = CreateCube() : MoveEntity cube,0,0,3 : ScaleEntity cube,1,0.5,1 movietex = CreateTexture(256,128) : EntityTexture cube,movietex movie$ = "sample.avi" : hmovie = OpenMovie(movie$) ; any AVI or MPG framePeriod = 1000/30 : frametimer = CreateTimer(framePeriod) While Not KeyHit(1) WaitTimer frametimer If t>5 t=0 If Not MoviePlaying(hmovie) CloseMovie(hmovie) hmovie = OpenMovie(movie$) frame = 0 Else SetBuffer TextureBuffer(movietex) DrawMovie(hmovie) frame = frame + 1 : Color 255,255,255 : Text 0,0,"Frame "+frame SetBuffer BackBuffer() EndIf EndIf t=t+1 TurnEntity cube,0,.4,0 UpdateWorld() : RenderWorld() Text 0,0,"AvailVidMem() "+AvailVidMem() Flip() Wend End