Re: [GtkGLExt] how to use multiple gl windows?



Hi, Jack!
Thanks for the reply.  About your problem, can you
connect a signal callback to each drawing area widget?
   
Not knowing anything about what your doing past your
description, what I would do is simply make 2 mouse
callback functions, and attach one to each drawing
area with g_connect_signal.  Rather than have 1
callback attached to the "mother" window that tries to
guess which area you want.  ...That is if I understand
you correctly.
Let me know if this helps, or if you'd like, email
your code to me.  I'd be happy to look at it.
As far as my problem goes, I'm sure I'm not stepping
on pointers, but I realize my description is not
adequate.  What happens is my chess pieces and board
move to the new window, and the old window just has a
grey slab where the board should be and no pieces at
all.  The mouse functionality appears to still work,
but I can't see anything.  I found the same behavior
with just one window, if I try to load my textures and
objects before initializing the gl settings in the
window.  So I suspect some kind of order of operations
problem.
Also, I'm looking for a technique that allows me to
only load 1 copy of all the textures and objects, and
shares that copy between all the windows that may be
opened.
thanks
walter


--- Jack Chen <jacks_small_world yahoo com> wrote:
>  --- walter tallent <w41t3r yahoo com> wrote: > Hi.
> > I'm writing a 3d chess game for gnome and I want
> the
> > user to be able to play or view multiple games at
> the
> > same time.  I'm having trouble figuring out how to
> > store only one copy of the pieces and board
> objects,
> > and use these over and over for each window that's
> > opened.
> > I'm new to open-gl and pretty new to gtk
> altogether. 
> > I had concieved of a kind of client-server model
> where
> > the "server" would store the pieces and the
> "clients"
> > would access these objects to draw their
> particular
> > game states, but I can't get visuals in more than
> one
> > window at a time, in other words, when I start a
> new
> > game (window), the visuals all move to that
> window,
> > and the previous window becomes blank.
> > I'm guessing that I need to use the share-list
> > parameter to gtk_widget_set_gl_capability, but I
> guess
> > I haven't figured out the right order to call
> things
> > in.
> > Any help would be greatly appreciated.  
> > thanks
> > walter
> > 
> 
> Hi, I don't know too much about what you want to do,
> but in my own
> program I can display more than 1 OpenGL widgets
> simultaneously no
> problem. I just put 2 drawing_area widgets inside 2
> other different
> widgets with the same basic setup. Are you sure you
> didn't forget to
> update them at the same time, or you used the same
> pointer for both
> widgets?
> 
> Now for my own problem, I really hope to know how to
> specify which
> OpenGL widget to use with my mouse callback
> function. Can anyone help
> me out?
> 
> Best reguards,
> 
> Jack
> 
>
______________________________________________________________________
> 
> Post your free ad now! http://personals.yahoo.ca
> _______________________________________________
> gtkglext-list mailing list
> gtkglext-list gnome org
>
http://lists.gnome.org/mailman/listinfo/gtkglext-list


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]