X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprojection.cpp;h=dc690f49f8d65376e7d858f84a0a38488c4b446f;hb=1d59ea8601436164f8bfc114da3941cb0871e87b;hp=2cc2833f18c23cc597d78b7aed541c1857cabba2;hpb=bdd9a8e26efad3ba349e4ffd58171cfee3cacfb0;p=libs%2Fgl.git diff --git a/source/projection.cpp b/source/projection.cpp index 2cc2833f..dc690f49 100644 --- a/source/projection.cpp +++ b/source/projection.cpp @@ -6,15 +6,17 @@ Distributed under the LGPL */ #include -#include "gl.h" +#include "matrix.h" #include "projection.h" namespace Msp { namespace GL { +extern MatrixStack *active_stack; + void ortho(double left, double right, double bottom, double top, double nearr, double farr) { - glOrtho(left, right, bottom, top, nearr, farr); + *active_stack *= Matrix::ortho(left, right, bottom, top, nearr, farr); } void ortho_centered(double width, double height) @@ -34,12 +36,12 @@ void ortho_topleft(double width, double height) void frustum(double left, double right, double bottom, double top, double nearr, double farr) { - glFrustum(left, right, bottom, top, nearr, farr); + *active_stack *= Matrix::frustum(left, right, bottom, top, nearr, farr); } void frustum_centered(double width, double height, double nearr, double farr) { - glFrustum(-width/2, width/2, -height/2, height/2, nearr, farr); + frustum(-width/2, width/2, -height/2, height/2, nearr, farr); } void perspective(double fov_y, double aspect, double nearr, double farr)