Hey i'm stumped, on my previous versions of my game i'm just creating grass and using linepick() to randomly position it on my terrain... However it causes a major slowdown in framerate so what i'm trying to do is make a single surface system... but how would i go about duplicating my 3 vertices / 1 triangle without creating the next surface?
here's my code
here's my code
;Grass Single Surface Grass System AppTitle "Vertex Test" Graphics3D 800,600,16,2 SetBuffer BackBuffer() Global mesh Global grasstex ;Create Mesh mesh = CreateMesh() ;Create Surface surface = CreateSurface(mesh) ;Create Vertices v0 = AddVertex(surface,0,2,0,0.5,-1,0) v1 = AddVertex(surface,2,0,0,1,0,0) v2 = AddVertex(surface,-2,0,0,0,0,0) ;Create Triangle grass = AddTriangle(surface,v0,v1,v2) EntityFX mesh, 16 ;Load Grass Texture grasstex = LoadTexture("HeightMap\Grass\Weed.jpg",4) EntityTexture mesh, grasstex ;Create Camera camera = CreateCamera() PositionEntity camera,0,0,-2 While Not KeyHit(1) If KeyDown(200) MoveEntity camera,0,0,0.1 EndIf If KeyDown(208) MoveEntity camera,0,0,-0.1 EndIf RenderWorld() Flip Wend End