light me up
BlitzMax Forums/BlitzMax Beginners Area/light me up
| ||
I use this function to fill a grid with textured trianglesFunction DrawTexTri( GLTexture:Int, x0:Float , y0:Float , x1:Float , y1:Float , x2:Float , y2:Float) glBindTexture(GL_TEXTURE_2D,glTexture) glEnable(GL_TEXTURE_2D) glBegin GL_TRIANGLES glTexCoord2f 0.0 , 0.0 glVertex2f x0 , y0 glTexCoord2f 1.0 , 0.0 glVertex2f x1 , y1 glTexCoord2f 1.0 , 1.0 glVertex2f x2 , y2 glEnd End Function nice... Since I want it to represent a landscape, I want to add lighting and shadows. Now, what would minimal be needed to achieve that? Would it require something like minib3d, or can it be done with less overhead? [EDIT] My goal is an orthogonal view of an Hexagonal grid (made from 6 Triangles) My attempts in Blitz3D were quite hopeless; because of difficulties in transfering 3D and 2D locations, but mainly because I suck in 3D. So I tried it like this; A Grid in 2d and Filling the Triangles with DrawTexTri().(at least now I know every location of the grid in 2d...) In case this approach is futile, I would be thankful if someone knows a way this can be done. [/EDIT] |