The colors are displayed incorrectly in a texture when drawing; RGB becomes BGR.
Can anyone explain this error?
Peter
Code: Select all
InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindow(0, 0, 0, 400, 400, "Test - [Esc] quit", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 400, 400, 0, 0, 0)
AmbientColor(#White)
CreateCube(0, 4)
CreateTexture(0, 64, 64)
CreateMaterial(0, TextureID(0))
StartDrawing(TextureOutput(0))
; Box(0, 0, 64, 64, RGB(0, 0, 255))
; Circle(32, 32, 16, RGB(255, 0, 0))
Box(0, 0, 64, 64, #Blue)
Circle(32, 32, 16, #Red)
StopDrawing()
CreateEntity(0, MeshID(0), MaterialID(0))
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 0, 0, 10, #PB_Absolute)
Repeat
While WindowEvent():Wend
ExamineKeyboard()
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
