New version of Tweak-OpenGL package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: New version of Tweak-OpenGL package

David Faught
On 7/17/07, Andreas Raab <[hidden email]> wrote:

> David Faught wrote:
> >> Oh. You must have launched this from within Tweak project builder. This
> >> is not what I meant. The example was meant as a sort of "standalone app"
> >> in Morphic that gets run without the overhead implied by
> >> CProjectBuilder. In other words you need to launch it from Morphic not
> >> from inside Tweak.
> >
> > This is also the result when I use the statement:
> >
> > CProjectMorph open: COpenGLPanel
> >
> >> from your previous note.
>
> Really? Try the attached version which I used to verify that it works
> against the SDK. If you launch it via CProjectMorph open: COpenGLPanel
> it will display a morphic window with a red opengl panel in it (which
> works just the way I described). And if you still get that error then
> please send me a screenshot (or post a youtube video ;-) because there
> must be something big I'm missing from your description.

Thanks very much!  Your class works just fine.  Now I just need to
include a few more things without breaking it, or figure out why the
one I have doesn't work the same way.  And thanks very much for the
OpenGL extension loader fix too.  That actually makes some choices a
little harder because I can approach my project with a wider scope.
Reply | Threaded
Open this post in threaded view
|

Re: New version of Tweak-OpenGL package

David Faught
On 7/17/07, David Faught <[hidden email]> wrote:

> On 7/17/07, Andreas Raab <[hidden email]> wrote:
> > David Faught wrote:
> > >> Oh. You must have launched this from within Tweak project builder. This
> > >> is not what I meant. The example was meant as a sort of "standalone app"
> > >> in Morphic that gets run without the overhead implied by
> > >> CProjectBuilder. In other words you need to launch it from Morphic not
> > >> from inside Tweak.
> > >
> > > This is also the result when I use the statement:
> > >
> > > CProjectMorph open: COpenGLPanel
> > >
> > >> from your previous note.
> >
> > Really? Try the attached version which I used to verify that it works
> > against the SDK. If you launch it via CProjectMorph open: COpenGLPanel
> > it will display a morphic window with a red opengl panel in it (which
> > works just the way I described). And if you still get that error then
> > please send me a screenshot (or post a youtube video ;-) because there
> > must be something big I'm missing from your description.
>
> Thanks very much!  Your class works just fine.  Now I just need to
> include a few more things without breaking it, or figure out why the
> one I have doesn't work the same way.  And thanks very much for the
> OpenGL extension loader fix too.  That actually makes some choices a
> little harder because I can approach my project with a wider scope.

Okay, I was able to get some simple examples to work based on your
COpenGLPanel class with some minor changes, up to and including some
trivial shader programs.  But when I try to use the COpenGLPanel as an
element in a simple UI layout with a few other elements, I'm back to
the same error again.  Any suggestions?
Reply | Threaded
Open this post in threaded view
|

Re: New version of Tweak-OpenGL package

Andreas.Raab
David Faught wrote:

>> Thanks very much!  Your class works just fine.  Now I just need to
>> include a few more things without breaking it, or figure out why the
>> one I have doesn't work the same way.  And thanks very much for the
>> OpenGL extension loader fix too.  That actually makes some choices a
>> little harder because I can approach my project with a wider scope.
>
> Okay, I was able to get some simple examples to work based on your
> COpenGLPanel class with some minor changes, up to and including some
> trivial shader programs.  But when I try to use the COpenGLPanel as an
> element in a simple UI layout with a few other elements, I'm back to
> the same error again.  Any suggestions?

Ah, yes. Now I understand what you're doing. The *top-level* player must
be a CPanel and it needs to hold the offset for the (embedded) OpenGL
player. The effect you're seeing comes from trying to use a panel as an
embedded player where a panel is specifically designed as a top-level
(windowed) player. The effect you're seeing comes from it trying to be a
Tweak window which it will when it's embedded in another Tweak player.

So the solution is two-fold:
1) Make the top-level player be a CPanel; have it record the offset
(like in my example)
2) Have either the embedded OpenGL player ask for its world's offset
(the world will be the panel) or have the panel forward the offset to
the embedded player - the latter is the better solution if you want to
use the OpenGL player in both Morphic as well as Tweakish environments

Cheers,
   - Andreas
Reply | Threaded
Open this post in threaded view
|

Re: New version of Tweak-OpenGL package

David Faught
On 7/18/07, Andreas Raab <[hidden email]> wrote:

> David Faught wrote:
> >> Thanks very much!  Your class works just fine.  Now I just need to
> >> include a few more things without breaking it, or figure out why the
> >> one I have doesn't work the same way.  And thanks very much for the
> >> OpenGL extension loader fix too.  That actually makes some choices a
> >> little harder because I can approach my project with a wider scope.
> >
> > Okay, I was able to get some simple examples to work based on your
> > COpenGLPanel class with some minor changes, up to and including some
> > trivial shader programs.  But when I try to use the COpenGLPanel as an
> > element in a simple UI layout with a few other elements, I'm back to
> > the same error again.  Any suggestions?
>
> Ah, yes. Now I understand what you're doing. The *top-level* player must
> be a CPanel and it needs to hold the offset for the (embedded) OpenGL
> player. The effect you're seeing comes from trying to use a panel as an
> embedded player where a panel is specifically designed as a top-level
> (windowed) player. The effect you're seeing comes from it trying to be a
> Tweak window which it will when it's embedded in another Tweak player.
>
> So the solution is two-fold:
> 1) Make the top-level player be a CPanel; have it record the offset
> (like in my example)
> 2) Have either the embedded OpenGL player ask for its world's offset
> (the world will be the panel) or have the panel forward the offset to
> the embedded player - the latter is the better solution if you want to
> use the OpenGL player in both Morphic as well as Tweakish environments

Or should I consider trying to put the Tweak UI elements INSIDE (or
overlaid on?) the OpenGL player in a manner similar to the UMN menus
in some Croquet demos?  I'm guessing that would be more complicated
and it's not a requirement for my current project, although it's easy
to imagine such a project ...

Cheers,
Dave
12