From 4fe1303e833183319f50107a98b8627f36633c65 Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Thu, 29 Jan 2004 15:46:02 +0000 Subject: GL_TEXTURE_1D and other stories... --- src/mesa/drivers/glide/fxwgl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/glide/fxwgl.c') diff --git a/src/mesa/drivers/glide/fxwgl.c b/src/mesa/drivers/glide/fxwgl.c index ae1d913f3b..c17560d724 100644 --- a/src/mesa/drivers/glide/fxwgl.c +++ b/src/mesa/drivers/glide/fxwgl.c @@ -290,6 +290,14 @@ __wglMonitor(HWND hwnd, UINT message, UINT wParam, LONG lParam) return (ret); } +static void wgl_error (long error) +{ +#define WGL_INVALID_PIXELFORMAT ERROR_INVALID_PIXEL_FORMAT + SetLastError(0xC0000000 /* error severity */ + |0x00070000 /* error facility (who we are) */ + |error); +} + GLAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) { @@ -314,7 +322,7 @@ wglCreateContext(HDC hdc) } if (curPFD == 0) { - SetLastError(0); + wgl_error(WGL_INVALID_PIXELFORMAT); return (NULL); } -- cgit v1.2.3