- GLfloat half_width = ctx->Viewport.Width / 2.0;
- GLfloat half_height = ctx->Viewport.Height / 2.0;
- GLfloat half_depth = (ctx->Viewport.Far - ctx->Viewport.Near) / 2.0;
+ GLfloat half_width = (GLfloat)ctx->Viewport.Width * 0.5f;
+ GLfloat half_height = (GLfloat)ctx->Viewport.Height * 0.5f;
+ GLfloat half_depth = (GLfloat)(ctx->Viewport.Far - ctx->Viewport.Near) * 0.5f;