You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allows it to run but I then get [error] Failed creating shader of type GL_FRAGMENT_SHADER [error] Trying to link GLSL program, but no shaders created yet
commenting out ofSetWindowShape(width, height);
but i receive another siggbart:
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
I get that it compiled but failed to link - I think there may be more
incompatibilities as the noise.frag and noise.vert from the shaderExamples
compile and link
@jvcleave this not works for me on the PandaboardES look at my console ,running gdb:
walter@walter-desktop:~/OF-develop-raspberrypi/openFrameworks/examples/gles/alphaMaskingShaderExampleGLES2/bin$ gdb ./alphaMaskingShaderExampleGLES2.app
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see: http://bugs.launchpad.net/gdb-linaro/...
Reading symbols from /home/walter/OF-develop-raspberrypi/openFrameworks/examples/gles/alphaMaskingShaderExampleGLES2/bin/alphaMaskingShaderExampleGLES2.app...done.
(gdb) r
Starting program: /home/walter/OF-develop-raspberrypi/openFrameworks/examples/gles/alphaMaskingShaderExampleGLES2/bin/alphaMaskingShaderExampleGLES2.app
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[ofAppEGLWindow::setupEGL:notice] setting EGL Display
PVR:(Warning): LoadWSModule: Window system module libpvrws_KMS.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_WAYLAND.so did not validate native display [98, /generic_ws.c]
[ofAppEGLWindow::setupEGL:notice] EGL Display correctly set.
PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
[ofAppEGLWindow::setupEGL:notice] ofGetCurrentRenderer()->getType()=GLES2
[ofAppEGLWindow::setupEGL:notice] GLES2 Renderer detected.
[ofAppEGLWindow::setupEGL:notice] OpenGL ES version
[notice] GLES2 loading vertex shader from default source
[notice] GLES2 loading fragment shader from default source
[ofAppEGLWindow::setupEGL:notice] -----EGL-----
[ofAppEGLWindow::setupEGL:notice] EGL_VERSION_MAJOR = 1
[ofAppEGLWindow::setupEGL:notice] EGL_VERSION_MINOR = 4
[ofAppEGLWindow::setupEGL:notice] EGL_CLIENT_APIS = OpenGL_ES
[ofAppEGLWindow::setupEGL:notice] EGL_VENDOR = Imagination Technologies
[ofAppEGLWindow::setupEGL:notice] EGL_VERSION = 1.4 build 1.9@2166536
[ofAppEGLWindow::setupEGL:notice] EGL_EXTENSIONS = EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_KHR_fence_sync EGL_IMG_hibernate_process EGL_WL_bind_wayland_display EGL_KHR_surfaceless_gles2 EGL_NV_post_sub_buffer
[ofAppEGLWindow::setupEGL:notice] GL_RENDERER =
[ofAppEGLWindow::setupEGL:notice] GL_VERSION =
[ofAppEGLWindow::setupEGL:notice] GL_VENDOR =
[ofAppEGLWindow::setupEGL:notice] -------------
[ofAppEGLWindow::setupOpenGL:notice] CREATED SCREEN WITH SIZE 1280 x 720
[ofAppEGLWindow:error] Peripherals not supported on X11
[ofFbo:verbose] FBO supported
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Program received signal SIGABRT, Aborted.
__libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
47 ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: No such file or directory.
(gdb)
not sure to have understood the output from gdb, but
at least now with your GLES2 example the fbo is working partially , with the AlphaMaskingShaderExample i crash suddenly. Maybe it is a limitation on the size of the fbo?
Commenting out all the lines about shader even so i got a seg fault . i think that issue in PandaboardES reside in the fbo. More investigation is needed.
i did this:
/*
// create an EGL rendering eglContext
EGLint attribute_list_surface_context[] = {
EGL_CONTEXT_CLIENT_VERSION, glesVersionForContext,
EGL_NONE
};
*/
// create an EGL rendering eglContext
EGLint attribute_list_surface_context[] = {
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
and gave me the some error
./alphaMaskingShaderExample_debug.app
[ofAppEGLWindow::createSurface:notice] Setting up EGL Display
PVR:(Warning): LoadWSModule: Window system module libpvrws_KMS.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_WAYLAND.so did not validate native display [98, /generic_ws.c]
[ofAppEGLWindow::createSurface:notice] EGL Display correctly set.
PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
[ofAppEGLWindow::createSurface:notice] ofGetCurrentRenderer()->getType()=GLES2
[ofAppEGLWindow::createSurface:notice] GLES2 Renderer detected.
[ofAppEGLWindow::createSurface:error] Error creating context. EGL_BAD_CONFIG (Invald frame buffer configuration specified)
[ofAppEGLWindow::setupPeripherals:notice] Peripherals not supported on X11
[ofAppEGLWindow::setupOpenGL:notice] Peripheral setup complete.
[ofAppEGLWindow::runAppViaInfiniteLoop:notice] Entering infinite loop.
[ofFbo:verbose] FBO supported
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
[ofAppRunner:verbose] sighandler : Signal handled 6
[verbose] OF app is being terminated!
[ofAppEGLWindow::destroySurface:error] Attempted to destroy uninitialized window.
walter@walter-desktop:~/OF-develop-raspberrypi/openFrameworks/examples/gl/alphaMaskingShaderExample/bin$
think that the problem is that eglConfig or attribute_list_surface_context are not set properly
@bakercp i m looking here now at line 539 of ofAppEGLWindow.cpp:
result = eglChooseConfig(eglDisplay,
attribute_list_framebuffer_config,
&eglConfig,
1, // we only want the first one. if we want more,
// we need to pass in an array.
// we are optimistic and don't give it more chances
// to find a good configuration
&num_configs);
// these are usually set as default, but set them here just to be sure
frameBufferAttributes[EGL_RED_SIZE] = 5; // 8 bits for red
frameBufferAttributes[EGL_GREEN_SIZE] = 6; // 8 bits for green
frameBufferAttributes[EGL_BLUE_SIZE] = 5; // 8 bits for blue
frameBufferAttributes[EGL_ALPHA_SIZE] = 0; // 8 bits for alpha
//frameBufferAttributes[EGL_LUMINANCE_SIZE] = EGL_DONT_CARE; // 8 bits for alpha
//frameBufferAttributes[EGL_DEPTH_SIZE] = 24; // 24 bits for depth
//frameBufferAttributes[EGL_STENCIL_SIZE] = 8; // 8 bits for stencil
//frameBufferAttributes[EGL_SAMPLES] = 1;
and
result = eglChooseConfig(eglDisplay,
attribute_list_framebuffer_config,
&eglConfig,
settings.frameBufferAttributes.size(),
&num_configs);
but gave me the same error:
(gdb) run
Starting program: /home/walter/OF-develop-raspberrypi/openFrameworks/examples/gl/alphaMaskingShaderExample/bin/alphaMaskingShaderExample_debug.app
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[ofAppEGLWindow::createSurface:notice] Setting up EGL Display
PVR:(Warning): LoadWSModule: Window system module libpvrws_KMS.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_WAYLAND.so did not validate native display [98, /generic_ws.c]
[ofAppEGLWindow::createSurface:notice] EGL Display correctly set.
PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
[ofAppEGLWindow::createSurface:notice] ofGetCurrentRenderer()->getType()=GLES2
[ofAppEGLWindow::createSurface:notice] GLES2 Renderer detected.
[ofAppEGLWindow::createSurface:error] Error creating context. EGL_BAD_CONFIG (Invald frame buffer configuration specified)
[ofAppEGLWindow::setupPeripherals:notice] Peripherals not supported on X11
[ofAppEGLWindow::setupOpenGL:notice] Peripheral setup complete.
[ofAppEGLWindow::runAppViaInfiniteLoop:notice] Entering infinite loop.
[ofFbo:verbose] FBO supported
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Program received signal SIGABRT, Aborted.
__libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
47 ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: No such file or directory.
(gdb) bt
#0 __libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47 #1 0xb6b09e92 in __GI_raise (sig=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:67 #2 0xb6b0c26c in __GI_abort () at abort.c:91 #3 0xb6cc65f4 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 #4 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 #5 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
&eglConfig is a pointer to a single EGLConfig single (i.e. the same a pointer to the first element of an array of length 1). config_size is us telling eglChooseConfig that our array is only length 1. When we tell eglChooseConfig that our configs array is of length 1, we are essentially telling it that we want a maximum of one configuration to be generated given our attrib_list. It is possible to receive more than one -- configuration that we can query and choose from. The EGLConfig arrays (if you request more than one) are sorted based on a set criteria (described here http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglChooseConfig.html). But, but asking for 1 back, we are asking for its best guess. If it doesn't return at least one, then we know that it won't return others that might be "better."
If you use
result = eglChooseConfig(eglDisplay,
attribute_list_framebuffer_config,
&eglConfig,
settings.frameBufferAttributes.size(),
&num_configs);
that won't work.
settings.frameBufferAttributes.size() is the length of the frameBufferAttributes map, which is not relevant. The only place that size is used in to construct the attribute_list_framebuffer_config array. The attribute_list_framebuffer_config consists of keys / values and is terminated by EGL_NONE.
@bakercp I realized that did not make sense what I did. It was just a desperate attempt. However, it is now more clear. I will make another attempt tomorrow. Thanks for your cooperation and help!
No worries @kalwalt! I know the feeling. I'm looking forward to getting this working. It will soon ... ! We need to get some other pandaboarders to try it out and see what they can make of it.
(gdb) run
Starting program: /home/walter/OF-develop-raspberrypi/openFrameworks/examples/gl/alphaMaskingShaderExample/bin/alphaMaskingShaderExample_debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[ofAppEGLWindow::createSurface:notice] Setting up EGL Display
PVR:(Warning): LoadWSModule: Window system module libpvrws_KMS.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_WAYLAND.so did not validate native display [98, /generic_ws.c]
[ofAppEGLWindow::createSurface:notice] EGL Display correctly set.
PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
[ofAppEGLWindow::createSurface:notice] ofGetCurrentRenderer()->getType()=GLES2
[ofAppEGLWindow::createSurface:notice] GLES2 Renderer detected.
[ofAppEGLWindow::createSurface:notice] Surface created correctly
[ofAppEGLWindow::createSurface:notice] API Binded correctly
[ofAppEGLWindow::createSurface:notice] OpenGL ES version
[notice] GLES2 loading vertex shader from default source
[notice] GLES2 loading fragment shader from default source
[ofAppEGLWindow::createSurface:notice] -----EGL-----
[ofAppEGLWindow::createSurface:notice] EGL_VERSION_MAJOR = 1
[ofAppEGLWindow::createSurface:notice] EGL_VERSION_MINOR = 4
[ofAppEGLWindow::createSurface:notice] EGL_CLIENT_APIS = OpenGL_ES
[ofAppEGLWindow::createSurface:notice] EGL_VENDOR = Imagination Technologies
[ofAppEGLWindow::createSurface:notice] EGL_VERSION = 1.4 build 1.9@2166536
[ofAppEGLWindow::createSurface:notice] EGL_EXTENSIONS = EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_KHR_fence_sync EGL_IMG_hibernate_process EGL_WL_bind_wayland_display EGL_KHR_surfaceless_gles2 EGL_NV_post_sub_buffer
[ofAppEGLWindow::createSurface:notice] GL_RENDERER =
[ofAppEGLWindow::createSurface:notice] GL_VERSION =
[ofAppEGLWindow::createSurface:notice] GL_VENDOR =
[ofAppEGLWindow::createSurface:notice] -------------
[ofAppEGLWindow::setupPeripherals:notice] Peripherals not supported on X11
[ofAppEGLWindow::setupOpenGL:notice] Peripheral setup complete.
[ofAppEGLWindow::runAppViaInfiniteLoop:notice] Entering infinite loop.
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Program received signal SIGABRT, Aborted.
__libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
47 ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: No such file or directory.
(gdb) bt
#0 __libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47 #1 0xb6b09e92 in __GI_raise (sig=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:67 #2 0xb6b0c26c in __GI_abort () at abort.c:91 #3 0xb6cc65f4 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 #4 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 #5 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
i think there is a significant progress but something went wrong after , see these lines
Activity
kalwalt commentedon Dec 22, 2012
@bakercp i have the same issue also with PandaboardES
jvcleave commentedon Dec 22, 2012
I get this:
Program received signal SIGSEGV, Segmentation fault. 0x000879f8 in ofRectangle::ofRectangle(float, float, float, float) ()jvcleave commentedon Dec 22, 2012
commenting out this line
https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/examples/gl/alphaMaskingShaderExample/src/testApp.cpp#L17
allows it to run but I then get
[error] Failed creating shader of type GL_FRAGMENT_SHADER [error] Trying to link GLSL program, but no shaders created yetkalwalt commentedon Dec 22, 2012
@jvcleave good to know! maybe GLES doesn't support GL_ARB_texture_rectangle?
kalwalt commentedon Dec 22, 2012
commenting out ofSetWindowShape(width, height);
but i receive another siggbart:
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
jvcleave commentedon Dec 22, 2012
my guess is that the shader isn't GLES compatible - not sure if that would cause a crash though (doesn't on the pi)
kalwalt commentedon Dec 22, 2012
converting the shader to non rectangular tex give me the same seg fault. This happen on PandaboardES.
jvcleave commentedon Dec 22, 2012
@kalwalt can you post your conversion? I started to do it but I am GLSL incompatible :)
kalwalt commentedon Dec 22, 2012
yes of course, here it is:
string shaderProgram = " \n
uniform sampler2D tex0;
uniform sampler2D maskTex;
void main (void){
vec2 pos = gl_TexCoord[0].st;
vec3 src = texture2D(tex0, pos).rgb;
float mask = texture2D(maskTex, pos).r;
gl_FragColor = vec4( src , mask);
}";
if the shader will compile than the app won't works but at least we know that the problem reside in the shader.
@jvcleave let me know if in raspberrypi works
jvcleave commentedon Dec 23, 2012
I get that it compiled but failed to link - I think there may be more
incompatibilities as the noise.frag and noise.vert from the shaderExamples
compile and link
jvcleave commentedon Dec 23, 2012
@kalwalt can you try this one - it is working on the RPI for me
http://www.jvcref.com/files/PI/tests/alphaMaskingShaderExampleGLES2.zip
kalwalt commentedon Dec 23, 2012
@jvcleave i will try it!
kalwalt commentedon Dec 23, 2012
@jvcleave this not works for me on the PandaboardES look at my console ,running gdb:
walter@walter-desktop:~/OF-develop-raspberrypi/openFrameworks/examples/gles/alphaMaskingShaderExampleGLES2/bin$ gdb ./alphaMaskingShaderExampleGLES2.app
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/...
Reading symbols from /home/walter/OF-develop-raspberrypi/openFrameworks/examples/gles/alphaMaskingShaderExampleGLES2/bin/alphaMaskingShaderExampleGLES2.app...done.
(gdb) r
Starting program: /home/walter/OF-develop-raspberrypi/openFrameworks/examples/gles/alphaMaskingShaderExampleGLES2/bin/alphaMaskingShaderExampleGLES2.app
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[ofAppEGLWindow::setupEGL:notice] setting EGL Display
PVR:(Warning): LoadWSModule: Window system module libpvrws_KMS.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_WAYLAND.so did not validate native display [98, /generic_ws.c]
[ofAppEGLWindow::setupEGL:notice] EGL Display correctly set.
PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
[ofAppEGLWindow::setupEGL:notice] ofGetCurrentRenderer()->getType()=GLES2
[ofAppEGLWindow::setupEGL:notice] GLES2 Renderer detected.
[ofAppEGLWindow::setupEGL:notice] OpenGL ES version
[notice] GLES2 loading vertex shader from default source
[notice] GLES2 loading fragment shader from default source
[ofAppEGLWindow::setupEGL:notice] -----EGL-----
[ofAppEGLWindow::setupEGL:notice] EGL_VERSION_MAJOR = 1
[ofAppEGLWindow::setupEGL:notice] EGL_VERSION_MINOR = 4
[ofAppEGLWindow::setupEGL:notice] EGL_CLIENT_APIS = OpenGL_ES
[ofAppEGLWindow::setupEGL:notice] EGL_VENDOR = Imagination Technologies
[ofAppEGLWindow::setupEGL:notice] EGL_VERSION = 1.4 build 1.9@2166536
[ofAppEGLWindow::setupEGL:notice] EGL_EXTENSIONS = EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_KHR_fence_sync EGL_IMG_hibernate_process EGL_WL_bind_wayland_display EGL_KHR_surfaceless_gles2 EGL_NV_post_sub_buffer
[ofAppEGLWindow::setupEGL:notice] GL_RENDERER =
[ofAppEGLWindow::setupEGL:notice] GL_VERSION =
[ofAppEGLWindow::setupEGL:notice] GL_VENDOR =
[ofAppEGLWindow::setupEGL:notice] -------------
[ofAppEGLWindow::setupOpenGL:notice] CREATED SCREEN WITH SIZE 1280 x 720
[ofAppEGLWindow:error] Peripherals not supported on X11
[ofFbo:verbose] FBO supported
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Program received signal SIGABRT, Aborted.
__libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
47 ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: No such file or directory.
(gdb)
not sure to have understood the output from gdb, but
at least now with your GLES2 example the fbo is working partially , with the AlphaMaskingShaderExample i crash suddenly. Maybe it is a limitation on the size of the fbo?
kalwalt commentedon Dec 23, 2012
Commenting out all the lines about shader even so i got a seg fault . i think that issue in PandaboardES reside in the fbo. More investigation is needed.
kalwalt commentedon Dec 23, 2012
now i'm sure the problem is in allocating the fbo.:
create an app with only a ofFbo
fbo.allocate(400,400,GL_RGB);
it crash allocating it.
39 remaining items
kalwalt commentedon Jan 2, 2013
i did this:
/*
// create an EGL rendering eglContext
EGLint attribute_list_surface_context[] = {
EGL_CONTEXT_CLIENT_VERSION, glesVersionForContext,
EGL_NONE
};
*/
// create an EGL rendering eglContext
EGLint attribute_list_surface_context[] = {
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
and gave me the some error
think that the problem is that eglConfig or attribute_list_surface_context are not set properly
kalwalt commentedon Jan 2, 2013
@bakercp i m looking here now at line 539 of ofAppEGLWindow.cpp:
according to http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglChooseConfig.html
why config_size is set to one ? This means that we have only one config or should be instead the size of the array?
kalwalt commentedon Jan 2, 2013
look at here: http://code.google.com/p/test-es/source/browse/app_simple.cpp?spec=svnbeead39e31022f2d70a13a5022ebf760a7f1c300&r=beead39e31022f2d70a13a5022ebf760a7f1c300#773
kalwalt commentedon Jan 2, 2013
i did the last test framebuffer set to:
and
result = eglChooseConfig(eglDisplay,
attribute_list_framebuffer_config,
&eglConfig,
settings.frameBufferAttributes.size(),
&num_configs);
but gave me the same error:
(gdb) run
Starting program: /home/walter/OF-develop-raspberrypi/openFrameworks/examples/gl/alphaMaskingShaderExample/bin/alphaMaskingShaderExample_debug.app
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[ofAppEGLWindow::createSurface:notice] Setting up EGL Display
PVR:(Warning): LoadWSModule: Window system module libpvrws_KMS.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_WAYLAND.so did not validate native display [98, /generic_ws.c]
[ofAppEGLWindow::createSurface:notice] EGL Display correctly set.
PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
[ofAppEGLWindow::createSurface:notice] ofGetCurrentRenderer()->getType()=GLES2
[ofAppEGLWindow::createSurface:notice] GLES2 Renderer detected.
[ofAppEGLWindow::createSurface:error] Error creating context. EGL_BAD_CONFIG (Invald frame buffer configuration specified)
[ofAppEGLWindow::setupPeripherals:notice] Peripherals not supported on X11
[ofAppEGLWindow::setupOpenGL:notice] Peripheral setup complete.
[ofAppEGLWindow::runAppViaInfiniteLoop:notice] Entering infinite loop.
[ofFbo:verbose] FBO supported
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Program received signal SIGABRT, Aborted.
__libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
47 ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: No such file or directory.
(gdb) bt
#0 __libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
#1 0xb6b09e92 in __GI_raise (sig=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:67
#2 0xb6b0c26c in __GI_abort () at abort.c:91
#3 0xb6cc65f4 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#4 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#5 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
i think that for today is enough...
bakercp commentedon Jan 2, 2013
&eglConfigis a pointer to a singleEGLConfigsingle (i.e. the same a pointer to the first element of an array of length 1).config_sizeis us tellingeglChooseConfigthat our array is only length 1. When we telleglChooseConfigthat our configs array is of length 1, we are essentially telling it that we want a maximum of one configuration to be generated given ourattrib_list. It is possible to receive more than one -- configuration that we can query and choose from. The EGLConfig arrays (if you request more than one) are sorted based on a set criteria (described here http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglChooseConfig.html). But, but asking for 1 back, we are asking for its best guess. If it doesn't return at least one, then we know that it won't return others that might be "better."If you use
that won't work.
settings.frameBufferAttributes.size()is the length of the frameBufferAttributes map, which is not relevant. The only place that size is used in to construct theattribute_list_framebuffer_configarray. Theattribute_list_framebuffer_configconsists of keys / values and is terminated byEGL_NONE.kalwalt commentedon Jan 2, 2013
@bakercp I realized that did not make sense what I did. It was just a desperate attempt. However, it is now more clear. I will make another attempt tomorrow. Thanks for your cooperation and help!
bakercp commentedon Jan 2, 2013
No worries @kalwalt! I know the feeling. I'm looking forward to getting this working. It will soon ... ! We need to get some other pandaboarders to try it out and see what they can make of it.
kalwalt commentedon Jan 2, 2013
totally agree with you! we need to make new proselityes...
arturoc commentedon Jan 3, 2013
it's fixed now, the framebuffer settings where missing the gles version
kalwalt commentedon Jan 3, 2013
Hi @arturoc i tested you latest f61f6d3 but get SIGBART
Program received signal SIGABRT, Aborted.
__libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
47 ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: No such file or directory.
(gdb) bt
#0 __libc_do_syscall ()
at ../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:47
#1 0xb6b09e92 in __GI_raise (sig=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:67
#2 0xb6b0c26c in __GI_abort () at abort.c:91
#3 0xb6cc65f4 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#4 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#5 0xb6cc5234 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
i think there is a significant progress but something went wrong after , see these lines
are empty instead we should have some info.
Did you tested on this example or on something else?
Thank you.
arturoc commentedon Jan 3, 2013
you need to change the order of the libraries in libs/openframeworksCompiled/project/linuxarmv7 from:
PLATFORM_PKG_CONFIG_LIBRARIES += glesv1_cm
PLATFORM_PKG_CONFIG_LIBRARIES += glesv2
to
PLATFORM_PKG_CONFIG_LIBRARIES += glesv2
PLATFORM_PKG_CONFIG_LIBRARIES += glesv1_cm
that should solve the problem. this is not ideal, we can add a variable in config.make that allows to swtich this from the project config
kalwalt commentedon Jan 3, 2013
ok i will try it!
kalwalt commentedon Jan 3, 2013
@arturoc this works perfecty!!
WOW!
we can definitely close this issue!
FreeImage.h Patch for iOS / OSX