Problem with Sprite3D
Posted: Wed Oct 29, 2003 5:26 am
When I run this code I see a red line on the left side of my Sprite3D, because when bilinear filtering is enabled and the sprite is stretched the texture is wrapping around.
It looks like maybe Sprite3D is using Direct3D's Wrap texture addressing mode but I think the Clamp address mode is preferable for #PB_Sprite_Texture if it stops this wrapping problem (Of course I might be completely wrong here, I'm just guessing how Sprite3D and Sprite3DQuality work)
It looks like maybe Sprite3D is using Direct3D's Wrap texture addressing mode but I think the Clamp address mode is preferable for #PB_Sprite_Texture if it stops this wrapping problem (Of course I might be completely wrong here, I'm just guessing how Sprite3D and Sprite3DQuality work)
Code: Select all
InitSprite()
InitSprite3D()
InitKeyboard()
OpenScreen(640, 480, 16, "screen")
CreateSprite(0,64,64,#PB_Sprite_Texture)
StartDrawing(SpriteOutput(0))
Box(0,0,32,64,RGB(0,0,64))
Box(32,0,32,64,RGB(255,0,0))
StopDrawing()
CreateSprite3D(0,0)
Sprite3DQuality(1)
ZoomSprite3D(0, 256, 256)
Repeat
FlipBuffers()
ClearScreen(0,0,0)
Start3D()
DisplaySprite3D(0,192,112,255)
Stop3D()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape)
End