summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dos
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-02-10 07:46:07 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-02-10 07:46:07 +0000
commit22633805fa4edf5771a4aa951de947e3346f76be (patch)
treed42f839120616b2dcce246ed260da3d16168f3bd /src/mesa/drivers/dos
parenta1b9b1a4409729fa8b6714e5847544576fcee404 (diff)
fixed back fxMesaGetCurrentContext to match MakeCurrent
Diffstat (limited to 'src/mesa/drivers/dos')
-rw-r--r--src/mesa/drivers/dos/dmesa.c39
1 files changed, 30 insertions, 9 deletions
diff --git a/src/mesa/drivers/dos/dmesa.c b/src/mesa/drivers/dos/dmesa.c
index c7c8fcff84..752f13e909 100644
--- a/src/mesa/drivers/dos/dmesa.c
+++ b/src/mesa/drivers/dos/dmesa.c
@@ -807,7 +807,7 @@ static const GLubyte* get_string (GLcontext *ctx, GLenum name)
switch (name) {
case GL_RENDERER:
return (const GLubyte *)"Mesa DJGPP"
- "\0port (c) Borca Daniel dec-2003";
+ "\0port (c) Borca Daniel feb-2004";
default:
return NULL;
}
@@ -1137,8 +1137,8 @@ void DMesaDestroyBuffer (DMesaBuffer b)
DMesaContext DMesaCreateContext (DMesaVisual visual,
DMesaContext share)
{
-#ifndef FX
GLcontext *c;
+#ifndef FX
TNLcontext *tnl;
struct dd_function_table functions;
@@ -1177,11 +1177,11 @@ DMesaContext DMesaCreateContext (DMesaVisual visual,
_swsetup_Wakeup(c);
}
- return (DMesaContext)c;
-
#else /* FX */
- return (DMesaContext)visual;
+ c = (GLcontext *)0xdeadbeef;
#endif /* FX */
+
+ return (DMesaContext)c;
}
@@ -1292,13 +1292,34 @@ void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue)
-void *DMesaGetCurrentContext (void)
+DMesaContext DMesaGetCurrentContext (void)
{
-#ifndef FX
GET_CURRENT_CONTEXT(ctx);
- return ctx;
+
+#ifndef FX
+#else
+ if (ctx != NULL) {
+ ctx = (GLcontext *)0xdeadbeef;
+ }
+#endif
+
+ return (DMesaContext)ctx;
+}
+
+
+
+DMesaBuffer DMesaGetCurrentBuffer (void)
+{
+ const DMesaContext dmesa = DMesaGetCurrentContext();
+
+ if (dmesa == NULL) {
+ return NULL;
+ }
+
+#ifndef FX
+ return dmesa->buffer;
#else
- return fxMesaGetCurrentContext();
+ return (DMesaBuffer)fxMesaGetCurrentContext();
#endif
}