RotateSprite issue under DirectX9

Post bugreports for the Windows version here
User avatar
diceman
User
User
Posts: 66
Joined: Tue Apr 10, 2018 9:42 pm

RotateSprite issue under DirectX9

Post by diceman »

Hey all,
noticed an issue with RotateSprite(), only apparent with subsystem DirectX9 (no issues under OpenGL or DirectX11).
When rotating a perfectly square sprite 90° or 180° or 270°, the new Sprite is cut off by 1 Pixel, and also shifted, so there's one line now 2px wide, while one side is missing a line.
Only happens with values 90, 180 and 270.
But see for yourself:

Code: Select all

EnableExplicit

InitSprite()
InitMouse()
InitKeyboard()

#xRes= 800
#yRes = 600
Define screen = OpenWindow(#PB_Any, 0, 0, #xRes, #yRes, "Sprite Rotating under DirectX9", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(screen), 0, 0, #xRes, #yRes)

Define event
Define spriteSPR = CreateSprite(#PB_Any, 64,64, #PB_Sprite_AlphaBlending | #PB_Sprite_Transparent)
If StartDrawing(SpriteOutput(spriteSPR))
	DrawingMode(#PB_2DDrawing_Outlined)
	Box(0,0,64,64,RGB(0,255,0))
	Box(0,0,32,32,RGB(0,255,0))
	StopDrawing()
EndIf
TransparentSpriteColor(spriteSPR, RGB(0,0,0))

RotateSprite(spriteSPR, 90, #PB_Absolute)


Repeat
	ClearScreen(RGB(0,0,0))
	
	ExamineMouse()
	DisplayTransparentSprite(spriteSPR, MouseX(), MouseY())
	FlipBuffers()
	Repeat
		event = WindowEvent()
		If event = #PB_Event_CloseWindow
			Break
		EndIf
	Until event = #Null
	ExamineKeyboard()
Until event = #PB_Event_CloseWindow Or KeyboardReleased(#PB_Key_Escape)
End
Thanks. :)
Now these points of data make a beautiful line,
And we're out of Beta, we're releasing on time.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 565
Joined: Tue Jan 04, 2011 6:21 pm

Re: RotateSprite issue under DirectX9

Post by SPH »

Yes, there is a bug (a cutout) with the Directx9 subsystem

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
User avatar
diceman
User
User
Posts: 66
Joined: Tue Apr 10, 2018 9:42 pm

Re: RotateSprite issue under DirectX9

Post by diceman »

Thanks for confirmation. Waiting for this to get fixed, as it is breaking some visual effects in my game. :)
Now these points of data make a beautiful line,
And we're out of Beta, we're releasing on time.
Post Reply