summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/beos/GLView.cpp
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-11-27 22:47:59 +0000
committerBrian Paul <[email protected]>2004-11-27 22:47:59 +0000
commit65a66f5bc37383c00423c21baf8ba9d6771e0259 (patch)
tree0d98e004b457adde579dd27b9fe32182d54268b6 /src/mesa/drivers/beos/GLView.cpp
parent118a8bad73bda88fc54f802b2beeb687c8ddb45a (diff)
Remove _mesa_ResizeBuffersMESA() call from _mesa_set_viewport().
Now, the driver's Viewport routine should call _mesa_ResizeBuffersMESA() if necessary. Cleaned up code related to GLframebuffer width/height initialization. Set initial viewport/scissor params in _mesa_make_current2(), instead of in the drivers' MakeCurrent functions.
Diffstat (limited to 'src/mesa/drivers/beos/GLView.cpp')
-rw-r--r--src/mesa/drivers/beos/GLView.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp
index 43aa13e7010..45473a8ef27 100644
--- a/src/mesa/drivers/beos/GLView.cpp
+++ b/src/mesa/drivers/beos/GLView.cpp
@@ -153,6 +153,7 @@ private:
GLuint *height);
static void Error(GLcontext *ctx);
static const GLubyte * GetString(GLcontext *ctx, GLenum name);
+ static void Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
// Front-buffer functions
static void WriteRGBASpanFront(const GLcontext *ctx, GLuint n,
@@ -317,6 +318,7 @@ BGLView::BGLView(BRect rect, char *name,
functions.ClearIndex = md->ClearIndex;
functions.ClearColor = md->ClearColor;
functions.Error = md->Error;
+ functions.Viewport = md->Viewport;
// create core context
GLcontext *ctx = _mesa_create_context(visual, NULL, &functions, md);
@@ -1028,6 +1030,13 @@ void MesaDriver::GetBufferSize(GLframebuffer * framebuffer, GLuint *width,
}
+void MesaDriver::Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+ /* poll for window size change and realloc software Z/stencil/etc if needed */
+ _mesa_ResizeBuffersMESA();
+}
+
+
const GLubyte *MesaDriver::GetString(GLcontext *ctx, GLenum name)
{
switch (name) {