summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-11-12 18:10:47 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-11-12 18:10:47 +0000
commit93b76c048f064455b42c345dc204b94065ad197c (patch)
tree424cc71e50a3576cbb981ac5809642baea599730 /src/mesa
parentbe599f845f7acac94444ce74eff20296ed0a309f (diff)
restored the gl_Viewport function
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/matrix.c21
-rw-r--r--src/mesa/main/matrix.h5
2 files changed, 22 insertions, 4 deletions
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 16f30be1f0..cdb8160ce5 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -1,4 +1,4 @@
-/* $Id: matrix.c,v 1.9 1999/11/11 01:22:27 brianp Exp $ */
+/* $Id: matrix.c,v 1.10 1999/11/12 18:10:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1332,13 +1332,28 @@ _mesa_Translated( GLdouble x, GLdouble y, GLdouble z )
/*
- * Define a new viewport and reallocate auxillary buffers if the size of
- * the window (color buffer) has changed.
+ * Called via glViewport or display list execution.
*/
void
_mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height )
{
GET_CURRENT_CONTEXT(ctx);
+ gl_Viewport(ctx, x, y, width, height);
+}
+
+
+
+/*
+ * Define a new viewport and reallocate auxillary buffers if the size of
+ * the window (color buffer) has changed.
+ *
+ * XXX This is directly called by device drivers, BUT this function
+ * may be renamed _mesa_Viewport (without ctx arg) in the future so
+ * use of _mesa_Viewport is encouraged.
+ */
+void
+gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height )
+{
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glViewport");
if (width<0 || height<0) {
diff --git a/src/mesa/main/matrix.h b/src/mesa/main/matrix.h
index 2479668799..e8c79e2c59 100644
--- a/src/mesa/main/matrix.h
+++ b/src/mesa/main/matrix.h
@@ -1,4 +1,4 @@
-/* $Id: matrix.h,v 1.3 1999/11/11 01:22:27 brianp Exp $ */
+/* $Id: matrix.h,v 1.4 1999/11/12 18:10:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -132,6 +132,9 @@ extern void
_mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height );
extern void
+gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
+
+extern void
_mesa_DepthRange( GLclampd nearval, GLclampd farval );