MGL_glMakeCurrent

Makes a MGL device context the current OpenGL rendering context.

Declaration

void MGLAPI MGL_glMakeCurrent(
    MGLDC *dc)

Prototype In

mgraph.h

Parameters

dc

Device context to make the current OpenGL rendering context.

 

Description

This function makes the MGL device context the current rendering context for all OpenGL rendering commands. You must first call MGL_glCreateContext for the MGL device context to create a valid OpenGL rendering context before you can call this function to make it the rendering current OpenGL rendering context.

The MGL and OpenGL allow you to create multiple rendering context, and to switch between them for output you must use this function to make one of them current at a time. You cannot have more than one OpenGL rendering context current at one time. For instance you may be drawing to a fullscreen OpenGL rendering context, but have an MGL memory device context that you wish to render a small 3D scene into, so you would make the memory device context the current OpenGL rendering context with a call to this function. The any subsequent OpenGL commands will draw to the memory device context instead of the display device context.

See Also

MGL_glCreateContext, MGL_glDeleteContext

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com