sets the projection matrix * Sets the projection matrix to use when rendering. * * @name render.set_projection * @param matrix [type:matrix4] projection matrix * @examples * * How to set the projection to orthographic with world origo at lower left, * width and height as set in project settings and depth (z) between -1 and 1: * * ```lua * rend
| 1928 | * ``` |
| 1929 | */ |
| 1930 | int RenderScript_SetProjection(lua_State* L) |
| 1931 | { |
| 1932 | RenderScriptInstance* i = RenderScriptInstance_Check(L); |
| 1933 | dmVMath::Matrix4 projection = *dmScript::CheckMatrix4(L, 1); |
| 1934 | dmVMath::Matrix4* matrix = new dmVMath::Matrix4; |
| 1935 | *matrix = projection; |
| 1936 | if (InsertCommand(i, Command(COMMAND_TYPE_SET_PROJECTION, (uint64_t)matrix))) |
| 1937 | return 0; |
| 1938 | else |
| 1939 | return luaL_error(L, "Command buffer is full (%d).", i->m_CommandBuffer.Capacity()); |
| 1940 | } |
| 1941 | |
| 1942 | /*# |
| 1943 | * @name render.FRUSTUM_PLANES_SIDES |
nothing calls this directly
no test coverage detected