I'm not sure if it's a bug in engine, texture format, unknown driver's issue or whatever.
Some purebasic demos use differents ways to draw textures, setting the color with RGB(10,10,10) or directly $0A0A0A (but this would must not be the same). If I draw a image in Linux, the color is ok, so is possible this error only happens with engine3d (or textures).
There is a comment in the lines where texture is drawed, I don't see the error.
Can anyone check if Windows and Linux show the same colors?
Code: Select all
If(InitEngine3D())
InitSprite()
InitKeyboard()
InitMouse()
If(OpenWindow(0,0,0,1024,600,"Demo",#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget)<>0)
If(OpenWindowedScreen(WindowID(0),0,0,1024,600))
AmbientColor(RGB(128,128,128))
CreateCube(0,100)
CreateTexture(0,128,128)
If(StartDrawing(TextureOutput(0)))
Box(0,0,64,128,RGB($FF,0,0)) ; <------------------- Color 1 (Red)
Box(64,0,64,128,$FF0000) ; <------------------- Color 2 (?)
StopDrawing()
EndIf
CreateMaterial(0,TextureID(0))
CreateEntity(0, MeshID(0), MaterialID(0))
CreateCamera(0, 0, 0, 100, 100)
CameraBackColor(0,$A0A0A0)
MoveCamera(0,0,250,500,#PB_Absolute)
CameraLookAt(0,0,0,0)
CreateLight(0,RGB(255,255,255),0,250,500,#PB_Light_Point)
Else
End
EndIf
Else
End
EndIf
Else
End
EndIf
Define.i done=0
Repeat
Repeat
event=WindowEvent()
Select Event
Case #PB_Event_CloseWindow
done=1
EndSelect
Until(event=0)
Delay(10)
RenderWorld()
FlipBuffers()
Until done
WINDOWS (Win 10, Nvidia GTX 1050Ti)
LINUX (Ubuntu 20.04, Intel UHD)