From 87af12dbdcb078b95391d57dabe53ce17b19f651 Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Thu, 30 Mar 2006 07:58:24 +0000 Subject: Fixes from Brian to help migrate to render buffer DD interfaces. Also fix bug in the viewport function that was using the viewport size to resize the buffer, when it should have been using the window size. Fix bug in write_rgb_span_32 where the incoming pixel data parameter was coded as a [][4] instead of [][3]. Now all the demos work correctly except singlebuffer. --- src/mesa/drivers/windows/gdi/wgl.c | 45 ++++++++++++++------------------------ 1 file changed, 16 insertions(+), 29 deletions(-) (limited to 'src/mesa/drivers/windows/gdi/wgl.c') diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c index 47e32c579f..197de0743c 100644 --- a/src/mesa/drivers/windows/gdi/wgl.c +++ b/src/mesa/drivers/windows/gdi/wgl.c @@ -1,4 +1,4 @@ -/* $Id: wgl.c,v 1.11 2006/01/25 06:02:55 kschultz Exp $ */ +/* $Id: wgl.c,v 1.12 2006/03/30 07:58:24 kschultz Exp $ */ /* * This library is free software; you can redistribute it and/or @@ -38,8 +38,6 @@ #include "GL/wmesa.h" /* protos for wmesa* functions */ -typedef struct wmesa_context *PWMC; - /* * Pixel Format Descriptors */ @@ -143,7 +141,6 @@ int npfd = sizeof(pfd) / sizeof(pfd[0]); typedef struct { WMesaContext ctx; - HDC hdc; } MesaWglCtx; #define MESAWGL_CTX_MAX_COUNT 20 @@ -154,13 +151,15 @@ static unsigned ctx_count = 0; static int ctx_current = -1; static unsigned curPFD = 0; +static HDC CurrentHDC = 0; + + WINGDIAPI HGLRC GLAPIENTRY wglCreateContext(HDC hdc) { int i = 0; if (!ctx_count) { for(i=0;i