diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-11-27 22:47:59 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-11-27 22:47:59 +0000 |
commit | 65a66f5bc37383c00423c21baf8ba9d6771e0259 (patch) | |
tree | 0d98e004b457adde579dd27b9fe32182d54268b6 /src/mesa/drivers/beos | |
parent | 118a8bad73bda88fc54f802b2beeb687c8ddb45a (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')
-rw-r--r-- | src/mesa/drivers/beos/GLView.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp index 43aa13e701..45473a8ef2 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) { |