I am learn pure basic and i am an noob in this programming languale.
So i try to create an vertex face, just create an mesh without loading any model.
Just this is my code, written in 'pure basic 5.x', using the 3d library, they are
build in itself, my code looks like this, an simple test to learn 3d programming:
Code: Select all
;Init Engine
InitEngine3D()
InitSprite()
;Open an Window
OpenWindow(0, 0, 0, 640, 480, "Cube example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, 0, 0, 0)
; Create an light
CreateLight(#PB_Any, RGB(25, 25, 180), 86, 120, 50, #PB_Light_Point)
; Create an Camera
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 100, 120, 100, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
; Create an vertex face
If CreateMesh(0, #PB_Mesh_TriangleFan, #PB_Mesh_Static)
MeshFace(1, 1, 1)
MeshFace(1, 1, -1)
MeshFace(1, -1, 1)
MeshFace(-1, 1, 1)
MeshFace(1, -1, -1)
MeshFace(-1, 1, -1)
MeshFace(-1, -1, 1)
MeshFace(-1, -1, -1)
EndIf
Repeat
RenderWorld()
FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow
So my question is how i can create 3d meshes, called vertex faces..
Can anyone give my simple examples, about 3d vertex meshes ?,
just i want to understand creating vertex meshes and also how
vertex triangles / faces technical works yet...
Can anyone help my to understand this, and even give my examples
for create 3d meshes into pure basic, just tell my also how vertexes works ?..
Thanks for help, Jamie