![]() ![]() LOGE("GraphicBufferEx HardwareBuffer create error. Int error = AHardwareBuffer_allocate(&buffDesc, &hardwareBuffer) Bind the texture to a fbo, then draw to it.Create EGLImageKHR from EGLClientBuffer.Create EGLClientBuffer from AHardwareBuffer.Is this fine and would it work?Īlso (a dumb question but I cannot get over it) if I attach my EGLImage which is from the Hardwarebuffer to GL_TEXTURE_2D and define the texture using glTexImage2D, would it not store the data of the texture which is a parameter of glTexImage2D into the hardwarebuffer? ![]() I was thinking of using glCopyTexImage2d for doing this. However, I wanted away so that I don't need to rerender it onto hardwarebuffer but instead directly store data of the texture onto hardwarebuffer. To draw the texture (say tex), I'm rendering it onto the AHardwareBuffer using shaders.Generate an FBO and bind it to the texture using glFramebufferTexture2D.Create EGLClientBuffer and EGLImageKHR from it.Generate a texture and bind it to GL_TEXTURE_2D. ![]() I wanted to make use of AHardwareBuffer to store textures so that I can use them on different threads where I don't have an OpenGL context. I came across AHardwareBuffer in Android. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |