<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html><head>
<title>gsub_lite
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="HeaderDoc">
<style type="text/css"><!--a:link {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #0000ff;}a:visited {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #0000ff;}a:visited:hover {text-decoration: underline; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #ff6600;}a:active {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #ff6600;}a:hover {text-decoration: underline; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #ff6600;}h4 {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: tiny; font-weight: bold;}body {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: 10pt;}--></style></head><body bgcolor="#ffffff">
<h1><font face="Geneva,Arial,Helvtica">gsub_lite
</font></h1><br>
<a name="//apple_ref/doc/header/gsub_lite.h" title="gsub_lite"></a>
<h2>Abstract
</h2>
A collection of useful OpenGL routines for ARToolKit.
<h2>Discussion
</h2>
Sample code for example usage of gsub_lite is included with
ARToolKit, in the directory
<AR/examples/simpleLite
>.
<br><br>
gsub_lite is the preferred means for drawing camera video
images acquired from ARToolKit's video libraries. It includes
optimized texture handling, and a variety of flexible drawing
options.
<br><br>
gsub_lite also provides utility functions for setting the
OpenGL viewing frustum and camera position based on ARToolKit-
camera parameters and marker positions.
<br><br>
gsub_lite does not depend on GLUT, or indeed, any particular
window or event handling system. It is therefore well suited
to use in applications which have their own window and event
handling code.
<br><br>
gsub_lite v2.7 is intended as a replacement for gsub from
ARToolKit 2.65, by Mark Billinghurst (MB)
& Hirokazu Kato (HK),
with the following additional functionality:
<ul>
<li> Support for true stereo and multiple displays through removal
of most dependencies on global variables.
<li> Prepared library for thread-safety by removing global variables.
<li> Optimised texturing, particularly for Mac OS X platform.
<li> Added arglCameraFrustum to replace argDraw3dCamera() function.
<li> Renamed argConvGlpara() to arglCameraView() to more accurately
represent its functionality.
<li> Correctly handle textures with non-RGBA handling.
<li> Library setup and cleanup functions.
<li> Version numbering.
</ul>
It does however lack the following functionality from the original gsub
library:
<ul>
<li> GLUT event handling.
<li> Sub-window ("MINIWIN") and half-size drawing.
<li> HMD support for stereo via stencil.
</ul>
<br><br>
This file is part of ARToolKit.
<br><br>
ARToolKit is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
<br><br>
ARToolKit is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
<br><br>
You should have received a copy of the GNU General Public License
along with ARToolKit; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<br><br>
<hr><br><h2>Functions
</h2>
<a name="HeaderDoc_functions"></a>
<dl>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglCameraFrustum" target="_top">arglCameraFrustum
</a></tt></dt>
<dd>Create an OpenGL perspective projection matrix.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglCameraFrustumRH" target="_top">arglCameraFrustumRH
</a></tt></dt>
<dd>(description)
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglCameraView" target="_top">arglCameraView
</a></tt></dt>
<dd>Create an OpenGL viewing transformation matrix.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglCameraViewRH" target="_top">arglCameraViewRH
</a></tt></dt>
<dd>(description)
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglCleanup" target="_top">arglCleanup
</a></tt></dt>
<dd>Free memory used by gsub_lite associated with the specified context.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDispImage" target="_top">arglDispImage
</a></tt></dt>
<dd>Display an ARVideo image, by drawing it using OpenGL.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDispImageStateful" target="_top">arglDispImageStateful
</a></tt></dt>
<dd>Display an ARVideo image, by drawing it using OpenGL, using and modifying current OpenGL state.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDistortionCompensationGet" target="_top">arglDistortionCompensationGet
</a></tt></dt>
<dd>Enquire as to the enable state of camera lens distortion compensation in arglDispImage.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDistortionCompensationSet" target="_top">arglDistortionCompensationSet
</a></tt></dt>
<dd>Set compensation for camera lens distortion in arglDispImage to off or on.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDrawModeGet" target="_top">arglDrawModeGet
</a></tt></dt>
<dd>Get method by which arglDispImage() is transfering pixels.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDrawModeSet" target="_top">arglDrawModeSet
</a></tt></dt>
<dd>Set method by which arglDispImage() will transfer pixels.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglPixelFormatGet" target="_top">arglPixelFormatGet
</a></tt></dt>
<dd>Get the format of pixel data in which arglDispImage*() is expecting data to be passed.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglPixelFormatSet" target="_top">arglPixelFormatSet
</a></tt></dt>
<dd>Set the format of pixel data which will be passed to arglDispImage*()
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglSetupForCurrentContext" target="_top">arglSetupForCurrentContext
</a></tt></dt>
<dd>Initialise the gsub_lite library for the current OpenGL context.
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglTexmapModeGet" target="_top">arglTexmapModeGet
</a></tt></dt>
<dd>Enquire whether full or half-resolution TexImage2D pixel-transfer is being used in arglDispImage().
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglTexmapModeSet" target="_top">arglTexmapModeSet
</a></tt></dt>
<dd>Determines use of full or half-resolution TexImage2D pixel-transfer in arglDispImage().
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglTexRectangleGet" target="_top">arglTexRectangleGet
</a></tt></dt>
<dd>Enquire as to use of rectangular TexImage2D pixel-transfer in arglDispImage().
</dd>
<dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglTexRectangleSet" target="_top">arglTexRectangleSet
</a></tt></dt>
<dd>Determines use of rectangular TexImage2D pixel-transfer in arglDispImage().
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglCameraFrustum; name=arglCameraFrustum -->
<a name="//apple_ref/doc/compositePage/c/func/arglCameraFrustum"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglCameraFrustum">arglCameraFrustum
</a></h3>
</td></tr></table><hr><dl></dl><p>Create an OpenGL perspective projection matrix.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglCameraFrustum //apple_ref/c/clm/arglCameraFrustum //apple_ref/c/intfcm/arglCameraFrustum //apple_ref/c/func/arglCameraFrustum //apple_ref/c/ftmplt/arglCameraFrustum //apple_ref/c/defn/arglCameraFrustum //apple_ref/c/macro/arglCameraFrustum" --><font class="function">arglCameraFrustum
</font><!-- /a -->(
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/ARParam //apple_ref/c/cl/ARParam //apple_ref/c/tdef/ARParam //apple_ref/c/tag/ARParam //apple_ref/c/econst/ARParam //apple_ref/c/struct/ARParam //apple_ref/c/clconst/ARParam" --><font class="type">ARParam
</font><!-- /a --> *
<font class="param">cparam
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">focalmin
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">focalmax
</font>,
<!-- a logicalPath="//apple_ref/c/cl/GLdouble //apple_ref/c/cl/GLdouble //apple_ref/c/tdef/GLdouble //apple_ref/c/tag/GLdouble //apple_ref/c/econst/GLdouble //apple_ref/c/struct/GLdouble //apple_ref/c/clconst/GLdouble" --><font class="type">GLdouble
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/cl/m_projection //apple_ref/c/cl/m_projection //apple_ref/c/tdef/m_projection //apple_ref/c/tag/m_projection //apple_ref/c/econst/m_projection //apple_ref/c/struct/m_projection //apple_ref/c/clconst/m_projection" --><font class="type">m_projection
</font><!-- /a -->[
<font class="number">16
</font>]);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>cparam
</i></code></dt><dd>Pointer to a set of ARToolKit camera parameters for the
current video source.
</dd>
<dt><code><i>focalmax
</i></code></dt><dd>The maximum distance at which geometry will be rendered.
Any geometry further away from the camera than this distance will be clipped
and will not be appear in a rendered frame. Thus, this value should be
set high enough to avoid clipping of any geometry you care about. However,
the precision of the depth buffer is correlated with the ratio of focalmin
to focalmax, thus you should not set focalmax any higher than it needs to be.
This value should be specified in the same units as your OpenGL drawing.
</dd>
<dt><code><i>focalmin
</i></code></dt><dd>The minimum distance at which geometry will be rendered.
Any geometry closer to the camera than this distance will be clipped
and will not be appear in a rendered frame. Thus, this value should be
set low enough to avoid clipping of any geometry you care about. However,
the precision of the depth buffer is correlated with the ratio of focalmin
to focalmax, thus you should not set focalmin any lower than it needs to be.
Additionally, geometry viewed in a stereo projections that is too close to
camera is difficult and tiring to view, so if you are rendering stereo
perspectives you should set this value no lower than the near-point of
the eyes. The near point in humans varies, but usually lies between 0.1 m
0.3 m. This value should be specified in the same units as your OpenGL drawing.
</li></ol></dd>
<dt><code><i>m_projection
</i></code></dt><dd>Pointer to a array of 16 GLdoubles, which will be filled
out with a projection matrix suitable for passing to OpenGL. The matrix
is specified in column major order.
</dd>
</dl>
</blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>Use this function to create a matrix suitable for passing to OpenGL
to set the viewing projection.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.68.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglCameraFrustumRH; name=arglCameraFrustumRH -->
<a name="//apple_ref/doc/compositePage/c/func/arglCameraFrustumRH"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglCameraFrustumRH">arglCameraFrustumRH
</a></h3>
</td></tr></table><hr><dl></dl><p>(description)
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglCameraFrustumRH //apple_ref/c/clm/arglCameraFrustumRH //apple_ref/c/intfcm/arglCameraFrustumRH //apple_ref/c/func/arglCameraFrustumRH //apple_ref/c/ftmplt/arglCameraFrustumRH //apple_ref/c/defn/arglCameraFrustumRH //apple_ref/c/macro/arglCameraFrustumRH" --><font class="function">arglCameraFrustumRH
</font><!-- /a -->(
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/ARParam //apple_ref/c/cl/ARParam //apple_ref/c/tdef/ARParam //apple_ref/c/tag/ARParam //apple_ref/c/econst/ARParam //apple_ref/c/struct/ARParam //apple_ref/c/clconst/ARParam" --><font class="type">ARParam
</font><!-- /a --> *
<font class="param">cparam
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">focalmin
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">focalmax
</font>,
<!-- a logicalPath="//apple_ref/c/cl/GLdouble //apple_ref/c/cl/GLdouble //apple_ref/c/tdef/GLdouble //apple_ref/c/tag/GLdouble //apple_ref/c/econst/GLdouble //apple_ref/c/struct/GLdouble //apple_ref/c/clconst/GLdouble" --><font class="type">GLdouble
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/cl/m_projection //apple_ref/c/cl/m_projection //apple_ref/c/tdef/m_projection //apple_ref/c/tag/m_projection //apple_ref/c/econst/m_projection //apple_ref/c/struct/m_projection //apple_ref/c/clconst/m_projection" --><font class="type">m_projection
</font><!-- /a -->[
<font class="number">16
</font>]);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>(name)
</i></code></dt><dd>(description)
</dd>
</dl>
</blockquote>
<dl><dt><i>function result
</i></dt><dd>(description)
</dd>
<h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>(description)
</p>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglCameraView; name=arglCameraView -->
<a name="//apple_ref/doc/compositePage/c/func/arglCameraView"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglCameraView">arglCameraView
</a></h3>
</td></tr></table><hr><dl></dl><p>Create an OpenGL viewing transformation matrix.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglCameraView //apple_ref/c/clm/arglCameraView //apple_ref/c/intfcm/arglCameraView //apple_ref/c/func/arglCameraView //apple_ref/c/ftmplt/arglCameraView //apple_ref/c/defn/arglCameraView //apple_ref/c/macro/arglCameraView" --><font class="function">arglCameraView
</font><!-- /a -->(
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/cl/para //apple_ref/c/cl/para //apple_ref/c/tdef/para //apple_ref/c/tag/para //apple_ref/c/econst/para //apple_ref/c/struct/para //apple_ref/c/clconst/para" --><font class="type">para
</font><!-- /a -->[
<font class="number">3
</font>][
<font class="number">4
</font>],
<!-- a logicalPath="//apple_ref/c/cl/GLdouble //apple_ref/c/cl/GLdouble //apple_ref/c/tdef/GLdouble //apple_ref/c/tag/GLdouble //apple_ref/c/econst/GLdouble //apple_ref/c/struct/GLdouble //apple_ref/c/clconst/GLdouble" --><font class="type">GLdouble
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/cl/m_modelview //apple_ref/c/cl/m_modelview //apple_ref/c/tdef/m_modelview //apple_ref/c/tag/m_modelview //apple_ref/c/econst/m_modelview //apple_ref/c/struct/m_modelview //apple_ref/c/clconst/m_modelview" --><font class="type">m_modelview
</font><!-- /a -->[
<font class="number">16
</font>],
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">scale
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>para
</i></code></dt><dd>Pointer to 3x4 matrix array of doubles which specify the
position of an ARToolKit marker, as returned by arGetTransMat().
</dd>
<dt><code><i>m_modelview
</i></code></dt><dd>Pointer to a array of 16 GLdoubles, which will be filled
out with a modelview matrix suitable for passing to OpenGL. The matrix
is specified in column major order.
</dd>
<dt><code><i>scale
</i></code></dt><dd>Specifies a scaling between ARToolKit's
units (usually millimeters) and OpenGL's coordinate system units.
What you pass for the scalefactor parameter depends on what units you
want to do your OpenGL drawing in. If you use a scalefactor of 1.0, then
<br>
To use different OpenGL units, e.g. metres, then you would pass 0.001.
</li></ol></dd>
</dl>
</blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>Use this function to create a matrix suitable for passing to OpenGL
to set the viewing transformation of the virtual camera.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.68.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglCameraViewRH; name=arglCameraViewRH -->
<a name="//apple_ref/doc/compositePage/c/func/arglCameraViewRH"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglCameraViewRH">arglCameraViewRH
</a></h3>
</td></tr></table><hr><dl></dl><p>(description)
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglCameraViewRH //apple_ref/c/clm/arglCameraViewRH //apple_ref/c/intfcm/arglCameraViewRH //apple_ref/c/func/arglCameraViewRH //apple_ref/c/ftmplt/arglCameraViewRH //apple_ref/c/defn/arglCameraViewRH //apple_ref/c/macro/arglCameraViewRH" --><font class="function">arglCameraViewRH
</font><!-- /a -->(
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/cl/para //apple_ref/c/cl/para //apple_ref/c/tdef/para //apple_ref/c/tag/para //apple_ref/c/econst/para //apple_ref/c/struct/para //apple_ref/c/clconst/para" --><font class="type">para
</font><!-- /a -->[
<font class="number">3
</font>][
<font class="number">4
</font>],
<!-- a logicalPath="//apple_ref/c/cl/GLdouble //apple_ref/c/cl/GLdouble //apple_ref/c/tdef/GLdouble //apple_ref/c/tag/GLdouble //apple_ref/c/econst/GLdouble //apple_ref/c/struct/GLdouble //apple_ref/c/clconst/GLdouble" --><font class="type">GLdouble
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/cl/m_modelview //apple_ref/c/cl/m_modelview //apple_ref/c/tdef/m_modelview //apple_ref/c/tag/m_modelview //apple_ref/c/econst/m_modelview //apple_ref/c/struct/m_modelview //apple_ref/c/clconst/m_modelview" --><font class="type">m_modelview
</font><!-- /a -->[
<font class="number">16
</font>],
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">scale
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>(name)
</i></code></dt><dd>(description)
</dd>
</dl>
</blockquote>
<dl><dt><i>function result
</i></dt><dd>(description)
</dd>
<h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>(description)
</p>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglCleanup; name=arglCleanup -->
<a name="//apple_ref/doc/compositePage/c/func/arglCleanup"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglCleanup">arglCleanup
</a></h3>
</td></tr></table><hr><dl></dl><p>Free memory used by gsub_lite associated with the specified context.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglCleanup //apple_ref/c/clm/arglCleanup //apple_ref/c/intfcm/arglCleanup //apple_ref/c/func/arglCleanup //apple_ref/c/ftmplt/arglCleanup //apple_ref/c/defn/arglCleanup //apple_ref/c/macro/arglCleanup" --><font class="function">arglCleanup
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>contextSettings
</i></code></dt><dd>A reference to ARGL's settings for an OpenGL
context, as returned by arglSetupForCurrentContext().
</dd>
</dl>
</blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>Should be called after no more argl* functions are needed, in order
to prevent memory leaks etc.
<br><br>
The library can be setup again for the context at a later time by calling
arglSetupForCurrentContext() again.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.68.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDispImage; name=arglDispImage -->
<a name="//apple_ref/doc/compositePage/c/func/arglDispImage"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDispImage">arglDispImage
</a></h3>
</td></tr></table><hr><dl></dl><p>Display an ARVideo image, by drawing it using OpenGL.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDispImage //apple_ref/c/clm/arglDispImage //apple_ref/c/intfcm/arglDispImage //apple_ref/c/func/arglDispImage //apple_ref/c/ftmplt/arglDispImage //apple_ref/c/defn/arglDispImage //apple_ref/c/macro/arglDispImage" --><font class="function">arglDispImage
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARUint8 //apple_ref/c/cl/ARUint8 //apple_ref/c/tdef/ARUint8 //apple_ref/c/tag/ARUint8 //apple_ref/c/econst/ARUint8 //apple_ref/c/struct/ARUint8 //apple_ref/c/clconst/ARUint8" --><font class="type">ARUint8
</font><!-- /a --> *
<font class="param">image
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/ARParam //apple_ref/c/cl/ARParam //apple_ref/c/tdef/ARParam //apple_ref/c/tag/ARParam //apple_ref/c/econst/ARParam //apple_ref/c/struct/ARParam //apple_ref/c/clconst/ARParam" --><font class="type">ARParam
</font><!-- /a --> *
<font class="param">cparam
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">zoom
</font>,
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>image
</i></code></dt><dd>Pointer to the tightly-packed image data (as returned by
arVideoGetImage()). The horizontal and vertical dimensions of the image
data must exactly match the values specified in the fields cparam->xsize
and cparam->ysize (see below).
<br><br>
The first byte of image data corresponds to the first component of the
top-left-most pixel in the image. The data continues with the remaining
pixels of the first row, followed immediately by the pixels of the second
row, and so on to the last byte of the image data, which corresponds to
the last component of the bottom-right-most pixel.
</dd>
<dt><code><i>cparam
</i></code></dt><dd>Pointer to a set of ARToolKit camera parameters for the
current video source. The size of the source image is taken from the
fields xsize and ysize of the ARParam structure pointed to. Also, when
the draw mode is AR_DRAW_BY_TEXTURE_MAPPING (see the documentation for
the global variable arglDrawMode) the field dist_factor of the ARParam
structure pointed to will be taken as the amount to un-warp the supplied
image.
</dd>
<dt><code><i>zoom
</i></code></dt><dd>The amount to scale the video image up or down. To draw the video
image double size, use a zoom value of 2.0. To draw the video image
half size use a zoom value of 0.5.
</dd>
<dt><code><i>contextSettings
</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL
context, as returned by arglSetupForCurrentContext() for this context. It
is the callers responsibility to make sure that the current context at the
time arglDisplayImage() is called matches that under which contextSettings
was created.
</dd>
</dl>
</blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>This function draws an image from an ARVideo source to the current
OpenGL context. This operation is most useful in video see-through
augmented reality applications for drawing the camera view as a
background image, but can also be used in other ways.
<br><br>
An undistorted image is drawn with the lower-left corner of the
bottom-left-most pixel at OpenGL screen coordinates (0,0), and the
upper-right corner of the top-right-most pixel at OpenGL screen
coodinates (x * zoom, y * zoom), where x and y are the values of the
fields cparam->xsize and cparam->ysize (see below) and zoom is the
value of the parameter zoom (also see below). If cparam->dist_factor
indicates that an un-warping correction should be applied, the actual
coordinates will differ from the values specified here.
<br><br>
OpenGL state: Drawing is performed with depth testing and lighting
disabled, and thus leaves the the depth buffer (if any) unmodified. If
pixel transfer is by texturing (see documentation for arglDrawMode),
the drawing is done in replacement texture environment mode.
The depth test enable and lighting enable state and the texture
environment mode are restored before the function returns.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.68.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDispImageStateful; name=arglDispImageStateful -->
<a name="//apple_ref/doc/compositePage/c/func/arglDispImageStateful"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDispImageStateful">arglDispImageStateful
</a></h3>
</td></tr></table><hr><dl></dl><p>Display an ARVideo image, by drawing it using OpenGL, using and modifying current OpenGL state.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDispImageStateful //apple_ref/c/clm/arglDispImageStateful //apple_ref/c/intfcm/arglDispImageStateful //apple_ref/c/func/arglDispImageStateful //apple_ref/c/ftmplt/arglDispImageStateful //apple_ref/c/defn/arglDispImageStateful //apple_ref/c/macro/arglDispImageStateful" --><font class="function">arglDispImageStateful
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARUint8 //apple_ref/c/cl/ARUint8 //apple_ref/c/tdef/ARUint8 //apple_ref/c/tag/ARUint8 //apple_ref/c/econst/ARUint8 //apple_ref/c/struct/ARUint8 //apple_ref/c/clconst/ARUint8" --><font class="type">ARUint8
</font><!-- /a --> *
<font class="param">image
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/ARParam //apple_ref/c/cl/ARParam //apple_ref/c/tdef/ARParam //apple_ref/c/tag/ARParam //apple_ref/c/econst/ARParam //apple_ref/c/struct/ARParam //apple_ref/c/clconst/ARParam" --><font class="type">ARParam
</font><!-- /a --> *
<font class="param">cparam
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/double //apple_ref/c/cl/double //apple_ref/c/tdef/double //apple_ref/c/tag/double //apple_ref/c/econst/double //apple_ref/c/struct/double //apple_ref/c/clconst/double" --><font class="type">double
</font><!-- /a --> <font class="param">zoom
</font>,
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>);
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>This function is identical to arglDispImage except that whereas
arglDispImage sets an orthographic 2D projection and the OpenGL state
prior to drawing, this function does not. It also does not restore any
changes made to OpenGL state.
<br><br>
This allows you to do effects with your image, other than just drawing it
2D and with the lower-left corner of the bottom-left-most pixel attached
to the bottom-left (0,0) of the window. For example, you might use a
perspective projection instead of an orthographic projection with a
glLoadIdentity() / glTranslate() on the modelview matrix to place the
lower-left corner of the bottom-left-most pixel somewhere other than 0,0
and leave depth-testing enabled.
<br><br>
See the documentation for arglDispImage() for more information.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.68.2.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDistortionCompensationGet; name=arglDistortionCompensationGet -->
<a name="//apple_ref/doc/compositePage/c/func/arglDistortionCompensationGet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDistortionCompensationGet">arglDistortionCompensationGet
</a></h3>
</td></tr></table><hr><dl></dl><p>Enquire as to the enable state of camera lens distortion compensation in arglDispImage.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDistortionCompensationGet //apple_ref/c/clm/arglDistortionCompensationGet //apple_ref/c/intfcm/arglDistortionCompensationGet //apple_ref/c/func/arglDistortionCompensationGet //apple_ref/c/ftmplt/arglDistortionCompensationGet //apple_ref/c/defn/arglDistortionCompensationGet //apple_ref/c/macro/arglDistortionCompensationGet" --><font class="function">arglDistortionCompensationGet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>,
<!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> *
<font class="param">enable
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>contextSettings
</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL
context, as returned by arglSetupForCurrentContext() for this context.
</dd>
<dt><code><i>enable
</i></code></dt><dd>Pointer to an integer value which will be set to TRUE if distortion
compensation is enabled in the specified context, or FALSE if it is disabled.
</dd>
</dl>
</blockquote>
<dl><dt><i>function result
</i></dt><dd>TRUE if the distortion value was retreived, FALSE if an error occurred.
</dd>
<h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>By default, arglDispImage compensates for the distortion of the camera's
acquired image caused by the lens when it draws. This function enquires
as to whether arglDispImage is currently doing compensation or not.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.71.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDistortionCompensationSet; name=arglDistortionCompensationSet -->
<a name="//apple_ref/doc/compositePage/c/func/arglDistortionCompensationSet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDistortionCompensationSet">arglDistortionCompensationSet
</a></h3>
</td></tr></table><hr><dl></dl><p>Set compensation for camera lens distortion in arglDispImage to off or on.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDistortionCompensationSet //apple_ref/c/clm/arglDistortionCompensationSet //apple_ref/c/intfcm/arglDistortionCompensationSet //apple_ref/c/func/arglDistortionCompensationSet //apple_ref/c/ftmplt/arglDistortionCompensationSet //apple_ref/c/defn/arglDistortionCompensationSet //apple_ref/c/macro/arglDistortionCompensationSet" --><font class="function">arglDistortionCompensationSet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>,
<!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <font class="param">enable
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>contextSettings
</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL
context, as returned by arglSetupForCurrentContext() for this context.
</dd>
<dt><code><i>enable
</i></code></dt><dd>TRUE to enabled distortion compensation, FALSE to disable it.
The default state for new contexts is enable = TRUE.
</dd>
</dl>
</blockquote>
<dl><dt><i>function result
</i></dt><dd>TRUE if the distortion value was set, FALSE if an error occurred.
</dd>
<h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>By default, arglDispImage compensates for the distortion of the camera's
acquired image caused by the lens when it draws. By calling this function
with enabled = FALSE, this compensation will be disabled in the specified
drawing context. It may be re-enabled at any time.
This function is useful if you need to draw an image, but do not know the
extent of the camera's lens distortion (such as during distortion calibration).
While distortion compensation is disabled, the dist_factor[] array in a
the camera cparam structure passed to arglDispImage is ignored.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.71.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDrawModeGet; name=arglDrawModeGet -->
<a name="//apple_ref/doc/compositePage/c/func/arglDrawModeGet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDrawModeGet">arglDrawModeGet
</a></h3>
</td></tr></table><hr><dl></dl><p>Get method by which arglDispImage() is transfering pixels.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDrawModeGet //apple_ref/c/clm/arglDrawModeGet //apple_ref/c/intfcm/arglDrawModeGet //apple_ref/c/func/arglDrawModeGet //apple_ref/c/ftmplt/arglDrawModeGet //apple_ref/c/defn/arglDrawModeGet //apple_ref/c/macro/arglDrawModeGet" --><font class="function">arglDrawModeGet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>);
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>Enquires as to the current method by which arglDispImage() is
transferring pixels to OpenGL for display. See arglDrawModeSet() for
more information.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.72.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDrawModeSet; name=arglDrawModeSet -->
<a name="//apple_ref/doc/compositePage/c/func/arglDrawModeSet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDrawModeSet">arglDrawModeSet
</a></h3>
</td></tr></table><hr><dl></dl><p>Set method by which arglDispImage() will transfer pixels.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDrawModeSet //apple_ref/c/clm/arglDrawModeSet //apple_ref/c/intfcm/arglDrawModeSet //apple_ref/c/func/arglDrawModeSet //apple_ref/c/ftmplt/arglDrawModeSet //apple_ref/c/defn/arglDrawModeSet //apple_ref/c/macro/arglDrawModeSet" --><font class="function">arglDrawModeSet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <font class="param">mode
</font>);
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>This setting determines the method by which arglDispImage transfers pixels
of an image to OpenGL for display. Setting this
variable to a value of AR_DRAW_BY_GL_DRAW_PIXELS specifies the use of the
OpenGL DrawPixels functions to do the transfer. Setting this variable to a value of
AR_DRAW_BY_TEXTURE_MAPPING specifies the use of OpenGL TexImage2D functions to do the
transfer. The DrawPixels method is guaranteed to be available on all
implementations, but arglDispImage does not correct the image
for camera lens distortion under this method. In contrast, TexImage2D is only
available on some implementations, but allows arglDispImage() to apply a correction
for camera lens distortion, and additionally offers greater potential for
accelerated drawing on some implementations.
<br><br>
The initial value is AR_DRAW_BY_TEXTURE_MAPPING.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.72.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglPixelFormatGet; name=arglPixelFormatGet -->
<a name="//apple_ref/doc/compositePage/c/func/arglPixelFormatGet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglPixelFormatGet">arglPixelFormatGet
</a></h3>
</td></tr></table><hr><dl></dl><p>Get the format of pixel data in which arglDispImage*() is expecting data to be passed.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglPixelFormatGet //apple_ref/c/clm/arglPixelFormatGet //apple_ref/c/intfcm/arglPixelFormatGet //apple_ref/c/func/arglPixelFormatGet //apple_ref/c/ftmplt/arglPixelFormatGet //apple_ref/c/defn/arglPixelFormatGet //apple_ref/c/macro/arglPixelFormatGet" --><font class="function">arglPixelFormatGet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>,
<!-- a logicalPath="//apple_ref/c/cl/AR_PIXEL_FORMAT //apple_ref/c/cl/AR_PIXEL_FORMAT //apple_ref/c/tdef/AR_PIXEL_FORMAT //apple_ref/c/tag/AR_PIXEL_FORMAT //apple_ref/c/econst/AR_PIXEL_FORMAT //apple_ref/c/struct/AR_PIXEL_FORMAT //apple_ref/c/clconst/AR_PIXEL_FORMAT" --><font class="type">AR_PIXEL_FORMAT
</font><!-- /a --> *
<font class="param">format
</font>,
<!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> *
<font class="param">size
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>contextSettings
</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL
context, as returned by arglSetupForCurrentContext() for this context.
</dd>
<dt><code><i>format
</i></code></dt><dd>A symbolic constant for the pixel format in use. See
AR_PIXEL_FORMAT in ar.h for a list of all possible formats.
</dd>
<dt><code><i>size
</i></code></dt><dd>The number of bytes of memory occupied per pixel, for the given format.
</dd>
</dl>
</blockquote>
<dl><dt><i>function result
</i></dt><dd>TRUE if the pixel format and size values were retreived, FALSE if an error occurred.
</dd>
<h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>This function enquires as to the current format of pixel data being
expected by the arglDispImage*() functions. The default format is determined by
the value of AR_DEFAULT_PIXEL_FORMAT at the time the library was built.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.71.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglPixelFormatSet; name=arglPixelFormatSet -->
<a name="//apple_ref/doc/compositePage/c/func/arglPixelFormatSet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglPixelFormatSet">arglPixelFormatSet
</a></h3>
</td></tr></table><hr><dl></dl><p>Set the format of pixel data which will be passed to arglDispImage*()
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglPixelFormatSet //apple_ref/c/clm/arglPixelFormatSet //apple_ref/c/intfcm/arglPixelFormatSet //apple_ref/c/func/arglPixelFormatSet //apple_ref/c/ftmplt/arglPixelFormatSet //apple_ref/c/defn/arglPixelFormatSet //apple_ref/c/macro/arglPixelFormatSet" --><font class="function">arglPixelFormatSet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>,
<!-- a logicalPath="//apple_ref/c/cl/AR_PIXEL_FORMAT //apple_ref/c/cl/AR_PIXEL_FORMAT //apple_ref/c/tdef/AR_PIXEL_FORMAT //apple_ref/c/tag/AR_PIXEL_FORMAT //apple_ref/c/econst/AR_PIXEL_FORMAT //apple_ref/c/struct/AR_PIXEL_FORMAT //apple_ref/c/clconst/AR_PIXEL_FORMAT" --><font class="type">AR_PIXEL_FORMAT
</font><!-- /a --> <font class="param">format
</font>);
</pre></blockquote>
<h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions
</font></h5>
<blockquote>
<dl>
<dt><code><i>contextSettings
</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL
context, as returned by arglSetupForCurrentContext() for this context.
</dd>
<dt><code><i>format
</i></code></dt><dd>A symbolic constant for the pixel format being set. See
AR_PIXEL_FORMAT in ar.h for a list of all possible formats.
</dd>
</dl>
</blockquote>
<dl><dt><i>function result
</i></dt><dd>TRUE if the pixel format value was set, FALSE if an error occurred.
</dd>
<h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>(description)
In gsub_lite, the format of the pixels (i.e. the arrangement of components
within each pixel) can be changed at runtime. Use this function to inform
gsub_lite the format the pixels being passed to arglDispImage*() functions
are in. This setting applies only to the context passed in parameter
contextSettings. The default format is determined by
the value of AR_DEFAULT_PIXEL_FORMAT at the time the library was built.
Usually, image data is passed in directly from images generated by ARVideo,
and so you should ensure that ARVideo is generating pixels of the same format.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.71.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglSetupForCurrentContext; name=arglSetupForCurrentContext -->
<a name="//apple_ref/doc/compositePage/c/func/arglSetupForCurrentContext"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglSetupForCurrentContext">arglSetupForCurrentContext
</a></h3>
</td></tr></table><hr><dl></dl><p>Initialise the gsub_lite library for the current OpenGL context.
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglSetupForCurrentContext //apple_ref/c/clm/arglSetupForCurrentContext //apple_ref/c/intfcm/arglSetupForCurrentContext //apple_ref/c/func/arglSetupForCurrentContext //apple_ref/c/ftmplt/arglSetupForCurrentContext //apple_ref/c/defn/arglSetupForCurrentContext //apple_ref/c/macro/arglSetupForCurrentContext" --><font class="function">arglSetupForCurrentContext
</font><!-- /a -->(
<font class="param">void
</font>);
</pre></blockquote>
<dl><dt><i>function result
</i></dt><dd>An ARGL_CONTEXT_SETTINGS_REF. See the documentation for this type for more info.
</dd>
<h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>This function performs required setup of the gsub_lite library
for the current OpenGL context and must be called before any other argl*()
functions are called for this context.
<br><br>
An OpenGL context holds all of the state of the OpenGL machine, including
textures and display lists etc. There will usually be one OpenGL context
for each window displaying OpenGL content.
<br><br>
Other argl*() functions whose operation depends on OpenGL state will
require an ARGL_CONTEXT_SETTINGS_REF. This is just so that
they can keep track of per-context variables.
<br><br>
You should call arglCleanup() passing in the ARGL_CONTEXT_SETTINGS_REF
when you have finished with the library for this context.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.68.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglTexmapModeGet; name=arglTexmapModeGet -->
<a name="//apple_ref/doc/compositePage/c/func/arglTexmapModeGet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglTexmapModeGet">arglTexmapModeGet
</a></h3>
</td></tr></table><hr><dl></dl><p>Enquire whether full or half-resolution TexImage2D pixel-transfer is being used in arglDispImage().
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglTexmapModeGet //apple_ref/c/clm/arglTexmapModeGet //apple_ref/c/intfcm/arglTexmapModeGet //apple_ref/c/func/arglTexmapModeGet //apple_ref/c/ftmplt/arglTexmapModeGet //apple_ref/c/defn/arglTexmapModeGet //apple_ref/c/macro/arglTexmapModeGet" --><font class="function">arglTexmapModeGet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>);
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>Enquires as to the current value of the TexmapMode setting. See arglTexmapModeSet()
for more info.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.72.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglTexmapModeSet; name=arglTexmapModeSet -->
<a name="//apple_ref/doc/compositePage/c/func/arglTexmapModeSet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglTexmapModeSet">arglTexmapModeSet
</a></h3>
</td></tr></table><hr><dl></dl><p>Determines use of full or half-resolution TexImage2D pixel-transfer in arglDispImage().
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglTexmapModeSet //apple_ref/c/clm/arglTexmapModeSet //apple_ref/c/intfcm/arglTexmapModeSet //apple_ref/c/func/arglTexmapModeSet //apple_ref/c/ftmplt/arglTexmapModeSet //apple_ref/c/defn/arglTexmapModeSet //apple_ref/c/macro/arglTexmapModeSet" --><font class="function">arglTexmapModeSet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <font class="param">mode
</font>);
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>When arglDrawModeSet(AR_DRAW_BY_TEXTURE_MAPPING) has been called, the value of this
setting determines whether full or half-resolution data is transferred to the
texture. Calling this function with a mode value of AR_DRAW_TEXTURE_FULL_IMAGE
uses all available pixels in the source image data. A value of
AR_DRAW_TEXTURE_HALF_IMAGE discards every second row
in the source image data, defining a half-height texture which is then drawn stretched
vertically to double its height.
<br><br>
The latter method is well-suited to drawing interlaced images, as would be obtained
from DV camera sources in interlaced mode or composite video sources.
<br><br>
The initial value is AR_DRAW_TEXTURE_FULL_IMAGE.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.72.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglTexRectangleGet; name=arglTexRectangleGet -->
<a name="//apple_ref/doc/compositePage/c/func/arglTexRectangleGet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglTexRectangleGet">arglTexRectangleGet
</a></h3>
</td></tr></table><hr><dl></dl><p>Enquire as to use of rectangular TexImage2D pixel-transfer in arglDispImage().
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglTexRectangleGet //apple_ref/c/clm/arglTexRectangleGet //apple_ref/c/intfcm/arglTexRectangleGet //apple_ref/c/func/arglTexRectangleGet //apple_ref/c/ftmplt/arglTexRectangleGet //apple_ref/c/defn/arglTexRectangleGet //apple_ref/c/macro/arglTexRectangleGet" --><font class="function">arglTexRectangleGet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>);
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>Enquires as to the current value of the TexRectangle setting. See arglTexRectangleSet()
for more info.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.72.
</dd>
</dl>
<hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglTexRectangleSet; name=arglTexRectangleSet -->
<a name="//apple_ref/doc/compositePage/c/func/arglTexRectangleSet"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglTexRectangleSet">arglTexRectangleSet
</a></h3>
</td></tr></table><hr><dl></dl><p>Determines use of rectangular TexImage2D pixel-transfer in arglDispImage().
</p>
<blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/void //apple_ref/c/cl/void //apple_ref/c/tdef/void //apple_ref/c/tag/void //apple_ref/c/econst/void //apple_ref/c/struct/void //apple_ref/c/clconst/void" --><font class="type">void
</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglTexRectangleSet //apple_ref/c/clm/arglTexRectangleSet //apple_ref/c/intfcm/arglTexRectangleSet //apple_ref/c/func/arglTexRectangleSet //apple_ref/c/ftmplt/arglTexRectangleSet //apple_ref/c/defn/arglTexRectangleSet //apple_ref/c/macro/arglTexRectangleSet" --><font class="function">arglTexRectangleSet
</font><!-- /a -->(
<!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF
</font><!-- /a --> <font class="param">contextSettings
</font>,
<font class="keyword">const
</font> <!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int
</font><!-- /a --> <font class="param">state
</font>);
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>On implementations which support the OpenGL extension for rectangular textures (of
non power-of-two size), and when arglDrawMode is set to AR_DRAW_BY_TEXTURE_MAPPING,
the value of this variable determines whether rectangular textures or ordinary
(power-of-two) textures are used by arglDispImage(). A value of TRUE specifies the
use of rectangluar textures. A value of FALSE specifies the use of ordinary textures.
<br><br>
If the OpenGL driver available at runtime does not support for rectangular textures,
changing the value of this setting to TRUE will result calls to arglDispImage
performing no drawing.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.72.
</dd>
</dl>
<h2>Typedefs
</h2>
<hr><!-- headerDoc=tdef; uid=//apple_ref/doc/compositePage/c/tdef/ARGL_CONTEXT_SETTINGS_REF; name=ARGL_CONTEXT_SETTINGS_REF -->
<a name="//apple_ref/doc/compositePage/c/tdef/ARGL_CONTEXT_SETTINGS_REF"></a>
<table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="ARGL_CONTEXT_SETTINGS_REF">ARGL_CONTEXT_SETTINGS_REF
</a></h3>
</td></tr></table><hr><dl></dl><p>Opaque type to hold ARGL settings for a given OpenGL context.
</p>
<blockquote><pre><font class="keyword">typedef
</font> <font class="keyword">struct
</font> <!-- a logicalPath="//apple_ref/c/cl/_ARGL_CONTEXT_SETTINGS //apple_ref/c/cl/_ARGL_CONTEXT_SETTINGS //apple_ref/c/tdef/_ARGL_CONTEXT_SETTINGS //apple_ref/c/tag/_ARGL_CONTEXT_SETTINGS //apple_ref/c/econst/_ARGL_CONTEXT_SETTINGS //apple_ref/c/struct/_ARGL_CONTEXT_SETTINGS //apple_ref/c/clconst/_ARGL_CONTEXT_SETTINGS" --><font class="type">_ARGL_CONTEXT_SETTINGS
</font><!-- /a --> <font class="type">*
</font><font class="var">ARGL_CONTEXT_SETTINGS_REF
</font>;
</pre></blockquote>
<dl><h5><font face="Lucida Grande,Helvetica,Arial">Discussion
</font></h5><p>An OpenGL context is an implementation-defined structure which
keeps track of OpenGL state, including textures and display lists.
Typically, individual OpenGL windows will have distinct OpenGL
contexts assigned to them by the host operating system.
<br><br>
As gsub_lite uses textures and display lists, it must be able to
track which OpenGL context a given texture or display list it is using
belongs to. This is especially important when gsub_lite is being used to
draw into more than one window (and therefore more than one context.)
<br><br>
Basically, functions which depend on OpenGL state, will require an
ARGL_CONTEXT_SETTINGS_REF to be passed to them. An ARGL_CONTEXT_SETTINGS_REF
is generated by setting the current OpenGL context (e.g. if using GLUT,
you might call glutSetWindow()) and then calling arglSetupForCurrentContext().
When you have finished using ARGL in a given context, you should call
arglCleanup(), passing in an ARGL_CONTEXT_SETTINGS_REF, to free the
memory used by the settings structure.
</p>
<dt><i>Availability
</i></dt><dd>First appeared in ARToolKit 2.68.
</dd>
</dl>
<p><p>© 2003-2006 Philip Lamb
(Last Updated June 23, 2006)
</p></body></html>