diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_matrix.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_matrix.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_matrix.cc b/source/blender/gpu/intern/gpu_matrix.cc index 94fd44f832b..b46860cf0f4 100644 --- a/source/blender/gpu/intern/gpu_matrix.cc +++ b/source/blender/gpu/intern/gpu_matrix.cc @@ -429,7 +429,7 @@ void GPU_matrix_frustum_set( void GPU_matrix_perspective_set(float fovy, float aspect, float near, float far) { - float half_height = tanf(fovy * (float)(M_PI / 360.0)) * near; + float half_height = tanf(fovy * float(M_PI / 360.0)) * near; float half_width = half_height * aspect; GPU_matrix_frustum_set(-half_width, +half_width, -half_height, +half_height, near, far); } @@ -669,13 +669,13 @@ BLI_STATIC_ASSERT(GPU_PY_MATRIX_STACK_LEN + 1 == MATRIX_STACK_DEPTH, "define mis int GPU_matrix_stack_level_get_model_view() { GPUMatrixState *state = Context::get()->matrix_state; - return (int)state->model_view_stack.top; + return int(state->model_view_stack.top); } int GPU_matrix_stack_level_get_projection() { GPUMatrixState *state = Context::get()->matrix_state; - return (int)state->projection_stack.top; + return int(state->projection_stack.top); } /** \} */ @@ -700,7 +700,7 @@ float GPU_polygon_offset_calc(const float (*winmat)[4], float viewdist, float di if (depth_fac == 0.0f) { /* Hard-code for 24 bit precision. */ int depthbits = 24; - depth_fac = 1.0f / (float)((1 << depthbits) - 1); + depth_fac = 1.0f / float((1 << depthbits) - 1); } ofs = (-1.0 / winmat[2][2]) * dist * depth_fac; |