[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
We have a function al_ortho_transform in 5.1 which is the only 3D
transformation we have so far. I propose we change it slightly (I don't
like the name and parameter order) and add four more functions:
al_orthographic_transform(t, x1, y1, z1, x2, y2, z2)
Renamed and parameters re-ordered to left/top/near and
right/bottom/far, I think that's less confusing. Does the same
as glOrtho did in desktop OpenGL before version 3.0.
al_perspective_transform(t, x1, y1, z1, x2, y2, z2)
Same as above except use perspective. Same as glFrustum in
OpenGL2.
al_translate_transform_3d(t, x, y, z)
al_scale_transform_3d(t, x, y, z)
al_rotate_transform_3d(t, x, y, z, angle)
This is just vector_rotation_matrix from A4. The Euler angle
matrix can easily be constructed with that so I think it's
sufficient to have just this one. Same as glRotate in OpenGL2.
With this and the new VBO functions SiegeLord added and combined with
the shaders addon A5 actually is capable of doing full 3D rendering
independent of OpenGL/DirectX. We kinda "abuse" the fact that the
rendering of all polygons is done by shaders... and the primitives
addon I believe now is capable of storing full 3d models together with
their vertex attributes on the GPU :)