mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 23:10:23 +01:00
intel: save/restore GL matrix mode in intel_meta_set_passthrough_transform(), intel_meta_restore_transform()
(cherry picked from master, commit 723648f2ee)
This commit is contained in:
parent
e6df67bf66
commit
2fd9c2ebd6
2 changed files with 4 additions and 0 deletions
|
|
@ -168,6 +168,7 @@ struct intel_context
|
|||
|
||||
GLint saved_vp_x, saved_vp_y;
|
||||
GLsizei saved_vp_width, saved_vp_height;
|
||||
GLenum saved_matrix_mode;
|
||||
} meta;
|
||||
|
||||
GLint refcount;
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ intel_meta_set_passthrough_transform(struct intel_context *intel)
|
|||
intel->meta.saved_vp_y = ctx->Viewport.Y;
|
||||
intel->meta.saved_vp_width = ctx->Viewport.Width;
|
||||
intel->meta.saved_vp_height = ctx->Viewport.Height;
|
||||
intel->meta.saved_matrix_mode = ctx->Transform.MatrixMode;
|
||||
|
||||
_mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);
|
||||
|
||||
|
|
@ -202,6 +203,8 @@ intel_meta_restore_transform(struct intel_context *intel)
|
|||
_mesa_MatrixMode(GL_MODELVIEW);
|
||||
_mesa_PopMatrix();
|
||||
|
||||
_mesa_MatrixMode(intel->meta.saved_matrix_mode);
|
||||
|
||||
_mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y,
|
||||
intel->meta.saved_vp_width, intel->meta.saved_vp_height);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue