[info-performer] Performer & GTK

Date view Thread view Subject view Author view

From: Tiziano DIAMANTI (t.diamanti++at++cineca.it)
Date: 11/30/2004 03:54:15


Hello everybody,
I'm trying to convert an application su Linux
using wxWidgets.
A problem arises on machines with more than 1 processor.
GTK gives me a message like "cannot make current on ."
It seems that 2 or more processes are created and one
creates the OpenGL Context and the other tries to render
on it but it fails.
Anyone tried this before?

Here are pieces of my code:
Assigning the context:

    #ifdef __WXMSW__
      HGLRC ctx = GetContext()->GetGLRC();
      HWND hwnd = (HWND)GetHandle();
      m_pf->PerformerAssignContext(ctx,hwnd);
    #endif
    #ifdef __LINUX__
      m_pf->PerformerAssignContext((void*)(m_glContext->GetContext()),
        (void*)(((GdkWindowPrivate *)GTK_PIZZA(m_wxwindow)->bin_window)->xwindow));
    #endif

This is for telling Performer to render on those:
      #ifdef _WIN32
       if (pf_GLContextAssigned)
       {
         pfPWinGLCxt(pwindow, pf_hrc);
         pfPWinWSDrawable(pwindow, NULL, Perf_win);
         pfPWinWSWindow(pwindow, NULL, Perf_win);
         pfPWinSize(pwindow, winx, winy);
       }
       else
     #else
       if (pf_GLContextAssigned)
       {
         pfPWinGLCxt(pwindow, (__GLXcontextRec*)pf_hrc);
         pfPWinWSDrawable(pwindow, NULL, (long unsigned int)Perf_win);
         pfPWinWSWindow(pwindow, NULL, (long unsigned int)Perf_win);
         pfPWinSize(pwindow, winx, winy);
       }
       else
     #endif

The code works fine on Windows and on monoprocessor Linux,
but fails on multiprocessor Linux.
Any help would be greatly appreciated.

Tiziano Diamanti

3D Development
Cineca
Italy


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Nov 30 2004 - 03:54:32 PST