QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: Aureal on March 27, 2018, 01:54:52 pm
-
Knowing both x and y co-ordinates (which have already been projected from 3D space) of every vertex of the cube, how would I map a texture to its face(s)? I've seen examples using _MAPTRIANGLE, but I'm not sure whether I have to use it, neither how to, can I get some help?
I've attached an image for reference
-
Hello,
I solved this a few years ago by stitching two instances of _MAPTRIANGLE together. There is probably a better way to do it, and the math got a little heavy - as the program otherwise is designed for QB45/SCREEN 12. (Take away _MAPTRIANGLE and it's back to solid colors or wireframe.)
I think I called it QUADLAND or something on the *.net forums. I can dig it out if we need, but I'm hoping there is an easier way by using GL commands more directly.
-
Hi Aureal. Try look to Galleon´s code here: http://www.[abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]/forum/index.php?topic=12257.0 he use _MAPTRIANGLE for texturing in this program.