updated glew mx doc

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@252 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2004-03-24 04:56:20 +00:00
parent 807034262d
commit bf8976b177

View File

@ -472,15 +472,26 @@ versions. To include multi-context support, you have to do the
following: following:
<ol> <ol>
<li>Compile and use GLEW with the <tt>GLEW_MX</tt> preprocessor token defined.</li> <li>Compile and use GLEW with the <tt>GLEW_MX</tt> preprocessor token
<li>Replace the global <tt>glewInit()</tt> call with <tt>glewContextInit(GLEWContext* ctx)</tt>. Note, that <tt>ctx</tt> has to reside in global or thread-local memory.</li> defined.</li>
<li>Define the <tt>glewGetContext()</tt> macro or function that retrieves the GLEW context for the thread from which the OpenGL/WGL/GLX call is issued. The dispatch mechanism is primitive, but generic.</li> <li>For each rendering context, create a <tt>GLEWContext</tt> object
that will be available as long as the rendering context exists.</li>
<li>Define a macro or function called <tt>glewGetContext()</tt> that
returns a pointer to the <tt>GLEWContext</tt> object associated with
the rendering context from which OpenGL/WGL/GLX calls are
issued. (This dispatch mechanism is primitive, but generic.)
<li>Replace the global <tt>glewInit()</tt> call with
<tt>glewContextInit(glewGetContext())</tt>. Note, that the
<tt>GLEWContext</tt> pointer returned by <tt>glewGetContext()</tt> has
to reside in global or thread-local memory. Also, remember to call
<tt>glewContextInit</tt> after creating the <tt>GLEWContext</tt> object
in each rendering context.
</ol> </ol>
<p> Note that according to <a <p>Note that according to <a
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6yer.asp">WGL href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6yer.asp">WGL
documentation</a>, you have to initialize the entry points for every documentation</a>, you have to initialize the entry points for every
rendering context you create using pixel formats with different rendering context you create that use pixel formats with different
capabilities (for example the pixel formats provided by the generic capabilities (for example the pixel formats provided by the generic
software OpenGL implementation by Microsoft vs. the hardware software OpenGL implementation by Microsoft vs. the hardware
accelerated pixel formats). <b>GLEW by default ignores this accelerated pixel formats). <b>GLEW by default ignores this
@ -492,7 +503,7 @@ same entry points and capabilities (and why would anyone want to use
the software renderer when hardware acceleration is available?). This the software renderer when hardware acceleration is available?). This
means that unless you use the multi-context version of GLEW, you need means that unless you use the multi-context version of GLEW, you need
to call <tt>glewInit()</tt> only once in your program, or more to call <tt>glewInit()</tt> only once in your program, or more
precisely, once per process. precisely, once per process.</p>
<p> <p>