-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 28.05.2012 22:03, schrieb Thomas Zimmermann: > Great work! Thanks a lot. > I need the packages for my project pybik [1]. Thanks to your work, I had a quick and painless transition to GTK3.
> Meanwhile, I applied the two patches you sent me. I haven't been > able to out-of-tree build them, due to a shortcoming in the build > system. > >> /usr/bin/g-ir-scanner --warn-all --namespace=GdkGLExt >> --nsversion=3.0 --libtool="/bin/sh ../libtool" --include=Gdk-3.0 >> --library=libgdkglext-3.0.la --identifier-prefix=GdkGL >> --symbol-prefix=gdk_gl --symbol-prefix=gdk >> -DG_LOG_DOMAIN=\"GdkGLExt\" -DGDK_GL_COMPILATION -I../../.. >> -DG_ENABLE_DEBUG -pthread -I/usr/include/gtk-3.0 >> -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 >> -I/usr/include/cairo -I/usr/include/glib-2.0 >> -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 >> -I/usr/include/freetype2 -I/usr/include/libpng12 -DGSEAL_ENABLE >> -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 >> -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 >> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 >> -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 >> -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread >> ../../../gdk/gdkgl.h ../../../gdk/gdkgldefs.h >> ../../../gdk/gdkgltokens.h ../../../gdk/gdkgltypes.h >> ../../../gdk/gdkglinit.h ../../../gdk/gdkglquery.h >> ../../../gdk/gdkglconfig.h ../../../gdk/gdkglcontext.h >> ../../../gdk/gdkgldrawable.h ../../../gdk/gdkglwindow.h >> ../../../gdk/gdkglenumtypes.h gdkglversion.h >> ../../../gdk/gdkglversion.c ../../../gdk/gdkglinit.c >> ../../../gdk/gdkglquery.c ../../../gdk/gdkglconfig.c >> ../../../gdk/gdkglconfigimpl.c ../../../gdk/gdkglcontext.c >> ../../../gdk/gdkglcontextimpl.c ../../../gdk/gdkgldrawable.c >> ../../../gdk/gdkglwindow.c ../../../gdk/gdkglwindowimpl.c >> ../../../gdk/gdkglenumtypes.c ../../../gdk/x11/gdkglconfig-x11.c >> ../../../gdk/x11/gdkglcontext-x11.c >> ../../../gdk/x11/gdkglquery-x11.c >> ../../../gdk/x11/gdkglwindow-x11.c libgdkglext-3.0.la Makefile >> --output GdkGLExt-3.0.gir In file included from <stdin>:4:0: >> /home/tdz/Projects/gtkglext/gdk/gdkgl.h:27:30: fatal error: >> gdk/gdkglversion.h: No such file or directory compilation >> terminated. Error while processing the source. make[4]: *** >> [GdkGLExt-3.0.gir] Error 1 > > I'll try to fix this and then push your patches into the github > tree. > > One more note. The second patch consists of changes like the one > below. > >> + * @attrib_list: (array zero-terminated=1): a list of >> attribute/value pairs. > > I'm wondering if it couldn't happen that one of the attribute's > values is zero for a call to the annotated function, and the > binding code assumes, the array has already been terminated. > When i created this patch, I got a segmentation fault without the zero-terminated=1 when I run my Python test script [attachment]. But it seams it was a bug (maybe 674271 ? [2]) in pygobject 3.2.0 and fixed in 3.2.2, With the update meanwhile the segmentation fault is gone. So maybe this zero-terminated=1 should be removed. Btw, are you interested in Python examples in your git tree? They demonstrate the usage of g-i, as bindings like python-gtkglext1 are not needed any more. > Best regards Thomas > > Am Sonntag, den 27.05.2012, 20:41 +0200 schrieb B. Clausius: >> Hi, >> >> the packages are available in my PPA: >> https://code.launchpad.net/~barcc/+archive/daily-build Built >> packages: gir1.2-gtkglext-3.0 OpenGL Extension to GTK+ -- gir >> bindings libgtkglext-3-0-tdz-bc OpenGL Extension to GTK+ (shared >> libraries) libgtkglext-3-0-tdz-bc-dbg OpenGL Extension to GTK+ >> (debugging symbols) libgtkglext-3-tdz-bc-dev OpenGL Extension to >> GTK+ (development files) libgtkglext-3-tdz-bc-doc OpenGL >> Extension to GTK+ (documentation) >> >> The packages are built from the Bazaar branch >> https://code.launchpad.net/+branch/~barcc/pybik/gtkglext-tdz-bc >> bzr branch lp:~barcc/pybik/gtkglext-tdz-bc which is based upon >> the branch by Thomas Zimmermann >> git://github.com/tdz/gtkglext.git and contains besides the >> packaging files additional stuff that are not yet accepted in the >> git branch. >> >> Please be aware that the packages are not well tested and may >> change unexpectedly at any time. >> >> Best Regards, B. Clausius >> _______________________________________________ gtkglext-list >> mailing list [email protected] >> https://mail.gnome.org/mailman/listinfo/gtkglext-list > > > > _______________________________________________ gtkglext-list > mailing list [email protected] > https://mail.gnome.org/mailman/listinfo/gtkglext-list [1] https://launchpad.net/pybik [2] https://bugzilla.gnome.org/show_bug.cgi?id=674271 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPxMWHAAoJEEDg0A3D0GN4ITwP/3GqAR8DrtwRShG1jlUYOvIJ 6F09MJW1WPX9zrBRQmbcTF30GZUvUoyceo38jxa4Ngu2KwVsq6dreqJ/ZopiWTZo +53t1v2iwA8U90PtkG+JfdXvzQpnEUjm+0HFUXLmfCDTRSddIXhYI7uRLmXOeFbw ZuVmSwTpNv8ZN7Ta3WcAsg3ZLJIm16x11vRs9GyNS3Q2k9W9E0XY5G4+7KIo+nao uiJUDrnxH5BiFQcJVSL7a3c5jN5yV9pEHUhkirls0b7/Bg3JuWjdOZTm4Nu0/Yc9 gHrQvcgdjQ02suvptWvUtOyekDhllPv5lndqufpg1wWSNk+eMlh7Ml2JeYI5hkRq vtGQpbYH0g0yk/ATUVce1MDWsjc7toSSv0NWeUDgmF831XXwQ7PtlbcctsMdPEi7 A06ZFt3rcGP7cd9UmwRI7aTCIqwVKrCz9DuNIIuLf7465dX2LprnFpDnGHQCKPNN GvaMAKCRf3i4mJITi+72fDyr0NgMHq3+/UlDv7P42REHgnQVPAwC1aMYEzL9//RJ XgCKQgP+pDB1ldAbmjwyB5JhX6duOK9WWRfOfHJBLUN94PL4uLLLNxfg3ptXEXzB AMehl0qdZtJZ7fzeMmBD9UzcPFRJ/vGUUek2m0OL2w/1pcdkAOr1M4qSasLIqJbx g1MHIOvvZ3LZOQFr8BWS =kSA9 -----END PGP SIGNATURE-----
#!/usr/bin/python # -*- coding: utf-8 -*- # glconfig.py # A simple example to demontrate GdkGLExt.Config. # # Copyright © 2012 B. Clausius <[email protected]> # # This program is in the public domain and you are using it at your own risk. from __future__ import print_function import sys, os from gi.repository import Gtk, Gdk, GLib from gi.repository import GtkGLExt, GdkGLExt from OpenGL import GL attribs = [ GdkGLExt.ConfigAttrib.RGBA, GdkGLExt.ConfigAttrib.RED_SIZE, 1, GdkGLExt.ConfigAttrib.GREEN_SIZE, 1, GdkGLExt.ConfigAttrib.BLUE_SIZE, 1, GdkGLExt.ConfigAttrib.DOUBLEBUFFER, GdkGLExt.ConfigAttrib.DEPTH_SIZE , 1, GdkGLExt.ConfigAttrib.ACCUM_RED_SIZE, 1, GdkGLExt.ConfigAttrib.ACCUM_GREEN_SIZE, 1, GdkGLExt.ConfigAttrib.ACCUM_BLUE_SIZE, 1, GdkGLExt.ATTRIB_LIST_NONE ] create_config_funcs = [ ( 'double-buffered visual created by new_by_mode', lambda: GdkGLExt.Config.new_by_mode(GdkGLExt.ConfigMode.RGB | GdkGLExt.ConfigMode.DEPTH | GdkGLExt.ConfigMode.DOUBLE)), ( 'single-buffered visual created by new_by_mode', lambda: GdkGLExt.Config.new_by_mode(GdkGLExt.ConfigMode.RGB | GdkGLExt.ConfigMode.DEPTH)), ( 'double-buffered visual created by new_by_mode_for_screen', lambda: GdkGLExt.Config.new_by_mode_for_screen(Gdk.Screen.get_default(), GdkGLExt.ConfigMode.RGB | GdkGLExt.ConfigMode.DEPTH | GdkGLExt.ConfigMode.DOUBLE)), ( 'visual created with attribute list', lambda: GdkGLExt.Config.new(attribs)), ( 'visual created by new_for_screen', lambda: GdkGLExt.Config.new_for_screen(Gdk.Screen.get_default(), attribs)), ( 'visual created by new_for_display', lambda: GdkGLExt.Config.new_for_display(Gdk.Display.get_default(), attribs)), ] def print_config_1(glconfig): print(' ', glconfig) for i, a in sorted(GdkGLExt.ConfigAttrib.__enum_values__.items()): success, value = glconfig.get_attrib(a) print(' {:6} {:24} {}'.format(i, a.value_nick, value if success else '<Error>')) def print_config_2(glconfig): print(' ', glconfig) print(' get_depth:', glconfig.get_depth()) print(' get_layer_plane:', glconfig.get_layer_plane()) print(' get_n_aux_buffers:', glconfig.get_n_aux_buffers()) print(' get_n_sample_buffers:', glconfig.get_n_sample_buffers()) print(' has_accum_buffer:', glconfig.has_accum_buffer()) print(' has_alpha:', glconfig.has_alpha()) print(' has_depth_buffer:', glconfig.has_depth_buffer()) print(' has_stencil_buffer:', glconfig.has_stencil_buffer()) print(' is_double_buffered:', glconfig.is_double_buffered()) print(' is_rgba:', glconfig.is_rgba()) print(' is_stereo:', glconfig.is_stereo()) def main(): for i, (desc, func) in enumerate(create_config_funcs): print(desc) try: glconfig = func() except TypeError: print(" *** Creating OpenGL configuration failed ***") else: if i < 2: print_config_1(glconfig) elif i == 2: print_config_2(glconfig) raw_input('[enter]') if __name__ == '__main__': main()
_______________________________________________ gtkglext-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gtkglext-list
