diff --git a/inc/hgl/math/Matrix.h b/inc/hgl/math/Matrix.h index 4983bd04..59f59e76 100644 --- a/inc/hgl/math/Matrix.h +++ b/inc/hgl/math/Matrix.h @@ -16,6 +16,7 @@ namespace hgl Matrix4f two_dim; //2D矩阵 Matrix4f projection; +// Matrix4f inverse_projection; Matrix4f modelview; Matrix4f mvp; Matrix3f normal; diff --git a/src/Platform/Win/WinMessage.cpp b/src/Platform/Win/WinMessage.cpp index 61115ffe..0a2c8088 100644 --- a/src/Platform/Win/WinMessage.cpp +++ b/src/Platform/Win/WinMessage.cpp @@ -201,7 +201,7 @@ namespace hgl const int y=HIWORD(lParam); \ \ win->OnMouseMove(x,y); \ - win->OnMouse##action(x,y,mb##button|GetKeyFlags(wParam)); \ + win->OnMouse##action(x,y,mb##button|GetMouseKeyFlags(wParam)); \ } WMEF_MOUSE(Left,Down); diff --git a/src/SceneGraph/Camera.cpp b/src/SceneGraph/Camera.cpp index 3fb63503..3158e237 100644 --- a/src/SceneGraph/Camera.cpp +++ b/src/SceneGraph/Camera.cpp @@ -30,6 +30,8 @@ namespace hgl else matrix.projection=ortho(width,height,znear,zfar); //这个算的不对 + //matrix.inverse_projection=matrix.projection.Inverted(); + matrix.modelview=hgl::graph::LookAt(eye,center,up_vector); matrix.mvp=matrix.projection*matrix.modelview;