diff --git a/example.ez80 b/example.ez80 index 78091ce..5352bb0 100644 --- a/example.ez80 +++ b/example.ez80 @@ -26,9 +26,13 @@ ld de, $D30000-2 call vxZX7Uncompress ; uncompress the texture generated by convpng +; about vertex coordinate : +; the format inputed in glib is pure integer 16 bits coordinates, ]-32768,32768[ +; A 1.0 coordinate in blender is equivalent to 256 in glib + ; setup global variable for rendering, euler angle and the translation of WorldMatrix -; about translation : the format inputed in glib is pure integer 16 bits coordinates. On blender the conversion is made like this : 1.0=256 +; about translation : ; translation are added post transformation. So they carry the multiplication with the matrice, which aren't divided by the fixed point value of 1.0 (the matrix equivalent or 64). To have a translation of 1.0 in worldview matrix, the translation need to be 256*64 = 16384. ; However, there is two type of matrix in glib : the model matrix, which is in MODELSPACE and the world type matrix in WORLDSPACE. Modelspace matrix have only a 16 bits translation and doesn't have the 64 factor described previously.