Gdkgl-win32
- From: Shane Blackett <s blackett auckland ac nz>
- To: gtkglarea-list gnome org
- Subject: Gdkgl-win32
- Date: Fri, 20 Sep 2002 10:59:23 +1200
Hi,
I am writing an application using gtk and gl and have used the gtkglarea
widget.
I built first under linux and then under Win32.
The win32 code from the CVS would not compile so I attempted to fix it
up in
line with the nonwin32 version.
I have been using it a bit now and it seems to be working.
In win32 I am building with gcc/mingw.
I have attached my changes to get it to compile plus
I changed the way it selects for an accumulation buffer so that I could
get some full screen antialiasing working although I suspect that it was
a change I made somewhere in our code that actually fixed this up.
Shane Blackett.
Bioengineering Institute
The University of Auckland
New Zealand
Index: gdkgl-win32.c
===================================================================
RCS file: /cvs/gnome/gtkglarea/gtkgl/gdkgl-win32.c,v
retrieving revision 1.7
diff -r1.7 gdkgl-win32.c
41a42
> pfd->cAccumBits = 0;
100,102c101,102
< pfd->cAccumBits = 1;
< ++p;
< break;
---
> pfd->cAccumBits += *(++p);
> break;
282a283
>
305c306
< gdk_gl_context_unref ( (GdkGLContext*)context->share );
---
> g_object_unref ( context->share );
403,404c404,405
< SelectObject ( private->hdc, private->hbitmap );
< gdk_pixmap_unref ( private->pixmap );
---
> SelectObject ( pixmap->hdc, pixmap->hbitmap );
> gdk_pixmap_unref ( pixmap->pixmap );
423a425,427
> g_return_val_if_fail(GDK_IS_VISUAL(visual), NULL);
> g_return_val_if_fail(GDK_IS_PIXMAP(pixmap), NULL);
>
427,431c431,434
< context->initialised = FALSE;
< context->hdc = NULL;
< context->hbitmap = NULL;
< context->pixmap = gdk_pixmap_ref ( pixmap );
< context->ref_count = 1;
---
> glpixmap->initialised = FALSE;
> glpixmap->hdc = NULL;
> glpixmap->hbitmap = NULL;
> glpixmap->pixmap = gdk_pixmap_ref ( pixmap );
433c436
< return context;
---
> return glpixmap;
438,439c441,442
< g_return_val_if_fail (GDK_IS_GL_PIXMAP(pixmap), FALSE );
< g_return_val_if_fail (GDK_IS_GL_CONTEXTcontext), FALSE );
---
> g_return_val_if_fail (GDK_IS_GL_PIXMAP(glpixmap), FALSE );
> g_return_val_if_fail (GDK_IS_GL_CONTEXT(context), FALSE );
446c449
< glpixmap->hdc = context->hdc;
---
> glpixmap->hdc = context->hdc;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]