cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sajis997
Adept I

Fill OpenGL texture with pixel value before using it with OpenGL

Hi Forum,

Is it mandatory to fill the empty OpenGL Texture with dummy pixel values before it could be used in OpenCL ?

Some thoughts is very appreciated.

Thanks

0 Likes
1 Reply
prao
Staff

Hi,

I am not much of an OpenGL guy, but are you seeing any issues in using without filling the texture? The Khronos specs does not mention anything specific about requiring to initialize the texture object clCreateFromGLTexture.

These are the requirements though:

texture

    The name of a GL 1D, 2D, 3D, 1D array, 2D array, cubemap, rectangle or buffer texture object. The texture object must be a complete texture as per OpenGL rules on texture completeness. The texture format and dimensions defined by OpenGL for the specified miplevel of the texture will be used to create the OpenCL image memory object. Only GL texture objects with an internal format that maps to appropriate image channel order and data type specified in tables 5.5 and 5.6 may be used to create the OpenCL image memory object.

Regards

Pradeep

0 Likes