possible bug avec les sprites #PB_Sprite_Texture
Publié : dim. 19/oct./2008 13:02
voila je ne comprend pas ce qui ne vas pas a chaque lancement j'obtiens un resultat different a l'affichage.
est-ce un bug ? est-ce que quelqu'un peux eclairer ma lanterne ?
il n'y a un probleme qu'avec les sprite #pb_sprite_texture, que je l'affiche en 3D ou pas
est-ce un bug ? est-ce que quelqu'un peux eclairer ma lanterne ?
il n'y a un probleme qu'avec les sprite #pb_sprite_texture, que je l'affiche en 3D ou pas
Code : Tout sélectionner
;
;-----------initialisations
If InitSprite() = 0 Or InitKeyboard()=0 Or InitSound()=0 Or InitMouse()=0
MessageRequester("Error","DirectX 7+ is needed.",0)
EndIf
If InitSprite3D()=0
MessageRequester("Error","the game need a proper 3D card to work",0)
EndIf
;-----------ouverture ecran--------------
Global main=OpenWindow(#PB_Any,0,0,800,800,"",#PB_Window_ScreenCentered |#PB_Window_SystemMenu )
Global screen=OpenWindowedScreen(WindowID(main),0,0,800,800,0,0,0)
grid=CreateSprite(#PB_Any,64,64,#PB_Sprite_Texture)
grid2=CreateSprite(#PB_Any,64,64)
UseBuffer(grid)
ClearScreen($444444)
StartDrawing(SpriteOutput(grid))
Box(0,0,64,64,0)
Box(0,0,10,10,$ffffff)
StopDrawing()
UseBuffer(grid2)
ClearScreen($444444)
StartDrawing(SpriteOutput(grid2))
Box(0,0,64,64,0)
Box(0,0,10,10,$ffffff)
StopDrawing()
grid3D=CreateSprite3D(#PB_Any,grid)
UseBuffer(#PB_Default)
Repeat
ClearScreen(0)
ev=WaitWindowEvent(1)
x= WindowMouseX(main)
y= WindowMouseY(main)
Start3D()
DisplaySprite3D(grid3D,x,y,150)
Stop3D()
DisplayTransparentSprite(grid2,x+64,y)
DisplayTransparentSprite(grid,x+128,y)
FlipBuffers()
Until ev= #PB_Event_CloseWindow