opengl es - How to use GraphicBuffer in android ndk -
I'm asking it in the context of the answer to my question I was trying to create code which uses graphic buffer Used with NDK-R9D but it is saying that GraphicBuffer has not been declared in this area. The same comment for EglCreateImageKHR and glEGLImageTargetTexture2DOES.
I've added EGL / eglext.h and GLES2 / gl2ext.h. I tried to include UI / GraphicBuffer.h but it is not taking it. Can any additional header file be added?
I added the code below to avoid using glTexSubImage2D ().
graphic buffer * pGraphicBuffer = new GraphicBuffer (frame_width, frame_height, PIXEL_FORMAT_RGB_565, graphic buffer :: USAGE_SW_WRITE_OFTEN | Graphic Buffer :: USAGE_HW_TEXTURE); // Lock buffer to get a pointer unsigned character * pBitmap = NULL; PGraphicBuffer- & gt; Lock (graphic buffer :: USAGE_SW_WRITE_OFTEN, (zero **) and peatmap); // Write a 2D image in the PDMAP MMPP (PBitMap, Frame_Bufer, frame_width * frames_height * 3); // OpenGL ES to unlock it using pGraphicBuffer- & gt; Unlock (); EGL Client Buffer ClientBufferEdder = PGfickBufer- & gt; GetNativeBuffer (); EGLint SurfaceType = EGL_NATIVE_BUFFER_ANDROID; // Native Client buffer EGLDisplay eglDisplayHandle = eGL_DEFAULT_DISPLAY; create an EGL image at the same address; // Create an EGL image with these attributes EGLint eglImageAttributes [] = {EGL_WIDTH, frame_width, EGL_heit, frames_highth, EGL_MATHH_FORMAT_KHR, EGL_FORMAT_RGB_565_KHR, EGL_IMUNRENEEPRSARRHH, EGL_TRU, EGL_NON); EaglemezKHR Eiglimhandle = Eaglectate ImageHR (EagleDisplayHandle, EGLNNNNNNNTN, Surfty Type, Client Buffer Edition, Eagle ImagesAitivets); // Create a texture and GL_TEXTURE_2D / * EGLint TextureHandle; Glencutters (1, End Texturehand); Globbdenctation (GL_EditEd.D., TexturHandle); * / // EGL Image Attach with the same texture glEGLImageTargetTexture2DOES (GL_TEXTURE_2D, eglImageHandle); What can I do to run it ...
thanks in advance ..
I am still working on this issue these days.
Many blogs have said that a copy of the Android source code is your project. I believe that the runtime is more elegant to get the ceremony from libui.so , which is an "alternative approach" outlined by Alexeus Stojilzhkovich. I have written a simple library to do this. this is.
Comments
Post a Comment