CreateLine3D() possible bug?

Everything related to 3D programming
User avatar
Mijikai
Addict
Addict
Posts: 1520
Joined: Sun Sep 11, 2016 2:17 pm

CreateLine3D() possible bug?

Post by Mijikai »

CreateEntity() fails on the CreateLine3D() mesh!
Tested on Linux + PB 6.20.

Can someone confirm?

Code:

Code: Select all

InitEngine3D() 
InitSprite() 

OpenWindow(0, 0, 0, 640, 480, "Line3D example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, 0, 0, 0)

; Light
CreateLight(#PB_Any, RGB(25, 25, 180), -5, 10, 5, #PB_Light_Point)

; Camera
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 2, 1, 3, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)

; Erstelle die Linie und binde sie an die Szene
CreateLine3D(0, 0, 0, 0, RGB(255, 0, 0), 1, 1, 1, RGB(0, 0, 255))
Debug CreateEntity(0, MeshID(0), #PB_Material_None);<- does not create the entity!

Repeat
  
  RotateEntity(0,0.5,0.5,0.5,#PB_Relative);<- can not rotate the line!
  
  RenderWorld()
  FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow
miso
Enthusiast
Enthusiast
Posts: 466
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: CreateLine3D() possible bug?

Post by miso »

It's intended, it can only be recreated to a new position. Using the CreatEntity() command in the example of the pb documentation is wrong.
I guess you are working on a 3d model editor ;)
User avatar
Mijikai
Addict
Addict
Posts: 1520
Joined: Sun Sep 11, 2016 2:17 pm

Re: CreateLine3D() possible bug?

Post by Mijikai »

Ok, thats pretty meh if i need to recreate them just to move them around.
The documentation made it look more useful. :(
miso wrote: Wed Mar 12, 2025 1:04 am I guess you are working on a 3d model editor ;)
An editor would be nice (something like picoCad) :)
Currently i try to convert a simple 2d game.
miso
Enthusiast
Enthusiast
Posts: 466
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: CreateLine3D() possible bug?

Post by miso »

Ok, thats pretty useless if i need to recreate them just to move them around.
The documentation made it look more useful. :(
It might depend on the needs, I find it quiet useful.
(something like picoCad)
Hah, I'm also inspired by pico-8 on some personal project. Namely the sprite editor, map editor + sound editor.
I'm also thinking on an editor with a very different approach to anything I've seen. (for absolutely lowpoly stuff, with tiny binary size)

I'm not sure if it will be good or not.
threedslider
Enthusiast
Enthusiast
Posts: 396
Joined: Sat Feb 12, 2022 7:15 pm

Re: CreateLine3D() possible bug?

Post by threedslider »

Mijikai wrote: Wed Mar 12, 2025 10:38 pm An editor would be nice (something like picoCad) :)
Hello @Mijikai, me too I am working on PureCAD but i need to advance a little bit :lol:

Good luck on that and I am looking forward to this as well :mrgreen:

Happy coding !
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: CreateLine3D() possible bug?

Post by Psychophanta »

Imo it is a bug, or a fault in the documentation.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
Mijikai
Addict
Addict
Posts: 1520
Joined: Sun Sep 11, 2016 2:17 pm

Re: CreateLine3D() possible bug?

Post by Mijikai »

Thanks everyone.
I decided to go ahead and created a post it in the Linux Bug section.
Post Reply