summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-10-15 19:26:43 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-10-15 19:26:43 +0000
commit4d4add0972d1c4eca3b62edb581fe65697b061ff (patch)
tree43ffc8eeef20cc1f656dea66768cd3d1d4d8602b /src/mesa
parent606108ee4e3051e04c58dac90f1dc91ce369a3b0 (diff)
Added #if / #else / #endif around code related to framebuffer initialization
to describe what should be changed in the drivers.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f78a8cedf1..f6f9e90126 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1706,6 +1706,9 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
newCtx->NewState |= _NEW_BUFFERS;
+#if 1
+ /* We want to get rid of these lines: */
+
#if _HAVE_FULL_GL
if (!drawBuffer->Initialized) {
initialize_framebuffer_size(newCtx, drawBuffer);
@@ -1716,6 +1719,23 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
_mesa_resizebuffers(newCtx);
#endif
+
+#else
+ /* We want the drawBuffer and readBuffer to be initialized by
+ * the driver.
+ * This generally means the Width and Height match the actual
+ * window size and the renderbuffers (both hardware and software
+ * based) are allocated to match. The later can generally be
+ * done with a call to _mesa_resize_framebuffer().
+ *
+ * It's theoretically possible for a buffer to have zero width
+ * or height, but for now, assert check that the driver did what's
+ * expected of it.
+ */
+ ASSERT(drawBuffer->Width > 0);
+ ASSERT(drawBuffer->Height > 0);
+#endif
+
if (newCtx->FirstTimeCurrent) {
/* set initial viewport and scissor size now */
_mesa_set_viewport(newCtx, 0, 0,