Jump to content
  • Advertisement
Sign in to follow this  

Display List and gl shared context

This topic is 3305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have do a small change to my application, now I share the context by using this call :
It work really fine, I use textures, VBO ... all is nice... But when I try to use DisplayLists, I got a "Attempted to read or write protected memory" !!! It crash when I call glCallList... even if it is the very first call to this method !!!
            _listId = Gl.glGenLists(1);
            Gl.glNewList(_listId, Gl.GL_COMPILE);



Here is the GlContextManager class
    static public class GlContextManager

        #region Variables

        static private List<IntPtr> _contexts = new List<IntPtr>();


        #region ShareContext

        /// <summary>
        /// Share this context with all the other ones.
        /// </summary>
        static public void ShareContext(IntPtr context)
            if (_contexts.Contains(context))

            for (int i = 0; i < _contexts.Count; i++)
                bool r = Wgl.wglShareLists(_contexts, context);



Does someone has an idea of the problem ? Thanks for your help

Share this post

Link to post
Share on other sites
Finally I have remove the following line :

and it works... hum , no more crash

But I can't see my textures !!!

I have just do this :

Gl.glTexCoordPointer(2, Gl.GL_DOUBLE, Vertex.SIZEOF, (IntPtr)(6 * sizeof(double)));

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!