egl

How to use GraphicBuffer in android ndk

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am asking this with reference to an answer for my question at How to improve opengl es display performance in android . I was trying to build the code which uses GraphicBuffer with ndk-r9d. but It is saying GraphicBuffer is not declared in this scope. The same comments for eglCreateImageKHR and glEGLImageTargetTexture2DOES. I have added EGL/eglext.h and GLES2/gl2ext.h . I tried to include ui/GraphicBuffer.h but it is not taking it. Is there another header file to be added ? The code given below I have added to avoid use of glTexSubImage2D(

EGLDisplay on GBM

匿名 (未验证) 提交于 2019-12-03 00:48:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to create an OpenGL context through EGL. As I won't actually draw, I want to use Pbuffers in conjunction with the GBM platform. This is the code (C99): #include <stdlib.h> #include <assert.h> #include <fcntl.h> #include <unistd.h> #include <EGL/egl.h> #include <EGL/eglext.h> #include <gbm.h> int main( void ) { assert( eglBindAPI( EGL_OPENGL_API ) == EGL_TRUE ); int fd = open("/dev/dri/card0", O_RDWR); struct gbm_device * gbm = gbm_create_device( fd ); EGLDisplay dpy = eglGetDisplay( gbm ); eglInitialize( dpy , NULL , NULL ); EGLConfig

Android SurfaceFlinger服务(八) ----- 图像的输出

匿名 (未验证) 提交于 2019-12-03 00:43:02
SurfaceFlinger合成后就进行图像的输出的工作。在图像输出时,存在硬件合成器与不存在的情况有些差别。软件合成时用到图像缓冲区生产者与消费者模型。首先来看看图像缓冲区的初始化。 void SurfaceFlinger::init() { ALOGI( "SurfaceFlinger‘s main thread ready to run. " "Initializing graphics H/W..."); ...... // initialize our non-virtual displays for (size_t i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) { DisplayDevice::DisplayType type((DisplayDevice::DisplayType)i); // set-up the displays that are already connected if (mHwc->isConnected(i) || type==DisplayDevice::DISPLAY_PRIMARY) { // All non-virtual displays are currently considered secure. bool isSecure = true;

Android EGL/OpenGL ES Frame Rate Stuttering

杀马特。学长 韩版系。学妹 提交于 2019-12-02 23:08:20
TL;DR Even when doing no drawing at all, it seems impossible to maintain a 60Hz update rate on an OpenGL ES rendering thread on an Android device. Mysterious spikes frequently crop up (demonstrated in the code at bottom), and every effort that I've made to figure out why or how has lead to a dead end. Timing in more complicated examples with a custom rendering thread has consistently shown eglSwapBuffers() to be the culprit, frequently coming in over 17ms-32ms. Help? More Details This is particularly damning because the rendering requirements for our project is screen-aligned elements smoothly

“EGL Error : could not create the EGL surface: error 0x300b” on i.MX6 when running Qt5 application with -platform eglfs

冷暖自知 提交于 2019-12-02 07:23:12
I am trying to run the hellogl_es2 Qt example without X Server by specifying the eglfs platform: ./hellogl_es2 -platform eglfs EGL Error : Could not create the egl surface: error = 0x300b Aborted (core dumped) CPU is Freescale i.MX6. Linux kernel is 3.10.17. Distribution is Ubuntu 14.04.4 LTS (trusty). Qt version is 5.2.1, installed from http://packages.ubuntu.com , armhf architecture, packages qtbase5-dev, qtbase5-examples, qtbase5-examples-dbg. The core dump is: GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3

eglCreateWindowSurface: native_window_api_connect failed

喜夏-厌秋 提交于 2019-12-01 20:26:09
问题 I have a problem that occours only with the latest Samsung Galaxy series when android:hardwareAccelerated is set to false into manifest file As far as i know (tried by myself) it happens on Galaxy S9, J6 and Note 8 but not on Galaxy S8 for example. Other phones seem not affected at all. The problem is that i got a GLSurfaceView that shows nothing (black screen) but if i switch between activities, it start to work again, i guess because it renews the View with no errors. This is the suspect

Opengls eglCreateWindowSurface GL Error EGL_BAD_ALLOC

北城以北 提交于 2019-12-01 00:24:32
问题 I am getting eglCreateWindowSurface GL Error EGL_BAD_ALLOC when open app first time after installing in Samsung Galaxy S6 and same code working fine in other device. I tried to clean memory and destroy texture and deinitialize all opengl object on destroy but that cant help me. 03-30 09:21:32.983 21942-26083/com.example E/TextureSurfaceRenderer: createContext: EGL10.EGL_YES_CONTEXT com.google.android.gles_jni.GLImpl@24406d0 03-30 09:21:32.983 21942-26083/com.example E/libEGL:

Fedora 19 using rpmfussion's NVIDIA driver: libGL error: failed to load driver: swrast

核能气质少年 提交于 2019-11-30 15:47:27
When running an app that uses Qt 4.7 on my Fedora 19 box I am getting the following errors from the application: libGL: screen 0 does not appear to be DRI2 capable libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so libGL: Can't open configuration file /home/Matthew.Hoggan/.drirc: No such file or directory. libGL error: failed to load driver: swrast ERROR: Error failed to create progam. I do not see these errors in a stock X11 application where the context is configured using glx. I am assuming this is because Qt uses egl underneath

createWindowSurface failed: EGL_BAD_MATCH?

偶尔善良 提交于 2019-11-30 14:53:17
问题 the version android is 2.2.1 the device is a samsung galaxy II the full crash log is: java.lang.RuntimeException: createWindowSurface failed: EGL_BAD_MATCH at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1077) at android.opengl.GLSurfaceView$EglHelper.createSurface(GLSurfaceView.java:981) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1304) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116) this is the relevant code to

eglSwapBuffers is erratic/slow

痞子三分冷 提交于 2019-11-30 13:59:07
I have a problem with very low rendering time on an android tablet using the NDK and the egl commands. I have timed calls to eglSwapBuffers and is taking a variable amount of time, frequently exceeded the device frame rate. I know it synchronizes to the refresh, but that is around 60FPS, and the times here drop well below that. The only command I issue between calls to swap is glClear , so I know it isn't anything that I'm drawing causing the problem. Even just by clearing the frame rate drops to 30FPS (erratic though). On the same device a simple GL program in Java easily renders at 60FPS,