with "CreateCamera" it works
Code:
InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindow(0, 0, 0, 300, 300, "OpenGL Sprite", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 300, 300)
CreateSprite(0, 50, 50, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Circle(25, 25, 20, $FF00FFFF)
StopDrawing()
CreateCamera(0, 0, 0, 100, 100)
Repeat
Repeat
ev = WindowEvent()
If ev = #PB_Event_CloseWindow : quit = #True : EndIf
Until ev = 0
RenderWorld()
DisplaySprite(0, 0, 0)
FlipBuffers()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape) Or quit = #True
but with a screen the programme crash
Code:
InitEngine3D()
InitSprite()
InitKeyboard()
OpenScreen(1280,720,32,"")
CreateSprite(0, 50, 50, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Circle(25, 25, 20, $FF00FFFF)
StopDrawing()
CreateCamera(0, 0, 0, 100, 100)
Repeat
RenderWorld()
DisplaySprite(0, 0, 0)
FlipBuffers()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape) Or quit = #True
"startdrawing la sortie est specifiée est null"
another clue:
a piece of the 3d scene is sometimes displayed in the sprite. there is obviously a memory corruption.
config : PB 5.72, Windows 10 Famille