"gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

View: New views
12 Messages — Rating Filter:   Alert me  

"gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Sanak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi list,

I am a newbie of OpenEV2, I had build svn-trunk(r104) on Windows, and after run OpenEV2,
the following error occurred and couldn't display view area.

-----------------------------------
Loading tools from C:\Python25\share\openev\tools\Tool_DriverList.py
Loading tools from C:\Python25\share\openev\tools\Tool_Export.py

(python.exe:4364): GdkGLExt-WARNING **: cannot set pixel format

(python.exe:4364): GdkGLExt-WARNING **: cannot create GdkGLPixmap

get share list, trying again..
C:\Python25\lib\site-packages\openev\gview.py:69: GtkWarning: gdk_pixmap_new: assertion `(drawable != NULL) || (depth != -1)' failed
  _gv.ViewArea.__init__(self)

(python.exe:4364): GdkGLExt-CRITICAL **: file gdkglpixmap.c: line 714 (gdk_pixmap_set_gl_capability): assertion `GDK_IS_PIXMAP (pixmap)' failed

(python.exe:4364): GdkGLExt-CRITICAL **: file gdkglpixmap.c: line 800 (gdk_pixmap_get_gl_pixmap): assertion `GDK_IS_PIXMAP (pixmap)' failed

(python.exe:4364): GdkGLExt-CRITICAL **: file gdkglcontext.c: line 98 (gdk_gl_context_new): assertion `GDK_IS_GL_DRAWABLE (gldrawable)' failed

(python.exe:4364): GdkGLExt-CRITICAL **: file gdkglcontext-win32.c: line 361 (gdk_gl_context_get_gl_config): assertion `GDK_IS_GL_CONTEXT_IMPL_WIN32 (glcontext)' failed

(python.exe:4364): GtkGLExt-CRITICAL **: file gtkglwidget.c: line 248 (gtk_widget_set_gl_capability): assertion `GDK_IS_GL_CONFIG (glconfig)' failed

(python.exe:4364): GdkGLExt-CRITICAL **: file gdkgldrawable.c: line 59 (gdk_gl_drawable_make_current): assertion `GDK_IS_GL_DRAWABLE (gldrawable)' failed

(python.exe:4364): GdkGLExt-CRITICAL **: file gdkgldrawable.c: line 59 (gdk_gl_drawable_make_current): assertion `GDK_IS_GL_DRAWABLE (gldrawable)' failed
-----------------------------------

I had tried the follow 2 modification to gvviewarea.c.
1) modify gdk_gl_config_new_by_mode arguments.(GDK_GL_MODE_RGBA -> GDK_GL_MODE_RGB, GDK_GL_MODE_DOUBLE -> GDK_GL_MODE_SINGLE)
2) doesn't use gv_view_area_get_share_list. (apply old(pending) source, see the attach file.)

The result is as follows
1) work only when display depth is 16.
2) work on any display depth.

I don't understand OpenGL well, but I think the above 2) way is better.

Regards,

Sanak.


------------------------------------------------------------------------------

_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

gvviewarea.c.diff (2K) Download Attachment

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Mario Beauchamp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sanak,

On Tue, Dec 23, 2008 at 5:39 AM, Sanak <geosanak@...> wrote:
>
> 2) doesn't use gv_view_area_get_share_list. (apply old(pending) source, see
> the attach file.)

Yes, I was not really sure why it was pending but it works for me both
on Linux and Windows.
I guess I should try "re-pending" it until we understand what is going
on. It may be a video driver problem with a bad OpenGL implementation,
I don't know... I am no OpenGL expert either.

cheers
--
Mario B.

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by s duclos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,


--- On Wed, 12/24/08, Mario Beauchamp <starged@...> wrote:

> From: Mario Beauchamp <starged@...>
> Subject: Re: [Openev-discuss] "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment
> To: "Sanak" <geosanak@...>
> Cc: openev-discuss@...
> Date: Wednesday, December 24, 2008, 6:33 AM
> Hi Sanak,
>
> On Tue, Dec 23, 2008 at 5:39 AM, Sanak
> <geosanak@...> wrote:
> >
> > 2) doesn't use gv_view_area_get_share_list. (apply
> old(pending) source, see
> > the attach file.)
>
> Yes, I was not really sure why it was pending but it works
> for me both
> on Linux and Windows.
> I guess I should try "re-pending" it until we
> understand what is going

Wait! try building openev2/trunk/src/cc/testmain (you might need
to fix the config in resource/, for instance I had to remove -ltess
and also fix the include path when building libgv.so)

Then run ./testmain to see what happen .. if nothing goes wrong then
the problem is in the libs deps above libgv.so.

For instance, I was pulling somehow libgtk-1.2.so and GTK got all
confused in gv_view_area_get_share_list() and going the old way
didn't fix the problem.

Testmain sit right above libgv.so and it does a gv_view_area_new() call
right from the start. This call, in turn, trigger Mario's hack to pull a
glcontext from a pixmap in a platform neutral way (petty cool in fact:).

Anyway I can confirm that testmain in svn trunk work on a fairly recent
Ubuntu AMD 64.


Cheers,

Sylvain.

> on. It may be a video driver problem with a bad OpenGL
> implementation,
> I don't know... I am no OpenGL expert either.
>
> cheers
> --
> Mario B.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Openev-discuss mailing list
> Openev-discuss@...
> https://lists.sourceforge.net/lists/listinfo/openev-discuss


     

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Mario Beauchamp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sylvain,

On Wed, Dec 24, 2008 at 11:43 AM, s duclos <sylvain_duclos@...> wrote:
>
> Wait! try building openev2/trunk/src/cc/testmain (you might need
> to fix the config in resource/, for instance I had to remove -ltess
> and also fix the include path when building libgv.so)

Sorry, I didn't touch the makefiles... I find it easier to manage the
build/install process with setup.py.
I'll be glad to commit any modifications you make.

> Then run ./testmain to see what happen .. if nothing goes wrong then
> the problem is in the libs deps above libgv.so.

Also, I figured that libgv.so (does anyone link to it?) was not
necessary for OpenEV that's why setup.py only builds _gv.so.
Again, if any changes are necessary in the makefiles to make that
work, pass them along.

> For instance, I was pulling somehow libgtk-1.2.so and GTK got all
> confused in gv_view_area_get_share_list() and going the old way
> didn't fix the problem.

Ah I see! Maybe that was the problem right from the start!

> Testmain sit right above libgv.so and it does a gv_view_area_new() call
> right from the start. This call, in turn, trigger Mario's hack to pull a
> glcontext from a pixmap in a platform neutral way (petty cool in fact:).

Actually, that was Vexcell's hack which they found on gtkglext ml ;)

> Anyway I can confirm that testmain in svn trunk work on a fairly recent
> Ubuntu AMD 64.

Cool! I'm also running it on a x86_64.

Thanks for jumping in Sylvain!

cheers
--
Mario B.

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Sanak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I had build and executed the src/cc/testmain/testmain.c on my Windows environment, and the result was the same.(see attach images)

I don't know that the cause is the graphic board problem, or the GtkGLExt Windows version's problem.

My environment details is as follows.

CPU: Intel Core2 Quad Q9450
OS: Windows XP SP3
Graphic board: NVIDIA GeForce 9800 GT
Compiler: Microsoft Visual Studio.NET 2003 SP1
Gtk+: 2.12.9-win32-2 (include GtkGLExt)
Gdal: 1.6.0
Python: 2.5.1
PyCairo: 1.4.12-1.win32-py25
PyGObject: 2.14.1-1.win32-py2.5
PyGtk: 2.12.1-2.win32-py25
Numpy: 1.2.1-win32-superpack-python25

Regards,

Sanak.

2008/12/25 Mario Beauchamp <starged@...>
Hi Sylvain,

On Wed, Dec 24, 2008 at 11:43 AM, s duclos <sylvain_duclos@...> wrote:
>
> Wait! try building openev2/trunk/src/cc/testmain (you might need
> to fix the config in resource/, for instance I had to remove -ltess
> and also fix the include path when building libgv.so)

Sorry, I didn't touch the makefiles... I find it easier to manage the
build/install process with setup.py.
I'll be glad to commit any modifications you make.

> Then run ./testmain to see what happen .. if nothing goes wrong then
> the problem is in the libs deps above libgv.so.

Also, I figured that libgv.so (does anyone link to it?) was not
necessary for OpenEV that's why setup.py only builds _gv.so.
Again, if any changes are necessary in the makefiles to make that
work, pass them along.

> For instance, I was pulling somehow libgtk-1.2.so and GTK got all
> confused in gv_view_area_get_share_list() and going the old way
> didn't fix the problem.

Ah I see! Maybe that was the problem right from the start!

> Testmain sit right above libgv.so and it does a gv_view_area_new() call
> right from the start. This call, in turn, trigger Mario's hack to pull a
> glcontext from a pixmap in a platform neutral way (petty cool in fact:).

Actually, that was Vexcell's hack which they found on gtkglext ml ;)

> Anyway I can confirm that testmain in svn trunk work on a fairly recent
> Ubuntu AMD 64.

Cool! I'm also running it on a x86_64.

Thanks for jumping in Sylvain!

cheers
--
Mario B.




------------------------------------------------------------------------------

_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

OpenEV2_2008122501_svn-trunk_r104.PNG (58K) Download Attachment
OpenEV2_2008122501_apply_pending_source.PNG (39K) Download Attachment

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by s duclos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I had the same errors as you in:
OpenEV2_2008122501_svn-trunk_r104.PNG (44KB),

Do you have "ldd" or something equivalent .. I used that
to find the libraries dependency. This is how I found that my own
version of testmain was linking to gtk-1.2 as well as gtk-2.0.

Maybe your testmain is using an old libgv.so!


I just made a fresh build from svn openev2/trunk, my testmain output
is the same as you in:
OpenEV2_2008122501_apply_pending_source.PNG (29KB)


This what I did to the Makefiles so that it compile on my machine:

openev2/trunk/src/lib/gv/Makefile:
 -removed gv_override.c \
 -add CC += -fPIC

openev2/trunk/resource/mklocal/Linux:
 -remove -levtess (in your case this would be in CYGWIN..)




Then I went into openev2/trunk/src and run 'make install'

I putted libgv.so in LD_LIBRARY_PATH:
$sudo cp ../output/lib/lib.Linux/libgv.so /usr/local/lib

Then I just run testmain:
$  ../output/bin/bin.Linux/testmain



This is not a final solution .. but it might give us clue as of
what is going wrong on your side.

I tought that GTK2 (and so OpenEV2) added some sort of 'nativeness'
to openev on win32 .. so this puzzling!


Thanks,

Sylvain.
 

--- On Thu, 12/25/08, Sanak <geosanak@...> wrote:

> From: Sanak <geosanak@...>
> Subject: Re: [Openev-discuss] "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment
> To: openev-discuss@...
> Date: Thursday, December 25, 2008, 10:15 AM
> Hi,
>
> I had build and executed the src/cc/testmain/testmain.c on
> my Windows
> environment, and the result was the same.(see attach
> images)
>
> I don't know that the cause is the graphic board
> problem, or the GtkGLExt
> Windows version's problem.
>
> My environment details is as follows.
>
> CPU: Intel Core2 Quad Q9450
> OS: Windows XP SP3
> Graphic board: NVIDIA GeForce 9800 GT
> Compiler: Microsoft Visual Studio.NET 2003 SP1
> Gtk+: 2.12.9-win32-2 (include GtkGLExt)
> Gdal: 1.6.0
> Python: 2.5.1
> PyCairo: 1.4.12-1.win32-py25
> PyGObject: 2.14.1-1.win32-py2.5
> PyGtk: 2.12.1-2.win32-py25
> Numpy: 1.2.1-win32-superpack-python25
>
> Regards,
>
> Sanak.
>
> 2008/12/25 Mario Beauchamp <starged@...>
>
> > Hi Sylvain,
> >
> > On Wed, Dec 24, 2008 at 11:43 AM, s duclos
> <sylvain_duclos@...>
> > wrote:
> > >
> > > Wait! try building openev2/trunk/src/cc/testmain
> (you might need
> > > to fix the config in resource/, for instance I
> had to remove -ltess
> > > and also fix the include path when building
> libgv.so)
> >
> > Sorry, I didn't touch the makefiles... I find it
> easier to manage the
> > build/install process with setup.py.
> > I'll be glad to commit any modifications you make.
> >
> > > Then run ./testmain to see what happen .. if
> nothing goes wrong then
> > > the problem is in the libs deps above libgv.so.
> >
> > Also, I figured that libgv.so (does anyone link to
> it?) was not
> > necessary for OpenEV that's why setup.py only
> builds _gv.so.
> > Again, if any changes are necessary in the makefiles
> to make that
> > work, pass them along.
> >
> > > For instance, I was pulling somehow libgtk-1.2.so
> and GTK got all
> > > confused in gv_view_area_get_share_list() and
> going the old way
> > > didn't fix the problem.
> >
> > Ah I see! Maybe that was the problem right from the
> start!
> >
> > > Testmain sit right above libgv.so and it does a
> gv_view_area_new() call
> > > right from the start. This call, in turn, trigger
> Mario's hack to pull a
> > > glcontext from a pixmap in a platform neutral way
> (petty cool in fact:).
> >
> > Actually, that was Vexcell's hack which they found
> on gtkglext ml ;)
> >
> > > Anyway I can confirm that testmain in svn trunk
> work on a fairly recent
> > > Ubuntu AMD 64.
> >
> > Cool! I'm also running it on a x86_64.
> >
> > Thanks for jumping in Sylvain!
> >
> > cheers
> > --
> > Mario B.
> >
> ------------------------------------------------------------------------------
> _______________________________________________
> Openev-discuss mailing list
> Openev-discuss@...
> https://lists.sourceforge.net/lists/listinfo/openev-discuss


     

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Sanak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sylvain,

I had checked linked gv.lib, and the dependency libraries(GTK+), but the result was the same.

I think that the better way is that the pending code is used for only recovery from failure of  the "gv_view_area_get_share_list" function.

After apply the following modification, testmain and openev works fine on my Windows environment.

===================================================================
--- gvviewarea.c    (revision 104)
+++ gvviewarea.c    (working copy)
@@ -371,7 +371,14 @@

     /* ---- Obtain shared GL context ---- */
     glcontext = gv_view_area_get_share_list(view);
-    glconfig = gdk_gl_context_get_gl_config(glcontext);
+    if (glcontext != NULL) {
+        glconfig = gdk_gl_context_get_gl_config(glcontext);
+    } else {
+        g_print("couldn't get share list. use old mode.\n");
+        glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB    |
+                                              GDK_GL_MODE_DEPTH  |
+                                              GDK_GL_MODE_DOUBLE);
+    }
 
     /* ---- Enable GL capability ---- */
     gtk_widget_set_gl_capability (GTK_WIDGET(view), glconfig,

===================================================================

Regards,

Sanak.

2008/12/26 s duclos <sylvain_duclos@...>
Hi,

I had the same errors as you in:
OpenEV2_2008122501_svn-trunk_r104.PNG (44KB),

Do you have "ldd" or something equivalent .. I used that
to find the libraries dependency. This is how I found that my own
version of testmain was linking to gtk-1.2 as well as gtk-2.0.

Maybe your testmain is using an old libgv.so!


I just made a fresh build from svn openev2/trunk, my testmain output
is the same as you in:
OpenEV2_2008122501_apply_pending_source.PNG (29KB)


This what I did to the Makefiles so that it compile on my machine:

openev2/trunk/src/lib/gv/Makefile:
 -removed gv_override.c \
 -add CC += -fPIC

openev2/trunk/resource/mklocal/Linux:
 -remove -levtess (in your case this would be in CYGWIN..)




Then I went into openev2/trunk/src and run 'make install'

I putted libgv.so in LD_LIBRARY_PATH:
$sudo cp ../output/lib/lib.Linux/libgv.so /usr/local/lib

Then I just run testmain:
$  ../output/bin/bin.Linux/testmain



This is not a final solution .. but it might give us clue as of
what is going wrong on your side.

I tought that GTK2 (and so OpenEV2) added some sort of 'nativeness'
to openev on win32 .. so this puzzling!


Thanks,

Sylvain.


--- On Thu, 12/25/08, Sanak <geosanak@...> wrote:

> From: Sanak <geosanak@...>
> Subject: Re: [Openev-discuss] "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment
> To: openev-discuss@...
> Date: Thursday, December 25, 2008, 10:15 AM
> Hi,
>
> I had build and executed the src/cc/testmain/testmain.c on
> my Windows
> environment, and the result was the same.(see attach
> images)
>
> I don't know that the cause is the graphic board
> problem, or the GtkGLExt
> Windows version's problem.
>
> My environment details is as follows.
>
> CPU: Intel Core2 Quad Q9450
> OS: Windows XP SP3
> Graphic board: NVIDIA GeForce 9800 GT
> Compiler: Microsoft Visual Studio.NET 2003 SP1
> Gtk+: 2.12.9-win32-2 (include GtkGLExt)
> Gdal: 1.6.0
> Python: 2.5.1
> PyCairo: 1.4.12-1.win32-py25
> PyGObject: 2.14.1-1.win32-py2.5
> PyGtk: 2.12.1-2.win32-py25
> Numpy: 1.2.1-win32-superpack-python25
>
> Regards,
>
> Sanak.
>
> 2008/12/25 Mario Beauchamp <starged@...>
>
> > Hi Sylvain,
> >
> > On Wed, Dec 24, 2008 at 11:43 AM, s duclos
> <sylvain_duclos@...>
> > wrote:
> > >
> > > Wait! try building openev2/trunk/src/cc/testmain
> (you might need
> > > to fix the config in resource/, for instance I
> had to remove -ltess
> > > and also fix the include path when building
> libgv.so)
> >
> > Sorry, I didn't touch the makefiles... I find it
> easier to manage the
> > build/install process with setup.py.
> > I'll be glad to commit any modifications you make.
> >
> > > Then run ./testmain to see what happen .. if
> nothing goes wrong then
> > > the problem is in the libs deps above libgv.so.
> >
> > Also, I figured that libgv.so (does anyone link to
> it?) was not
> > necessary for OpenEV that's why setup.py only
> builds _gv.so.
> > Again, if any changes are necessary in the makefiles
> to make that
> > work, pass them along.
> >
> > > For instance, I was pulling somehow libgtk-1.2.so
> and GTK got all
> > > confused in gv_view_area_get_share_list() and
> going the old way
> > > didn't fix the problem.
> >
> > Ah I see! Maybe that was the problem right from the
> start!
> >
> > > Testmain sit right above libgv.so and it does a
> gv_view_area_new() call
> > > right from the start. This call, in turn, trigger
> Mario's hack to pull a
> > > glcontext from a pixmap in a platform neutral way
> (petty cool in fact:).
> >
> > Actually, that was Vexcell's hack which they found
> on gtkglext ml ;)
> >
> > > Anyway I can confirm that testmain in svn trunk
> work on a fairly recent
> > > Ubuntu AMD 64.
> >
> > Cool! I'm also running it on a x86_64.
> >
> > Thanks for jumping in Sylvain!
> >
> > cheers
> > --
> > Mario B.
> >
> ------------------------------------------------------------------------------
> _______________________________________________
> Openev-discuss mailing list
> Openev-discuss@...
> https://lists.sourceforge.net/lists/listinfo/openev-discuss






------------------------------------------------------------------------------

_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

gvviewarea.c.diff.2 (1K) Download Attachment

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by s duclos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sanak,

OK, thanks for the feedback.

So this whole pixmap trick might be overkill!

Bellow is a patch to capture the spirit of both of your patchs.
It's a bit higher in the GTK food chain. It basically grab the
glcontext for share_list at realize time. No need for
gv_view_area_get_share_list() then.

But I can't test it on Windows ..


Sylvain.

------------>8------------------------
--- gvviewarea.c.orig 2008-12-27 13:50:40.000000000 -0500
+++ gvviewarea.c.new 2008-12-27 14:14:19.000000000 -0500
@@ -363,19 +363,19 @@
     klass->view_state_changed = NULL;
 }
 
+static GdkGLContext *_share_list = NULL;
+
 static void
 gv_view_area_init(GvViewArea *view)
 {
-    GdkGLContext *glcontext = NULL;
-    GdkGLConfig *glconfig;
-
-    /* ---- Obtain shared GL context ---- */
-    glcontext = gv_view_area_get_share_list(view);
-    glconfig = gdk_gl_context_get_gl_config(glcontext);
-
+    GdkGLConfig *glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB    |
+                                                       GDK_GL_MODE_DEPTH  |
+                                                       GDK_GL_MODE_DOUBLE);
+
     /* ---- Enable GL capability ---- */
     gtk_widget_set_gl_capability (GTK_WIDGET(view), glconfig,
-                                  glcontext, TRUE, GDK_GL_RGBA_TYPE);
+                                  _share_list, TRUE, GDK_GL_RGBA_TYPE);
+
 
     view->state.tx = view->state.ty = view->state.rot = 0.0;
     view->state.zoom = 0.0;
@@ -1992,6 +1992,10 @@
 
     g_return_if_fail(GTK_WIDGET_REALIZED(widget));
 
+    if (NULL==_share_list && gtk_widget_is_gl_capable(widget)) {
+        _share_list = gtk_widget_get_gl_context(widget);
+    }
+
     /* Make gl area current so layers can create gl handles */
     if (!gv_view_area_make_current(view)) return;
 



--- On Sat, 12/27/08, Sanak <geosanak@...> wrote:

> From: Sanak <geosanak@...>
> Subject: Re: [Openev-discuss] "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment
> To: openev-discuss@..., sylvain_duclos@...
> Date: Saturday, December 27, 2008, 6:24 PM
> Hi Sylvain,
>
> I had checked linked gv.lib, and the dependency
> libraries(GTK+), but the
> result was the same.
>
> I think that the better way is that the pending code is
> used for only
> recovery from failure of  the
> "gv_view_area_get_share_list" function.
>
> After apply the following modification, testmain and openev
> works fine on my
> Windows environment.
>
> ===================================================================
> --- gvviewarea.c    (revision 104)
> +++ gvviewarea.c    (working copy)
> @@ -371,7 +371,14 @@
>
>      /* ---- Obtain shared GL context ---- */
>      glcontext = gv_view_area_get_share_list(view);
> -    glconfig = gdk_gl_context_get_gl_config(glcontext);
> +    if (glcontext != NULL) {
> +        glconfig =
> gdk_gl_context_get_gl_config(glcontext);
> +    } else {
> +        g_print("couldn't get share list. use old
> mode.\n");
> +        glconfig = gdk_gl_config_new_by_mode
> (GDK_GL_MODE_RGB    |
> +                                            
> GDK_GL_MODE_DEPTH  |
> +                                            
> GDK_GL_MODE_DOUBLE);
> +    }
>
>      /* ---- Enable GL capability ---- */
>      gtk_widget_set_gl_capability (GTK_WIDGET(view),
> glconfig,
>
> ===================================================================
>
> Regards,
>
> Sanak.
>
> 2008/12/26 s duclos <sylvain_duclos@...>
>
> > Hi,
> >
> > I had the same errors as you in:
> > OpenEV2_2008122501_svn-trunk_r104.PNG (44KB),
> >
> > Do you have "ldd" or something equivalent ..
> I used that
> > to find the libraries dependency. This is how I found
> that my own
> > version of testmain was linking to gtk-1.2 as well as
> gtk-2.0.
> >
> > Maybe your testmain is using an old libgv.so!
> >
> >
> > I just made a fresh build from svn openev2/trunk, my
> testmain output
> > is the same as you in:
> > OpenEV2_2008122501_apply_pending_source.PNG (29KB)
> >
> >
> > This what I did to the Makefiles so that it compile on
> my machine:
> >
> > openev2/trunk/src/lib/gv/Makefile:
> >  -removed gv_override.c \
> >  -add CC += -fPIC
> >
> > openev2/trunk/resource/mklocal/Linux:
> >  -remove -levtess (in your case this would be in
> CYGWIN..)
> >
> >
> >
> >
> > Then I went into openev2/trunk/src and run 'make
> install'
> >
> > I putted libgv.so in LD_LIBRARY_PATH:
> > $sudo cp ../output/lib/lib.Linux/libgv.so
> /usr/local/lib
> >
> > Then I just run testmain:
> > $  ../output/bin/bin.Linux/testmain
> >
> >
> >
> > This is not a final solution .. but it might give us
> clue as of
> > what is going wrong on your side.
> >
> > I tought that GTK2 (and so OpenEV2) added some sort of
> 'nativeness'
> > to openev on win32 .. so this puzzling!
> >
> >
> > Thanks,
> >
> > Sylvain.
> >
> >
> > --- On Thu, 12/25/08, Sanak <geosanak@...>
> wrote:
> >
> > > From: Sanak <geosanak@...>
> > > Subject: Re: [Openev-discuss]
> "gv_view_area_get_share_list" function
> > failed on OpenEV2 Windows environment
> > > To: openev-discuss@...
> > > Date: Thursday, December 25, 2008, 10:15 AM
> > > Hi,
> > >
> > > I had build and executed the
> src/cc/testmain/testmain.c on
> > > my Windows
> > > environment, and the result was the same.(see
> attach
> > > images)
> > >
> > > I don't know that the cause is the graphic
> board
> > > problem, or the GtkGLExt
> > > Windows version's problem.
> > >
> > > My environment details is as follows.
> > >
> > > CPU: Intel Core2 Quad Q9450
> > > OS: Windows XP SP3
> > > Graphic board: NVIDIA GeForce 9800 GT
> > > Compiler: Microsoft Visual Studio.NET 2003 SP1
> > > Gtk+: 2.12.9-win32-2 (include GtkGLExt)
> > > Gdal: 1.6.0
> > > Python: 2.5.1
> > > PyCairo: 1.4.12-1.win32-py25
> > > PyGObject: 2.14.1-1.win32-py2.5
> > > PyGtk: 2.12.1-2.win32-py25
> > > Numpy: 1.2.1-win32-superpack-python25
> > >
> > > Regards,
> > >
> > > Sanak.
> > >
> > > 2008/12/25 Mario Beauchamp
> <starged@...>
> > >
> > > > Hi Sylvain,
> > > >
> > > > On Wed, Dec 24, 2008 at 11:43 AM, s duclos
> > > <sylvain_duclos@...>
> > > > wrote:
> > > > >
> > > > > Wait! try building
> openev2/trunk/src/cc/testmain
> > > (you might need
> > > > > to fix the config in resource/, for
> instance I
> > > had to remove -ltess
> > > > > and also fix the include path when
> building
> > > libgv.so)
> > > >
> > > > Sorry, I didn't touch the makefiles... I
> find it
> > > easier to manage the
> > > > build/install process with setup.py.
> > > > I'll be glad to commit any modifications
> you make.
> > > >
> > > > > Then run ./testmain to see what happen
> .. if
> > > nothing goes wrong then
> > > > > the problem is in the libs deps above
> libgv.so.
> > > >
> > > > Also, I figured that libgv.so (does anyone
> link to
> > > it?) was not
> > > > necessary for OpenEV that's why setup.py
> only
> > > builds _gv.so.
> > > > Again, if any changes are necessary in the
> makefiles
> > > to make that
> > > > work, pass them along.
> > > >
> > > > > For instance, I was pulling somehow
> libgtk-1.2.so
> > > and GTK got all
> > > > > confused in
> gv_view_area_get_share_list() and
> > > going the old way
> > > > > didn't fix the problem.
> > > >
> > > > Ah I see! Maybe that was the problem right
> from the
> > > start!
> > > >
> > > > > Testmain sit right above libgv.so and
> it does a
> > > gv_view_area_new() call
> > > > > right from the start. This call, in
> turn, trigger
> > > Mario's hack to pull a
> > > > > glcontext from a pixmap in a platform
> neutral way
> > > (petty cool in fact:).
> > > >
> > > > Actually, that was Vexcell's hack which
> they found
> > > on gtkglext ml ;)
> > > >
> > > > > Anyway I can confirm that testmain in
> svn trunk
> > > work on a fairly recent
> > > > > Ubuntu AMD 64.
> > > >
> > > > Cool! I'm also running it on a x86_64.
> > > >
> > > > Thanks for jumping in Sylvain!
> > > >
> > > > cheers
> > > > --
> > > > Mario B.
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > _______________________________________________
> > > Openev-discuss mailing list
> > > Openev-discuss@...
> > >
> https://lists.sourceforge.net/lists/listinfo/openev-discuss
> >
> >
> >
> >


     

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Mario Beauchamp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sylvain,

On Sat, Dec 27, 2008 at 2:55 PM, s duclos <sylvain_duclos@...> wrote:
>
> So this whole pixmap trick might be overkill!
>
> Bellow is a patch to capture the spirit of both of your patchs.
> It's a bit higher in the GTK food chain. It basically grab the
> glcontext for share_list at realize time. No need for
> gv_view_area_get_share_list() then.

But all in all, what does this share list do? What's getting shared with what?
If it's too much trouble, then let's just drop the thing...

CIETmap has been running with the non share list way for the past 1-2
years without any noticeable effect. However, it doesn't use any of
the fancy stuff found in OpenEV like linked views and the like. So I
cannot tell the difference between share and non share and what impact
it has.

Feel free to enlighten me ;)

cheers
--
Mario B.

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by s duclos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Mario,


--- On Wed, 12/31/08, Mario Beauchamp <starged@...> wrote:

> From: Mario Beauchamp <starged@...>
> Subject: Re: [Openev-discuss] "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment
> To: sylvain_duclos@...
> Cc: openev-discuss@...
> Date: Wednesday, December 31, 2008, 6:25 AM
> Hi Sylvain,
>
> On Sat, Dec 27, 2008 at 2:55 PM, s duclos
> <sylvain_duclos@...> wrote:
> >
> > So this whole pixmap trick might be overkill!
> >
> > Bellow is a patch to capture the spirit of both of
> your patchs.
> > It's a bit higher in the GTK food chain. It
> basically grab the
> > glcontext for share_list at realize time. No need for
> > gv_view_area_get_share_list() then.
>
> But all in all, what does this share list do? What's
> getting shared with what?
> If it's too much trouble, then let's just drop the
> thing...

share_list is about GL's Display List. A Display List is more or less
a recording of gl..() commands. So if there is more than one view you
can share the display list between views. You do so when you create subsecant views by sharing the glContext of the first view.  

gv_view_area_get_share_list() is trying to pull a glContext from a
pixmap but glContext are not initialize yet. So this is why, I think,
it fail on some system.

In the case of CIETmap, maybe you are only using one view. If it is so
then there is nothing to share.

You can see for yourself share display list in action:

$ testmain -2

it will create two view that share display list. If you draw an area
in one view you will see it also in the second view. But you
can zoom independently. You can think of it like the overview
in Google Earth, 2 views of the same object.


a+

Sylvain.


 

>
> CIETmap has been running with the non share list way for
> the past 1-2
> years without any noticeable effect. However, it
> doesn't use any of
> the fancy stuff found in OpenEV like linked views and the
> like. So I
> cannot tell the difference between share and non share and
> what impact
> it has.
>
> Feel free to enlighten me ;)
>
> cheers
> --
> Mario B.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Openev-discuss mailing list
> Openev-discuss@...
> https://lists.sourceforge.net/lists/listinfo/openev-discuss


     

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Sanak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sylvain,

Thank you for your reply, and
sorry for my late reply.

After applied your patch, testmain and openev works fine on my Windows environment. ("testmain -2" also works fine, when the "Link" button pusshed or not.)

Thanks,

Sanak.

2008/12/28 s duclos <sylvain_duclos@...>
Hi Sanak,

OK, thanks for the feedback.

So this whole pixmap trick might be overkill!

Bellow is a patch to capture the spirit of both of your patchs.
It's a bit higher in the GTK food chain. It basically grab the
glcontext for share_list at realize time. No need for
gv_view_area_get_share_list() then.

But I can't test it on Windows ..


Sylvain.

------------>8------------------------
--- gvviewarea.c.orig   2008-12-27 13:50:40.000000000 -0500
+++ gvviewarea.c.new    2008-12-27 14:14:19.000000000 -0500
@@ -363,19 +363,19 @@
    klass->view_state_changed = NULL;
 }

+static GdkGLContext *_share_list = NULL;
+
 static void
 gv_view_area_init(GvViewArea *view)
 {
-    GdkGLContext *glcontext = NULL;
-    GdkGLConfig *glconfig;
-
-    /* ---- Obtain shared GL context ---- */
-    glcontext = gv_view_area_get_share_list(view);
-    glconfig = gdk_gl_context_get_gl_config(glcontext);
-
+    GdkGLConfig *glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB    |
+                                                       GDK_GL_MODE_DEPTH  |
+                                                       GDK_GL_MODE_DOUBLE);
+
    /* ---- Enable GL capability ---- */
    gtk_widget_set_gl_capability (GTK_WIDGET(view), glconfig,
-                                  glcontext, TRUE, GDK_GL_RGBA_TYPE);
+                                  _share_list, TRUE, GDK_GL_RGBA_TYPE);
+

    view->state.tx = view->state.ty = view->state.rot = 0.0;
    view->state.zoom = 0.0;
@@ -1992,6 +1992,10 @@

    g_return_if_fail(GTK_WIDGET_REALIZED(widget));

+    if (NULL==_share_list && gtk_widget_is_gl_capable(widget)) {
+        _share_list = gtk_widget_get_gl_context(widget);
+    }
+
    /* Make gl area current so layers can create gl handles */
    if (!gv_view_area_make_current(view)) return;




--- On Sat, 12/27/08, Sanak <geosanak@...> wrote:

> From: Sanak <geosanak@...>
> Subject: Re: [Openev-discuss] "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment
> To: openev-discuss@..., sylvain_duclos@...
> Date: Saturday, December 27, 2008, 6:24 PM
> Hi Sylvain,
>
> I had checked linked gv.lib, and the dependency
> libraries(GTK+), but the
> result was the same.
>
> I think that the better way is that the pending code is
> used for only
> recovery from failure of  the
> "gv_view_area_get_share_list" function.
>
> After apply the following modification, testmain and openev
> works fine on my
> Windows environment.
>
> ===================================================================
> --- gvviewarea.c    (revision 104)
> +++ gvviewarea.c    (working copy)
> @@ -371,7 +371,14 @@
>
>      /* ---- Obtain shared GL context ---- */
>      glcontext = gv_view_area_get_share_list(view);
> -    glconfig = gdk_gl_context_get_gl_config(glcontext);
> +    if (glcontext != NULL) {
> +        glconfig =
> gdk_gl_context_get_gl_config(glcontext);
> +    } else {
> +        g_print("couldn't get share list. use old
> mode.\n");
> +        glconfig = gdk_gl_config_new_by_mode
> (GDK_GL_MODE_RGB    |
> +
> GDK_GL_MODE_DEPTH  |
> +
> GDK_GL_MODE_DOUBLE);
> +    }
>
>      /* ---- Enable GL capability ---- */
>      gtk_widget_set_gl_capability (GTK_WIDGET(view),
> glconfig,
>
> ===================================================================
>
> Regards,
>
> Sanak.
>
> 2008/12/26 s duclos <sylvain_duclos@...>
>
> > Hi,
> >
> > I had the same errors as you in:
> > OpenEV2_2008122501_svn-trunk_r104.PNG (44KB),
> >
> > Do you have "ldd" or something equivalent ..
> I used that
> > to find the libraries dependency. This is how I found
> that my own
> > version of testmain was linking to gtk-1.2 as well as
> gtk-2.0.
> >
> > Maybe your testmain is using an old libgv.so!
> >
> >
> > I just made a fresh build from svn openev2/trunk, my
> testmain output
> > is the same as you in:
> > OpenEV2_2008122501_apply_pending_source.PNG (29KB)
> >
> >
> > This what I did to the Makefiles so that it compile on
> my machine:
> >
> > openev2/trunk/src/lib/gv/Makefile:
> >  -removed gv_override.c \
> >  -add CC += -fPIC
> >
> > openev2/trunk/resource/mklocal/Linux:
> >  -remove -levtess (in your case this would be in
> CYGWIN..)
> >
> >
> >
> >
> > Then I went into openev2/trunk/src and run 'make
> install'
> >
> > I putted libgv.so in LD_LIBRARY_PATH:
> > $sudo cp ../output/lib/lib.Linux/libgv.so
> /usr/local/lib
> >
> > Then I just run testmain:
> > $  ../output/bin/bin.Linux/testmain
> >
> >
> >
> > This is not a final solution .. but it might give us
> clue as of
> > what is going wrong on your side.
> >
> > I tought that GTK2 (and so OpenEV2) added some sort of
> 'nativeness'
> > to openev on win32 .. so this puzzling!
> >
> >
> > Thanks,
> >
> > Sylvain.
> >
> >
> > --- On Thu, 12/25/08, Sanak <geosanak@...>
> wrote:
> >
> > > From: Sanak <geosanak@...>
> > > Subject: Re: [Openev-discuss]
> "gv_view_area_get_share_list" function
> > failed on OpenEV2 Windows environment
> > > To: openev-discuss@...
> > > Date: Thursday, December 25, 2008, 10:15 AM
> > > Hi,
> > >
> > > I had build and executed the
> src/cc/testmain/testmain.c on
> > > my Windows
> > > environment, and the result was the same.(see
> attach
> > > images)
> > >
> > > I don't know that the cause is the graphic
> board
> > > problem, or the GtkGLExt
> > > Windows version's problem.
> > >
> > > My environment details is as follows.
> > >
> > > CPU: Intel Core2 Quad Q9450
> > > OS: Windows XP SP3
> > > Graphic board: NVIDIA GeForce 9800 GT
> > > Compiler: Microsoft Visual Studio.NET 2003 SP1
> > > Gtk+: 2.12.9-win32-2 (include GtkGLExt)
> > > Gdal: 1.6.0
> > > Python: 2.5.1
> > > PyCairo: 1.4.12-1.win32-py25
> > > PyGObject: 2.14.1-1.win32-py2.5
> > > PyGtk: 2.12.1-2.win32-py25
> > > Numpy: 1.2.1-win32-superpack-python25
> > >
> > > Regards,
> > >
> > > Sanak.
> > >
> > > 2008/12/25 Mario Beauchamp
> <starged@...>
> > >
> > > > Hi Sylvain,
> > > >
> > > > On Wed, Dec 24, 2008 at 11:43 AM, s duclos
> > > <sylvain_duclos@...>
> > > > wrote:
> > > > >
> > > > > Wait! try building
> openev2/trunk/src/cc/testmain
> > > (you might need
> > > > > to fix the config in resource/, for
> instance I
> > > had to remove -ltess
> > > > > and also fix the include path when
> building
> > > libgv.so)
> > > >
> > > > Sorry, I didn't touch the makefiles... I
> find it
> > > easier to manage the
> > > > build/install process with setup.py.
> > > > I'll be glad to commit any modifications
> you make.
> > > >
> > > > > Then run ./testmain to see what happen
> .. if
> > > nothing goes wrong then
> > > > > the problem is in the libs deps above
> libgv.so.
> > > >
> > > > Also, I figured that libgv.so (does anyone
> link to
> > > it?) was not
> > > > necessary for OpenEV that's why setup.py
> only
> > > builds _gv.so.
> > > > Again, if any changes are necessary in the
> makefiles
> > > to make that
> > > > work, pass them along.
> > > >
> > > > > For instance, I was pulling somehow
> libgtk-1.2.so
> > > and GTK got all
> > > > > confused in
> gv_view_area_get_share_list() and
> > > going the old way
> > > > > didn't fix the problem.
> > > >
> > > > Ah I see! Maybe that was the problem right
> from the
> > > start!
> > > >
> > > > > Testmain sit right above libgv.so and
> it does a
> > > gv_view_area_new() call
> > > > > right from the start. This call, in
> turn, trigger
> > > Mario's hack to pull a
> > > > > glcontext from a pixmap in a platform
> neutral way
> > > (petty cool in fact:).
> > > >
> > > > Actually, that was Vexcell's hack which
> they found
> > > on gtkglext ml ;)
> > > >
> > > > > Anyway I can confirm that testmain in
> svn trunk
> > > work on a fairly recent
> > > > > Ubuntu AMD 64.
> > > >
> > > > Cool! I'm also running it on a x86_64.
> > > >
> > > > Thanks for jumping in Sylvain!
> > > >
> > > > cheers
> > > > --
> > > > Mario B.
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > _______________________________________________
> > > Openev-discuss mailing list
> > > Openev-discuss@...
> > >
> https://lists.sourceforge.net/lists/listinfo/openev-discuss
> >
> >
> >
> >





------------------------------------------------------------------------------

_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss

Re: "gv_view_area_get_share_list" function failed on OpenEV2 Windows environment

by Mario Beauchamp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sylvain,

On Wed, Dec 31, 2008 at 12:16 PM, s duclos <sylvain_duclos@...> wrote:
>> >
>> > Bellow is a patch to capture the spirit of both of your patchs.

I have commited your patch to svn. Seems to work on my end so let's
wait and see...

> share_list is about GL's Display List. A Display List is more or less
> a recording of gl..() commands. So if there is more than one view you
> can share the display list between views. You do so when you create subsecant views by sharing the glContext of the first view.

I understand the principle now, thanks for your explanations.

> In the case of CIETmap, maybe you are only using one view. If it is so
> then there is nothing to share.

Only occasionally and not in a linked views context.

Thanks for your contribution, Sylvain.

cheers
--
Mario B.

------------------------------------------------------------------------------
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss