Page 1 of 1

3D + Sprite with Purebasic 6.30 Beta 3

Posted: Thu Oct 09, 2025 9:48 pm
by Erlend
Hello all Linux nerds :-)

No sprite output over 3d screen on my 2 systems, can someone else check below code to confirm / or not.
Sprite is supposed to be displayed on top of rotating torus...

Code: Select all

InitEngine3D()
InitSprite():InitKeyboard()

ExamineDesktops()
OpenWindow(0, 0,0, DesktopWidth(0)*0.8,DesktopHeight(0)*0.8, "test - [Esc] quit",#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)

CreateSprite(0,256,256,#PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AllChannels)
Circle(128,128,127,$8800ff00)
StopDrawing()

CreateCamera(0, 0, 0, 100, 100):MoveCamera(0,0,10,-20):CameraLookAt(0,0,0,0)
CreateLight(0,$ffffff, 0, 10000, -10000)
AmbientColor($111111*3)
CameraBackColor(0,$444488)

CreateMaterial(0,0,$ff)
MaterialShininess(0,128,$111111*4)
CreateTorus(0,10,4)
CreateEntity(0,MeshID(0),MaterialID(0))

Define.f MouseX,Mousey,depx,depz,dist,val
Repeat
  While WindowEvent():Wend
  ExamineKeyboard()
  RotateEntity(0,1,1,1,#PB_Relative) 
  RenderWorld()
  DisplayTransparentSprite(0,100,100)
  FlipBuffers()    
Until KeyboardReleased(#PB_Key_Escape)

BR
Erlend

Re: 3D + Sprite

Posted: Fri Oct 10, 2025 12:37 am
by moulder61
Hi Erlend,

It looks like this on my Debian 13 install using PB 6.21 x64.

Image

Moulder.

3D + Sprite with Purebasic 6.30 Beta 3

Posted: Fri Oct 10, 2025 2:30 pm
by Erlend
Yes, sorry, will update title, problem I have is with it is with Purebasic 6.30 Beta 3.

BR
Erlend

Re: 3D + Sprite with Purebasic 6.30 Beta 3

Posted: Fri Oct 10, 2025 2:42 pm
by Fred
Seems to work here, I have the same pic than moulder

Re: 3D + Sprite with Purebasic 6.30 Beta 3

Posted: Fri Oct 10, 2025 4:58 pm
by moulder61
@Erlend,

It doesn't work for me in PB 6.30 beta 3 either. :(

I'm using Debian 13 at the moment, but I also have PB installed in Void and Ubuntu so I'll check those out later to see if they behave differently?

Moulder.

Re: 3D + Sprite with Purebasic 6.30 Beta 3

Posted: Fri Oct 10, 2025 5:23 pm
by moulder61
@Erlend

It also doesn't seem to work for me using PB 6.30 beta 3 on Void Linux or Ubuntu 24.04. All my systems are x64.

@Fred

Which version of Linux are you testing it on?

Moulder.

Re: 3D + Sprite with Purebasic 6.30 Beta 3

Posted: Sat Oct 11, 2025 10:28 am
by Erlend
@Moulder:
As far as I can see is that above code works fine on PB 6.21 but not on PB 6.30 b3 on our (Erlend / Moulder) systems.

@Fred:
As Moulder said what PB version and OS did you test it on?

BR
Erlend

Re: 3D + Sprite with Purebasic 6.30 Beta 3

Posted: Sat Oct 11, 2025 10:44 am
by Erlend
Ok, so I did a little bit of testing:

First: I created a new "install" of 6.21 in on directory and another dir with 6.30 b3.
Second: copied over pblibs: 2ddrawing, 2ddrawingbase and screengadget from 6.30 b3 directory to PB 6.21 libs directory and run ScreenGadgetMultipleWindow.pb

Result:
Animations of ScreenGadget windows actually shows perfectly but disappears after animation is done.

BR
Erlend

Re: 3D + Sprite with Purebasic 6.30 Beta 3

Posted: Sat Oct 11, 2025 12:09 pm
by moulder61
Hi Erlend,

I would assume, rightly or wrongly, that if your code stays the same but behaves differently in different versions of PB, that PB has changed somehow?

I had an issue recently regarding transparent sprites and it was because PB had a new flag added, #PB_Sprite_Transparent, which my older version(at the time) didn't support.

I tried using that on your code in a few ways, to see if it made a difference, but it didn't seem to help? Then again, that could be because I don't understand it properly. :oops:

Moulder.