The problem seems to be with the Ogre3D engine (InitEngine()) and OpenGL.
Granted..I don't know why it throws an error in pf_shadoko's code
but then again - I don't understand his programming tweaks and
usage of constants numbers...It looks great, though.
Luckily for me..I do most of my objects using 3D software.
This code works...But Initialize the 3Dengine and RenderWorld() and the sprite
isn't shown anymore.
Code: Select all
;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()
Quit = #False
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