Thank you for the comment. It helped me google some more stuff.
Both glut windows have their glutPostReDisplay call one after the other.
If in case, for each display call, I re-create the shader (compile,
attach, link - vertex / fragment shader) and use it, it works fine.
But as soon as I take the compile/attach/link out of the display and
only do a glUseProgramObject(shader_object), it doesn't work.
Is there a way to
- create a shader object in the initialize function,
- have 2 glut windows
- and just call gluseshaderobject(shader) -- whenever i wish to use the shader.
Thank you,
Mayank
On Nov 13, 2007 10:37 PM, Keith Bauer <email@hidden> wrote:
>
> On Nov 14, 2007 4:44 PM, mayank <email@hidden> wrote:
> > Hi ..
> >
> > If I am using more than one glut window - how do i set up the shader
> > so I can use separate shaders for each window.
> > My shaders work fine with 1 window, but as soon as I enable multiple
> > windows, they fail.
> >
> > Does anyone has solutions for the same?
>
> GLUT windows don't share resources. You need to load each shader,
> texture, etc. in each window. AFAIK there's no way to make them share
> resources.
>
> -Keith
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden