Page 1 of 1

PB 6.0 b6 - DisplayTransparentSprite

Posted: Thu Apr 21, 2022 2:09 pm
by pf shadoko
DisplayTransparentSprite : intensity has no effect with 3d

Code: Select all

InitEngine3D()
InitSprite()
InitKeyboard()
InitMouse()
OpenWindow(0, 0, 0, 512, 400, "[Escape] to quit", #PB_Window_SystemMenu | #PB_Window_ScreenCentered):OpenWindowedScreen(WindowID(0), 0, 0, 512, 400, 0, 0, 0)
;OpenScreen(800,600,32,"")

CreateCamera(0, 0, 0, 100, 100):MoveCamera(0,0,0,-2):CameraLookAt(0,0,0,0)
CreateLight(0,$ffffff, 10000, 10000, 0000)
CreateCube(0,1)
CreateEntity(0,MeshID(0),#PB_Material_None)

CreateSprite(0,256,256,#PB_Sprite_AlphaBlending )
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AllChannels )
Box(0,0,256,256,$ffaaffaa)
DrawText(10,10,"AZERTY",$ffffffff,$00ff0000)
StopDrawing()

Repeat
	If IsWindow(0):While WindowEvent():Wend:EndIf
	ExamineKeyboard()
	RotateEntity(0,0.1,0.2,0.3,#PB_Relative)
	RenderWorld()
	DisplayTransparentSprite(0,100,100,16,$ffff)
	FlipBuffers()
Until KeyboardReleased(#PB_Key_Escape)

Re: PB 6.0 b6 - DisplayTransparentSprite

Posted: Thu Apr 21, 2022 8:44 pm
by STARGĂ…TE
It is probably because of https://www.purebasic.fr/english/viewto ... 30#p582630
Beta 6 wrote:- Changed: the default subsystem for screen/sprite is now OpenGL on Windows for more consistency. DirectX9 is still available as a subsystem.
It works fine Beta 5.

However, even with subsystem DirectX9 in Beta 6 it doesn't work, because of an IMA at OpenWindowedScreen().

Re: PB 6.0 b6 - DisplayTransparentSprite

Posted: Thu Apr 21, 2022 10:30 pm
by JHPJHP
Previously reported here.