summaryrefslogtreecommitdiff
path: root/src/mesa/main/mtypes.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-17 08:35:55 -0600
committerBrian Paul <brianp@vmware.com>2009-06-17 08:38:38 -0600
commit3f856c6b6b7fa95ef97a8712876de88d7d57932e (patch)
tree7526ac71fb959936334a1dbb63c6fc5755fcc98a /src/mesa/main/mtypes.h
parentd18c57aaeac37cde0cb551191ecd3c3a56a0ffba (diff)
mesa: rework viewport/scissor initialization code
The first time a context is bound to a drawable, the viewport and scissor bounds are initialized to the buffer's size. This is actually a bit tricky. A new _mesa_check_init_viewport() function is called in several places to check if the viewport has been initialized. We also use a new ctx->ViewportInitialized flag instead of the overloaded ctx->FirstTimeCurrent flag.
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r--src/mesa/main/mtypes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 50dc2def87..8872c8963f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2947,6 +2947,8 @@ struct __GLcontextRec
GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
GLbitfield NewState; /**< bitwise-or of _NEW_* flags */
+ GLboolean ViewportInitialized; /**< has viewport size been initialized? */
+
GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */
/** \name Derived state */