- GLfloat x = ctx->Viewport.X;
- GLfloat y = ctx->Viewport.Y;
- GLfloat z = ctx->Viewport.Near;
- 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;
- struct pipe_viewport_state vp;
+ GLfloat x = ctx->ViewportArray[i].X;
+ GLfloat y = ctx->ViewportArray[i].Y;
+ GLfloat z = ctx->ViewportArray[i].Near;
+ GLfloat half_width = ctx->ViewportArray[i].Width * 0.5f;
+ GLfloat half_height = ctx->ViewportArray[i].Height * 0.5f;
+ GLfloat half_depth = (GLfloat)(ctx->ViewportArray[i].Far - ctx->ViewportArray[i].Near) * 0.5f;