I spend 1 month trying to anderstand how a could use Image texture in my OpenCL C++ progran.
i use kirin 970 whut ARM G72 on huawei honor play phonne from paris.
I am working with JAVA openGL ES 3.2 and i used JNI call to process data using OpenCL in C++ and Multithread work on CPU .
When i trie to get the current context from C++ using
eglGetCurrentContext() i got no context or display in return.
the problem is that i need both to use :
CL_GL_CONTEXT_KHR, (cl_context_properties)context, CL_EGL_DISPLAY_KHR, (cl_context_properties)display,
I found that the
SurfaceTexture class can acces to the Context to create
EGLImageKHR which can be used with openCL.
Is there a way to share Image texture or data between JAVA OpenGL ES and C++.
And if it is possible. How ti implement it. I would like to retreive texture from FrameBuffer and then acces it by OpenCL.
In fact the pupose is to do somme work in OpenCL then display it and procees it by shader then send it back to OpenCL an bach again to Java OpenGL. I know i coul use Compute shader but i really need to do some work in multithread C++ and openCL (it is a lot lot faster) for real time.
Thank for the answer and may be another idea to get it work.