   Cannot draw object again
  I want to ask...I hava made an application to create object and draw it in canvas. For information I create using MFC V++ 8 and OpenGL. First I has been create the GL context in my main form. I create the the context using SetWindowsPixel and GLContext. After I insert my input, the object can be draw perfectly. After input, I want to process to create a shadow. And the output of shadow is displayed in second form. In second form, i create same GL context for draw the object.After all the process, I want to back again into main form or first form. But if I input new object or edit the display, the form cannot show newest scene. I confuse why it can be happen??? Because I create GLContext in two different form not in one form... Maybe you can help me..   
  If you want to use multiple contexts you'll need to use SetCurrentContext or something like that. All thought I'm not sure why you want mutiple rendering contexts. You'd probably be better off with using one rendering context, on one form, with multiple viewports.Or use directX which is object oriented and more suited for multiple instances.The problem with multiple contexts is IIRC, the data such as textures and buffers are not shared between contexts, so you'll have to do lots of copying. For instance with your shadow maps, you'll have to read them back from one contexts, copy them over to the other context, then draw. But I might be wrong.   ;  AFAIK, you can create a secondary "shared" context in OpenGL. It will let you, for example share the shadowmap texture between two contexts. That way you can avoid unnecessary and slow copying of a texture from one context to another. Search for "Shared OpenGL Context".   ;  @bzroom:I use two form with two context because in first form, I use it for create the object and edit it. And in the second context, I use for display the result of shadow mapping. If I think that the camera or light position is not good enough, I can edit again in first form.Oh yes, for process in second form I always copy the data from first form into second form. And it is work. But, if I want to go back in first form, the form is cannot display the edited object. Is there is some ways to make the first context doing right???@deathkrush:What is shared context in OpenGL??? Can you explain about it more?? What is the uses?? How to do it??   ;  A shared OpenGL context is basically a secondary context where you store all the data that you want to be shared between multiple windows. That way, if you modify the shared data in one window, it will automatically be updated in other windows. So, in your situation three contexts are needed: window 1, window 2 and shared context.See these threads:Multiple OpenGL ContextswglShareLists - how to share resources between ogl contexts;  So.. shared opengl context is use for share data. In my case, I have problem with drawing again. Is this related?? Sorry I don't know..Because I have create different context for each form and the data has been update manually. But, after i draw in my second form, I can use other form to draw again..Is this related?? thanx   ;  OK friend... Now I already know about the shared GL context.. Thanx for your help.   ;  OK friend... Now I already know about the shared GL context.. Thanx for your help.   