X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmatrix.cpp;h=9af850d2dfa68956037be0e4854716813fdc79a6;hb=e759062876ee7fc81d1c2f40818d5bf97898d53d;hp=7a91078621e647d293af0628d06044c95e719fcd;hpb=4c89817d6e060323ec1ddd275f3265cea688c650;p=libs%2Fgl.git diff --git a/source/matrix.cpp b/source/matrix.cpp index 7a910786..9af850d2 100644 --- a/source/matrix.cpp +++ b/source/matrix.cpp @@ -20,6 +20,16 @@ void load_identity() glLoadIdentity(); } +void load_matrix(const float *matrix) +{ + glLoadMatrixf(matrix); +} + +void load_matrix(const double *matrix) +{ + glLoadMatrixd(matrix); +} + void mult_matrix(const float *matrix) { glMultMatrixf(matrix); @@ -40,5 +50,25 @@ void pop_matrix() glPopMatrix(); } +void translate(float x, float y, float z) +{ + glTranslatef(x, y, z); +} + +void rotate(float a, float x, float y, float z) +{ + glRotatef(a, x, y, z); +} + +void scale(float x, float y, float z) +{ + glScalef(x, y, z); +} + +void scale_uniform(float s) +{ + scale(s, s, s); +} + } // namespace GL } // namespace Msp