mesh - mesh handle brush (optional) - brush handle |
Creates a surface attached to a mesh and returns the surface's handle. Surfaces are sections of mesh which are then used to attach triangles to. You must have at least one surface per mesh in order to create a visible mesh, however you can use as many as you like. Splitting a mesh up into lots of sections allows you to affect those sections individually, which can be a lot more useful than if all the surfaces are combined into just one. |
dxGraphics3D 640,480 dxSetBuffer dxBackBuffer() mesh = dxCreateMesh() surf = dxCreateSurface(mesh) v0 = dxAddVertex (surf, -5,-5,0, 0 ,0) v1 = dxAddVertex (surf, 5,-5,0, 1 ,0) v2 = dxAddVertex (surf, 0, 5,0, 0.5,1) tri = dxAddTriangle (surf,v0,v2,v1) cam = dxCreateCamera() dxMoveEntity cam, 0,0,-7 dxRenderWorld dxFlip dxWaitKey End |