CLGETGLOBJECTINFO(3clc)
π CLGETGLOBJECTINFO π
okay bestie, pull up a chair, because we're talking about the OpenCL Manual's very own clGetGLObjectInfo from the 3clc section. this is the lil function that lets you peek at the OpenGL memory object that got used to make an OpenCL memory object. no cap, it's giving detective energy πβ¨
β¨ NAME β¨
clGetGLObjectInfo β Query an OpenGL memory object used to create an OpenCL memory object.
πΈ SYNOPSIS πΈ
cl_int clGetGLObjectInfo(cl_mem memobj,
cl_gl_object_type *gl_object_type,
GLuint *gl_object_name);
π PARAMETERS π
gl_object_typeβ this one returns the type of GL object attached tomemobj, and it can be any of these icons:CL_GL_OBJECT_BUFFER,CL_GL_OBJECT_TEXTURE2D,CL_GL_OBJECT_TEXTURE3D,CL_GL_OBJECT_TEXTURE2D_ARRAY,CL_GL_OBJECT_TEXTURE1D,CL_GL_OBJECT_TEXTURE1D_ARRAY,CL_GL_OBJECT_TEXTURE_BUFFER, orCL_GL_OBJECT_RENDERBUFFER. and ifgl_object_typeisNULL? literally ignored. she said not today πgl_object_nameβ this one returns the GL object name that was used to creatememobj. and ifgl_object_nameisNULL, it is ignored too. equality, we love to see it π«Ά
π¦ DESCRIPTION π¦
so basically, the OpenGL object that was used to create the OpenCL memory object β plus info about the object type, like whether it's a texture, a renderbuffer, or a buffer object β can all be queried using this function. it's the group chat where GL and CL finally talk to each other, and honestly? iconic. π
π ERRORS π
returns CL_SUCCESS if the call was executed successfully. otherwise, it returns one of the following errors, and yes we're reading them all, don't scroll past:
CL_INVALID_MEM_OBJECTifmemobjis not a valid OpenCL memory object.CL_INVALID_GL_OBJECTif there is no GL object associated withmemobj.CL_OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.CL_OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
π SPECIFICATION π
OpenCL Specification[1]
π SEE ALSO π
π 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 π
- OpenCL Specification page 54, section 9.7.5 - Querying GL object information from a CL...
and that's the whole page, bestie!! π this cutie came to you courtesy of The Khronos Group, dated 01/14/2021, and it lives under CLGETGLOBJECTINFO(3clc). mwah, go query some GL objects responsibly πβ¨π¦
π¦ where this page comes from
- ubuntu jammy: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- ubuntu noble: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms