---
name: "clGetGLTextureInfo"
section: "3clc"
platform: "linux"
package: "opencl-1.2-man-doc"
version: "1.0~svn33624-5.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/clGetGLTextureInfo"
---

# clGetGLTextureInfo(3clc)

Returns additional information about the GL texture object associated with a memory object.

## NAME

clGetGLTextureInfo - Returns additional information about the GL texture object associated with a memory object.

##

**cl\_int clGetGLTextureInfo(cl\_mem** *memobj***, cl\_gl\_texture\_info** *param\_name***, size\_t** *param\_value\_size***, void \****param\_value***, size\_t \****param\_value\_size\_ret***);**

## PARAMETERS

 *param\_name*

Specifies what additional information about the GL texture object associated with *memobj* to query. The list of supported *param\_name* types and the information returned in *param\_value* by **clGetGLTextureInfo** is described in the table below.

 *param\_value*

A pointer to memory where the result being queried is returned. If *param\_value* is NULL, it is ignored.

  *param\_value\_size*

Specifies the size in bytes of memory pointed to by *param\_value*. This size must be ≥ size of return type as described in the table below.

 *param\_value\_size\_ret*

Returns the actual size in bytes of data copied to *param\_value*. If *param\_value\_size\_ret* is NULL, it is ignored.

| | | |
| --- | --- | --- |
| **cl\_gl\_texture\_info** | **Return Type** | **Information returned in *param\_value*** |
| **CL\_GL\_TEXTURE\_TARGET** | GLenum | The *texture\_target* argument specified in [**clCreateFromGLTexture**(3clc)](/clCreateFromGLTexture/3clc.md). |
| **CL\_GL\_MIPMAP\_LEVEL** | GLint | The *miplevel* argument specified in [**clCreateFromGLTexture**(3clc)](/clCreateFromGLTexture/3clc.md). |

## ERRORS

Returns CL\_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

• CL\_INVALID\_MEM\_OBJECT if *memobj* is not a valid OpenCL memory object

• CL\_INVALID\_GL\_OBJECT if there is no GL texture object associated with *memobj*.

• CL\_INVALID\_VALUE if *param\_name* is not valid, or if size in bytes specified by *param\_value\_size* is \< size of return type as described in the table above and *param\_value* is not NULL, or if *param\_value* and *param\_value\_size\_ret* are NULL.

• CL\_OUT\_OF\_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.

• CL\_OUT\_OF\_HOST\_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.

## SPECIFICATION

**OpenCL Specification**\[1\]

## SEE ALSO

[**cl\_khr\_gl\_sharing**(3clc)](/cl_khr_gl_sharing/3clc.md), [**clGetGLObjectInfo**(3clc)](/clGetGLObjectInfo/3clc.md), [**clCreateFromGLTexture**(3clc)](/clCreateFromGLTexture/3clc.md), [**clCreateFromGLTexture**(3clc)](/clCreateFromGLTexture/3clc.md)

## AUTHORS

**The Khronos Group**

## COPYRIGHT

Copyright © 2007-2011 The Khronos Group Inc.\
 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.

## NOTES

- 1\.

  OpenCL Specification

  page 55, section 9.7.5 - Querying GL object information from a CL...
