[Implemented] Sprite3D not freed correctly?
Posted: Mon Jun 09, 2008 1:30 pm
seems like CloseScreen() doesnt free 3d sprites correctly? the 3d sprite is 'destroyed' (white box) but you can still display it:
DX7 & OGL: you can display the destroyed 3d sprite.
DX9: ima at line 18, but IsSprite3D() returns <> 0.
c ya,
nco2k
Code: Select all
If InitSprite() And InitSprite3D() And OpenWindow(0, 0, 0, 800, 600, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)
If CreateSprite(0, 128, 128, #PB_Sprite_Texture) And CreateSprite3D(0, 0)
Debug "Sprite3D: "+Str(IsSprite3D(0))
Debug "Sprite2D: "+Str(IsSprite(0))
Debug ""
CloseScreen()
Debug "Sprite3D: "+Str(IsSprite3D(0))+" <-- ?!"
Debug "Sprite2D: "+Str(IsSprite(0))
Debug ""
If OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)
Repeat
ClearScreen(0)
If Start3D()
DisplaySprite3D(0, 100, 100)
Stop3D()
EndIf
FlipBuffers(0)
Until WaitWindowEvent(25) = #PB_Event_CloseWindow
EndIf
EndIf
EndIf : End
DX9: ima at line 18, but IsSprite3D() returns <> 0.
c ya,
nco2k