Je butte sur un autre soucis. J'ai pris l'exemple fourni avec PureBasic sur l’utilisation des sprites3D qui marche nikel en plein écran. J'ai juste remplacé le plein écran par un
OpenWindowedScreen et là le curseur de la souris devient inutilisable.
Code : Tout sélectionner
If InitSprite() = 0 Or InitKeyboard() = 0
MessageRequester("Error", "Sprite system can't be initialized", 0)
End
EndIf
If InitSprite3D() = 0
MessageRequester("Error", "Sprite3D system can't be initialized correctly", 0)
End
EndIf
;
; Now, open a 640*480 - 16 bits (65000 colours) screen
;
OpenWindow(0,0,0,640,480,"toto")
If OpenWindowedScreen(WindowID(0),0,0,640, 480, 0, 0,0)
; Load our 16 bit sprite (which is a 24 bit picture in fact, as BMP doesn't support 16 bit format)
;
LoadSprite(0, "Data/Geebee2.bmp", #PB_Sprite_Texture)
CreateSprite3D(0, 0)
CreateSprite3D(1, 0)
CreateSprite3D(2, 0)
Sprite3DQuality(1)
TransparentSpriteColor(0, RGB(255, 0, 255)) ; Our pink is transparent :)
Repeat
; Inverse the buffers (the back become the front (visible)... And we can do the rendering on the back)
FlipBuffers()
ClearScreen(RGB(0,50,128))
; Draw our sprite
;
If Start3D()
DisplaySprite3D(0, 0, 30)
DisplaySprite3D(0, x+100, 100, x)
DisplaySprite3D(0, x*2, 100, x)
; Zoom..
;
ZoomSprite3D(1, x, x)
RotateSprite3D(1, x, 0)
DisplaySprite3D (1, 0, 100, x/2)
DisplaySprite3D (1, x*2, 100, x)
DisplaySprite3D (1, 0, 100, x/2)
DisplaySprite3D (1, x*2, 200+x, x)
Stop3D()
EndIf
ExamineKeyboard()
x+1
Until KeyboardPushed(#PB_Key_Escape)
Else
MessageRequester("Error", "Can't open a 640*480 - 16 bit screen !", 0)
EndIf
End
J'ai tenté avec un
Delay(10) dans la boucle mais rien à faire, quelque chose m'échappe...