Posted 02 January 2015 - 03:48 AM
I am working on a 3d map display thing for turtles, and I've come to a bit of a problem at the rendering.
Transforming 3d coordinates to 2d coordinates is relatively easy, and I have that working nicely. However, trying to then draw on textures is seemingly impossible, as I have to map the 2d coordinates of the texture onto 2d coordinates of the quad I'm trying to draw to. A quad (at least my definition of it) is a quadrilateral with no bounds, i.e. any of the corners can be any coordinates, completely unrelated to eachother.
I have it at a semi-working stage… it does draw in 3d, but is a) quite laggy and B)/> glitches out frequently, particularly at long distances.
Working:
A bit further to the right:
Does anyone have any ideas on how to do the coordinate transformation from a rectangular 2d image to a quad?
Transforming 3d coordinates to 2d coordinates is relatively easy, and I have that working nicely. However, trying to then draw on textures is seemingly impossible, as I have to map the 2d coordinates of the texture onto 2d coordinates of the quad I'm trying to draw to. A quad (at least my definition of it) is a quadrilateral with no bounds, i.e. any of the corners can be any coordinates, completely unrelated to eachother.
I have it at a semi-working stage… it does draw in 3d, but is a) quite laggy and B)/> glitches out frequently, particularly at long distances.
Working:
A bit further to the right:
Does anyone have any ideas on how to do the coordinate transformation from a rectangular 2d image to a quad?