summaryrefslogtreecommitdiffstats
path: root/src/glut/dos/window.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-04-01 17:01:33 +0000
committerBrian Paul <[email protected]>2002-04-01 17:01:33 +0000
commit6c921af034525fc28f006e447f62a31e00649f2c (patch)
treee6287c87d5aacd4980c1b1301aa548f67dfd5738 /src/glut/dos/window.c
parenta97d216adb6cd97926d760a4b5eadfaf1fda29f7 (diff)
DOS driver update
Diffstat (limited to 'src/glut/dos/window.c')
-rw-r--r--src/glut/dos/window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/glut/dos/window.c b/src/glut/dos/window.c
index c110715ebb3..f43533ce5f8 100644
--- a/src/glut/dos/window.c
+++ b/src/glut/dos/window.c
@@ -19,7 +19,7 @@
*/
/*
- * DOS/DJGPP glut driver v0.2 for Mesa 4.0
+ * DOS/DJGPP glut driver v1.0 for Mesa 4.0
*
* Copyright (C) 2002 - Borca Daniel
* Email : [email protected]
@@ -171,11 +171,24 @@ void APIENTRY glutSetIconTitle (const char *title)
void APIENTRY glutPositionWindow (int x, int y)
{
+ if (DMesaViewport(buffer[window], x, y, g_width, g_height)) {
+ g_xpos = x;
+ g_ypos = y;
+ }
}
void APIENTRY glutReshapeWindow (int width, int height)
{
+ if (DMesaViewport(buffer[window], g_xpos, g_ypos, width, height)) {
+ g_width = width;
+ g_height = height;
+ if (reshape_func) {
+ reshape_func(width, height);
+ } else {
+ glViewport(0, 0, width, height);
+ }
+ }
}