code: public static int cudaGraphicsGLRegisterBuffer(cudaGraphicsResource resource, int buffer, int Flags)
      {
          return checkResult(cudaGraphicsGLRegisterBufferNative(resource, buffer, Flags));
      }
docs: Registers an OpenGL buffer object.
  
  <pre>
  cudaError_t cudaGraphicsGLRegisterBuffer (
  cudaGraphicsResource** resource,
  GLuint buffer,
  unsigned int  flags )
  </pre>
  <div>
  <p>Registers an OpenGL buffer object.
  Registers the buffer object specified by <tt>buffer</tt> for access
  by CUDA. A handle to the registered object is returned as <tt>resource</tt>. The register flags <tt>flags</tt> specify the intended
  usage, as follows:
  </p>
  <ul>
  <li>
  <p>cudaGraphicsRegisterFlagsNone:
  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.
  </p>
  </li>
  <li>
  <p>cudaGraphicsRegisterFlagsReadOnly:
  Specifies that CUDA will not write to this resource.
  </p>
  </li>
  <li>
  <p>cudaGraphicsRegisterFlagsWriteDiscard:
  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.
  </p>
  </li>
  </ul>
  </p>
  <div>
  <span>Note:</span>
  <p>Note that this
  function may also return error codes from previous, asynchronous
  launches.
  </p>
  </div>
  </p>
  </div>
  
  @param resource Pointer to the returned object handle
  @param buffer name of buffer object to be registered
  @param flags Register flags
  
  @return cudaSuccess, cudaErrorInvalidDevice, cudaErrorInvalidValue,
  cudaErrorInvalidResourceHandle, cudaErrorUnknown
  
  @see JCuda#cudaGraphicsUnregisterResource
  @see JCuda#cudaGraphicsMapResources
  @see JCuda#cudaGraphicsResourceGetMappedPointer