Sophie

Sophie

distrib > Mageia > 2 > i586 > media > nonfree-release > by-pkgid > f86555c654b1f4a4c7ccf47789979868 > files > 1183

nvidia-cuda-toolkit-devel-4.2.9-2.mga2.nonfree.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>NVIDIA CUDA Library: cuGraphicsGLRegisterImage</title>
<link href="customdoxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
  <div class="navpath"><a class="el" href="group__CUDA__GL.html">OpenGL Interoperability</a>
  </div>
<table cellspacing="0" cellpadding="0" border="0">
  <tr>
   <td valign="top">
      <div class="navtab">
        <table>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__GL_g923988b9596911c39bb55fd848015a3d.html#g923988b9596911c39bb55fd848015a3d">cuGLCtxCreate</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__GL_g5d423ad540c04558b683661e279e0c58.html#g5d423ad540c04558b683661e279e0c58">CUGLDeviceList</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__GL_g3555fe44ce3d83b78a0ea894979d58c2.html#g3555fe44ce3d83b78a0ea894979d58c2">CUGLDeviceList_enum</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__GL_g98bb15525b04d2f6a817c21e07d8b7cd.html#g98bb15525b04d2f6a817c21e07d8b7cd">cuGLGetDevices</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__GL_gd530f66cc9ab43a31a98527e75f343a0.html#gd530f66cc9ab43a31a98527e75f343a0">cuGraphicsGLRegisterBuffer</a></td></tr>
          <tr><td class="navtab"><a class="qindexHL" href="group__CUDA__GL_g52c3a36c4c92611b6fcf0662b2f74e40.html#g52c3a36c4c92611b6fcf0662b2f74e40">cuGraphicsGLRegisterImage</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__GL_g21ff8296192dc38dff42ba3346078282.html#g21ff8296192dc38dff42ba3346078282">cuWGLGetDevice</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top">
<a class="anchor" name="g52c3a36c4c92611b6fcf0662b2f74e40"></a><!-- doxytag: member="cudaGL.h::cuGraphicsGLRegisterImage" ref="g52c3a36c4c92611b6fcf0662b2f74e40" args="(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CUDA__TYPES_g09da14df1a751dcbfeccb9cf0073d64c.html#g09da14df1a751dcbfeccb9cf0073d64c">CUresult</a> cuGraphicsGLRegisterImage           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__CUDA__TYPES_gc0c4e1704647178d9c5ba3be46517dcd.html#gc0c4e1704647178d9c5ba3be46517dcd">CUgraphicsResource</a> *&nbsp;</td>
          <td class="paramname"> <em>pCudaResource</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GLuint&nbsp;</td>
          <td class="paramname"> <em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GLenum&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>Flags</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Registers the texture or renderbuffer object specified by <code>image</code> for access by CUDA. A handle to the registered object is returned as <code>pCudaResource</code>.<p>
<code>target</code> must match the type of the object, and must be one of GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_3D, GL_TEXTURE_2D_ARRAY, or GL_RENDERBUFFER.<p>
The register flags <code>Flags</code> specify the intended usage, as follows:<p>
<ul>
<li>CU_GRAPHICS_REGISTER_FLAGS_NONE: Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA. This is the default value.</li><li>CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY: Specifies that CUDA will not write to this resource.</li><li>CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource, so none of the data previously stored in the resource will be preserved.</li><li>CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST: Specifies that CUDA will bind this resource to a surface reference.</li><li>CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER: Specifies that CUDA will perform texture gather operations on this resource.</li></ul>
<p>
The following image formats are supported. For brevity's sake, the list is abbreviated. For ex., {GL_R, GL_RG} X {8, 16} would expand to the following 4 formats {GL_R8, GL_R16, GL_RG8, GL_RG16} :<ul>
<li>GL_RED, GL_RG, GL_RGBA, GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, GL_INTENSITY</li><li>{GL_R, GL_RG, GL_RGBA} X {8, 16, 16F, 32F, 8UI, 16UI, 32UI, 8I, 16I, 32I}</li><li>{GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, GL_INTENSITY} X {8, 16, 16F_ARB, 32F_ARB, 8UI_EXT, 16UI_EXT, 32UI_EXT, 8I_EXT, 16I_EXT, 32I_EXT}</li></ul>
<p>
The following image classes are currently disallowed:<ul>
<li>Textures with borders</li><li>Multisampled renderbuffers</li></ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pCudaResource</em>&nbsp;</td><td>- Pointer to the returned object handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>image</em>&nbsp;</td><td>- name of texture or renderbuffer object to be registered </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>- Identifies the type of object specified by <code>image</code> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Flags</em>&nbsp;</td><td>- Register flags</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa0eed720f8a87cd1c5fd1c453bc7a03d">CUDA_SUCCESS</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa0fd2e63260c6317ba943af0f7e4b8d21">CUDA_ERROR_INVALID_HANDLE</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa240bb253a699176d9f49ee2f2c91b61b">CUDA_ERROR_ALREADY_MAPPED</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa484e9af32c1e9893ff21f0e0191a12d">CUDA_ERROR_INVALID_CONTEXT</a>, </dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Note that this function may also return error codes from previous, asynchronous launches.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__CUDA__GL_g923988b9596911c39bb55fd848015a3d.html#g923988b9596911c39bb55fd848015a3d" title="Create a CUDA context for interoperability with OpenGL.">cuGLCtxCreate</a>, <a class="el" href="group__CUDA__GRAPHICS_ga7e5e97b74eaa13dfa6582e853e4c96d.html#ga7e5e97b74eaa13dfa6582e853e4c96d" title="Unregisters a graphics resource for access by CUDA.">cuGraphicsUnregisterResource</a>, <a class="el" href="group__CUDA__GRAPHICS_gffcfd8e78d82cc4f6dd987e8bce4edb0.html#gffcfd8e78d82cc4f6dd987e8bce4edb0" title="Map graphics resources for access by CUDA.">cuGraphicsMapResources</a>, <a class="el" href="group__CUDA__GRAPHICS_g61c55e987e54558cce547240d6123078.html#g61c55e987e54558cce547240d6123078" title="Get an array through which to access a subresource of a mapped graphics resource...">cuGraphicsSubResourceGetMappedArray</a> </dd></dl>

</div>
</div><p>
    </td>
  </tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated by Doxygen for NVIDIA CUDA Library &nbsp;<a
href="http://www.nvidia.com/cuda"><img src="nvidia_logo.jpg" alt="NVIDIA" align="middle" border="0" height="80"></a></small></address>
</body>
</html>