summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.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/context.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/context.h')
-rw-r--r--src/mesa/main/context.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 6b3e1b2b97..0531ae8ee8 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -130,6 +130,9 @@ extern void
_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
+extern void
+_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height);
+
extern GLboolean
_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer );