
Hi,
Could you test this code below to confirm following bugs ?
- reversed colors
- DrawText glitches

Code: Select all
DisableExplicit
CompilerIf #PB_Compiler_Version<520
MessageRequester("PB Version", "PB 5.20 required for this test")
CompilerEndIf
If InitEngine3D()=0 Or InitSprite()=0
MessageRequester("Engine3D / Sprite", "Failed")
EndIf
win=OpenWindow(#PB_Any, 0, 0, 800, 600, "TextureOutput - Test running on PB5.2", #PB_Window_BorderLess |#PB_Window_ScreenCentered |#PB_Window_SystemMenu)
If IsWindow(win)=0 Or OpenWindowedScreen(WindowID(win), 0, 0, WindowWidth(win), WindowHeight(win))=0
MessageRequester("Window / Screen", "Failed")
EndIf
tex=CreateTexture(#PB_Any, 128, 128)
fontID=LoadFont(0, "Arial", 22, #PB_Font_Bold|#PB_Font_HighQuality|#PB_Font_Italic)
If StartDrawing(TextureOutput(tex))=0
MessageRequester("TextureOutput", "Failed")
Else
DrawingMode(#PB_2DDrawing_Transparent|#PB_2DDrawing_AlphaBlend)
DrawingFont(fontID)
DrawText(25, 10, "ATLAS", RGBA(255, 255, 255, 255))
txtW=TextWidth("ATLAS")
txtH=TextHeight("ATLAS")
DrawingMode(#PB_2DDrawing_Gradient|#PB_2DDrawing_AlphaBlend)
BackColor(RGBA(255, 255, 0, 255))
GradientColor(0.8, RGBA(255, 0, 0, 50))
FrontColor(RGBA(200, 70, 10, 255))
LinearGradient(0, 0, 0, 64)
Box(5, 5, 16, 64)
BackColor(RGBA(0, 255, 0, 255))
GradientColor(0.8, RGBA(0, 0, 255, 50))
FrontColor(RGBA(60, 100, 255, 255))
LinearGradient(0, 0, 64, 0)
Box(21, 69, 64, 16)
DrawingMode(#PB_2DDrawing_Outlined|#PB_2DDrawing_AlphaBlend)
FrontColor(RGBA(255, 255, 255, 255))
Box(5, 5, 16, 64)
Box(21, 69, 64, 16)
Box(0, 0, 128, 128)
StopDrawing()
EndIf
cam=CreateCamera(#PB_Any, 0, 0, 100,100)
CameraBackColor(cam, RGB(29, 117, 188))
MoveCamera(cam, 0, 0, 10)
CameraLookAt(cam, 0, 0, 0)
mat=CreateMaterial(#PB_Any, TextureID(tex))
MaterialCullingMode(mat, #PB_Material_NoCulling)
MaterialFilteringMode(mat, #PB_Material_None)
MaterialBlendingMode(mat, #PB_Material_AlphaBlend)
DisableMaterialLighting(mat, #True)
box=CreateCube(#PB_Any, 2)
ent=CreateEntity(#PB_Any, MeshID(box), MaterialID(mat))
Repeat
RotateEntity(ent, 0.1, 0.2, 0.3, #PB_Relative)
RenderWorld()
FlipBuffers()
Until WaitWindowEvent(1)=#PB_Event_CloseWindow