-
Shader Programs and DC's
Hi,
Can the same shader program be used in more than one DC at the same time?
-
Senior Member
OpenGL Guru
Re: Shader Programs and DC's
-
Advanced Member
Frequent Contributor
Re: Shader Programs and DC's
Well, Im not sure... For example you can install two graphics card, AGP & PCI (geforce/ati + matrox g450). This is two different DC and when you create GLRC on both DC, I'm quite sure that you cant share objects between this two RC's.
yooyo
-
Senior Member
OpenGL Guru
Re: Shader Programs and DC's
DC/RC, same **** different name.
No, you're quite right. Mixed it up. You can share program objects between GL contexts, but you can obviously not share contexts between implementations on different GPUs, nor can you share between two processes.
-
Re: Shader Programs and DC's
Thanks everybody for your posts...
My situation here, is that I have multiple windows in the same application. I need to change the palettes in all of them at the same time by replacing the 1D textures. I do not need different shading code to do this. I created only one shader program and tried to use it in the displaying function of all the windows. The shader didn't work except for one window. When I created multiple copies of the same shader programs and assigned one program to every window, it worked fine. I am new to shading, can there be anything that I did wrong or is there an obvious reason for that thet I don't know?
-
Re: Shader Programs and DC's
Check out for wglShareLists()
-
Advanced Member
Frequent Contributor
Re: Shader Programs and DC's
Instead creating rendering context (RC) for all windows you can create one RC for all. Just override OnPaint event and do wglMakeCurrent at beggining and SwapBuffers at end of this func. Remember to call SetPixelFormat with same PixelFormat for all windows.
No object sharing, but you must track GL state changes.
yooyo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules