- Added: BuildMeshManualLod(), BuildMeshLod(), MeshVertex(),
CreateDataMesh()
How to use MeshVertex ?
Thanks
How to use MeshVertex in PB 570b1
Re: How to use MeshVertex in PB 570b1
MeshVertex() is an all-in-one function to define a vertex, instead of using MeshVertexPosition, MeshVertexColor, MeshVertexNormal
and MeshVertexTextureCoordinate
and MeshVertexTextureCoordinate
Re: How to use MeshVertex in PB 570b1
Any chance for a small example?
Edit:
There is something wrong with the number of parameters.
TIA
Edit:
There is something wrong with the number of parameters.
TIA
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Re: How to use MeshVertex in PB 570b1
You are right, it will be fixed with in the next beta
Re: How to use MeshVertex in PB 570b1
@Fred
Thanks
;Basic Example without knowing what the last parameter does.
Thanks
;Basic Example without knowing what the last parameter does.
Code: Select all
InitEngine3D()
InitSprite()
InitKeyboard()
ExamineDesktops()
OpenWindow(0, 0, 0, DesktopWidth(0), DesktopHeight(0), "MeshVertex", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0))
CreateCamera(0, 0, 0, 100, 100)
CreateMesh(0) ;just testing
MeshVertex( 0.5, 0, -0.5, 0, 1, 0, 0, 1, 0, 0.5)
MeshVertex(-0.5, 0, -0.5, 1, 1, 0, 0, 1, 0, 0.5)
MeshVertex( 0.5, 0, 0.5, 0, 0, 0, 0, 1, 0, 0.5)
MeshVertex(-0.5, 0, 0.5, 1, 0, 0, 0, 1, 0, 0.5)
MeshVertex( 0.5, 0, -0.5, 0, 1, 0, 0, 1, 0, 0.5)
MeshVertex(-0.5, 0, -0.5, 1, 1, 0, 0, 1, 0, 0.5)
MeshVertex( 0.5, 0, 0.5, 0, 0, 0, 0, 1, 0, 0.5)
MeshVertex(-0.5, 0, 0.5, 1, 0, 0, 0, 1, 0, 0.5)
MeshVertex( 0.5, 0, -0.5, 0, 1, 0, 0, 1, 0, 0.5)
FinishMesh(#True)
CreateTexture(0, 60, 60)
StartDrawing(TextureOutput(0))
FrontColor($333333) : BackColor($FFFFFF)
DrawingMode(#PB_2DDrawing_Gradient)
BoxedGradient(0, 0, 60, 60)
Box(0, 0, 60, 60)
StopDrawing()
CreateMaterial(0, TextureID(0)) : MaterialCullingMode(0, #PB_Material_NoCulling)
CreateEntity(0, MeshID(0), MaterialID(0), 0, 0, -5)
Repeat
Repeat
ev = WindowEvent()
Until ev = 0
RotateEntity(0, 0.2, 0.2, 0.2, #PB_Relative)
RenderWorld()
FlipBuffers()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape)
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.