mirror of https://github.com/bjornbytes/lovr.git
Remove getProjection from now;
This commit is contained in:
parent
ad0e014c5a
commit
0d7d57acea
|
@ -129,11 +129,6 @@ void lovrGraphicsSetShader(Shader* shader) {
|
|||
glUseProgram(shader->id);
|
||||
}
|
||||
|
||||
void lovrGraphicsGetProjection(float* near, float* far, float* fov) {
|
||||
float aspect;
|
||||
mat4_getProjection(state.projection, near, far, fov, &aspect);
|
||||
}
|
||||
|
||||
void lovrGraphicsSetProjection(float near, float far, float fov) {
|
||||
int width, height;
|
||||
glfwGetWindowSize(window, &width, &height);
|
||||
|
|
|
@ -26,7 +26,6 @@ void lovrGraphicsGetClearColor(float* r, float* g, float* b, float* a);
|
|||
void lovrGraphicsSetClearColor(float r, float g, float b, float a);
|
||||
Shader* lovrGraphicsGetShader();
|
||||
void lovrGraphicsSetShader(Shader* shader);
|
||||
void lovrGraphicsGetProjection(float* near, float* far, float* fov);
|
||||
void lovrGraphicsSetProjection(float near, float far, float fov);
|
||||
void lovrGraphicsSetProjectionRaw(mat4 projection);
|
||||
int lovrGraphicsPush();
|
||||
|
|
|
@ -12,7 +12,6 @@ const luaL_Reg lovrGraphics[] = {
|
|||
{ "getClearColor", l_lovrGraphicsGetClearColor },
|
||||
{ "setClearColor", l_lovrGraphicsSetClearColor },
|
||||
{ "setShader", l_lovrGraphicsSetShader },
|
||||
{ "getProjection", l_lovrGraphicsGetProjection },
|
||||
{ "setProjection", l_lovrGraphicsSetProjection },
|
||||
{ "push", l_lovrGraphicsPush },
|
||||
{ "pop", l_lovrGraphicsPop },
|
||||
|
@ -98,15 +97,6 @@ int l_lovrGraphicsSetShader(lua_State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int l_lovrGraphicsGetProjection(lua_State* L) {
|
||||
float near, far, fov;
|
||||
lovrGraphicsGetProjection(&near, &far, &fov);
|
||||
lua_pushnumber(L, near);
|
||||
lua_pushnumber(L, far);
|
||||
lua_pushnumber(L, fov);
|
||||
return 3;
|
||||
}
|
||||
|
||||
int l_lovrGraphicsSetProjection(lua_State* L) {
|
||||
float near = luaL_checknumber(L, 1);
|
||||
float far = luaL_checknumber(L, 2);
|
||||
|
|
|
@ -15,7 +15,6 @@ int l_lovrGraphicsGetClearColor(lua_State* L);
|
|||
int l_lovrGraphicsSetClearColor(lua_State* L);
|
||||
int l_lovrGraphicsGetShader(lua_State* L);
|
||||
int l_lovrGraphicsSetShader(lua_State* L);
|
||||
int l_lovrGraphicsGetProjection(lua_State* L);
|
||||
int l_lovrGraphicsSetProjection(lua_State* L);
|
||||
int l_lovrGraphicsPush(lua_State* L);
|
||||
int l_lovrGraphicsPop(lua_State* L);
|
||||
|
|
|
@ -117,10 +117,6 @@ mat4 mat4_setProjection(mat4 matrix, float near, float far, float fov, float asp
|
|||
return matrix;
|
||||
}
|
||||
|
||||
void mat4_getProjection(mat4 matrix, float* near, float* far, float* fov, float* aspect) {
|
||||
*near = *far = *fov = *aspect = 0.f;
|
||||
}
|
||||
|
||||
mat4 mat4_translate(mat4 matrix, float x, float y, float z) {
|
||||
float translation[16];
|
||||
mat4_setTranslation(translation, x, y, z);
|
||||
|
|
|
@ -10,7 +10,6 @@ mat4 mat4_setTranslation(mat4 matrix, float x, float y, float z);
|
|||
mat4 mat4_setRotation(mat4 matrix, float w, float x, float y, float z);
|
||||
mat4 mat4_setScale(mat4 matrix, float x, float y, float z);
|
||||
mat4 mat4_setProjection(mat4 matrix, float near, float far, float fov, float aspect);
|
||||
void mat4_getProjection(mat4 matrix, float* near, float* far, float* fov, float* aspect);
|
||||
mat4 mat4_translate(mat4 matrix, float x, float y, float z);
|
||||
mat4 mat4_rotate(mat4 matrix, float w, float x, float y, float z);
|
||||
mat4 mat4_scale(mat4 matrix, float x, float y, float z);
|
||||
|
|
Loading…
Reference in New Issue