5.3.3.3. Image Formats for OpenGL Texture and Renderbuffer Sharing
5.3.3.3. OpenGL纹理和渲染缓冲区共享的图像格式
When the cl_khr_gl_sharing extension is supported, image objects sharing storage with OpenGL texture and renderbuffer objects can be created. The OpenGL Internal Formats and Corresponding OpenCL Internal Formats table describes the supported OpenGL image formats. If an OpenGL texture or renderbuffer object with an internal format from the table is successfully created by OpenGL, then there is guaranteed to be a mapping to one of the corresponding OpenCL image format(s) in the table. Texture and renderbuffer objects created with other OpenGL internal formats may (but are not guaranteed to) have a mapping to an OpenCL image format. If such mappings exist, they are guaranteed to preserve all color components, data types, and at least the number of bits/component actually allocated by OpenGL for that format.
当支持cl_khr_gl_sharing扩展时,可以创建与OpenGL纹理和renderbuffer对象共享存储的图像对象。OpenGL内部格式和相应的OpenCL内部格式表描述了支持的OpenGL图像格式。如果OpenGL成功创建了表中具有内部格式的OpenGL纹理或renderbuffer对象,则可以保证映射到表中相应的OpenCL图像格式之一。使用其他OpenGL内部格式创建的纹理和渲染缓冲区对象可能(但不能保证)具有到OpenCL图像格式的映射。如果存在这样的映射,则保证它们保留所有颜色分量、数据类型,以及至少OpenGL为该格式实际分配的位数/分量。
OpenGL internal format OpenGL内部格式 | OpenCL Image Format (Channel Order, Channel Data Type) OpenCL图像格式(通道顺序、通道数据类型) |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|