@Fred,
ScreenOutput() Does not work with Ogre enabled. I don't know if this is by design or a bug?, but you will always get an IMA with it if you try.
@Nituvious so the easiest way to get around this is to use sprites. Changing subsystems is just going to mask a flaw in your program. it is a lot better if you can get it to work correctly on all subsystems don't you think?
Code: Select all
EnableExplicit
Define.i Event,Exit
InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindow(0,0,0,800,600,"hello",#PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0),0,0,800,600)
CreateCamera(0,0,0,800,600)
CreateSprite(0,60,20)
CreateSprite(1,ScreenWidth(),20)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_Transparent)
DrawText(0, 0, "Test")
StopDrawing()
;- Main loop
Repeat
;- All 3D commands must be placed before RenderWorld()!
;
RenderWorld()
;All 2D commands to be placed AFTER RenderWorld()
;
DisplayTransparentSprite(0,0,0,255,RGB(Random(255),Random(255),Random(255)))
DisplayTransparentSprite(0,Random(ScreenWidth()),Random(ScreenHeight()),255,RGB(Random(255),Random(255),Random(255)))
DisplayTransparentSprite(1,0,ScreenHeight()-SpriteHeight(1),255,RGB(Random(255),Random(255),Random(255)))
StartDrawing(SpriteOutput(1))
DrawingMode(#PB_2DDrawing_Transparent)
DrawText(0, 0, "Mary had a little lamb, she tied it to a pylon. 40000 volts shot up its ass and turned its wool to nylon")
StopDrawing()
;}
;{ Event loop
;- Event loop
; We check the events until ALL are processed.
; this is very important!
;
Repeat
Event=WindowEvent()
Select Event
Case #PB_Event_CloseWindow
Exit=#True
EndSelect
Until Event=#False
;}
;{ Check Keyboard
;-Check Keyboard
;
If ExamineKeyboard()
If KeyboardReleased(#PB_Key_Escape)
Exit=#True
EndIf
EndIf
;}
FlipBuffers()
CameraBackColor(0,$000000)
Until Exit=#True
End
Edit to fix bug