Qt "affine" demo w/ OpenGL: Unable to create EGL context: "Bad alloc (0x3003)"

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Qt "affine" demo w/ OpenGL: Unable to create EGL context: "Bad alloc (0x3003)"

3,995 次查看
sidebranch
Contributor II

Hello,

I built Qt for i.MX53, and run the Qt "affine" demo, which is the spinning vector Tux penguin.

Then I press the "Use OpenGL" button using the mouse.

However, it fails:

sh-4.2# /usr/bin/qtopia/demos/affine/affine -qws  
QEglContext::createContext(): Unable to create EGL context: "Bad alloc (0x3003)"
QGLContext::makeCurrent(): Cannot make invalid context current
QGLContext::makeCurrent(): Cannot make invalid context current
QGLShader: could not create shader
Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile
QGLShader: could not create shader
Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile
QGLShaderProgram: could not create shader program
Errors linking simple shader: ""
QGLShader: could not create shader
Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile
QGLShader: could not create shader
Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile
QGLShaderProgram: could not create shader program
Errors linking blit shader: ""
QGLContext::makeCurrent(): Cannot make invalid context current
QGLShader: could not create shader
Warning: "" failed to compile!
QGLContext::makeCurrent(): Cannot make invalid context current
QGLContext::makeCurrent(): Cannot make invalid context current
QGLContext::makeCurrent(): Cannot make invalid context current
QGLContext::makeCurrent(): Cannot make invalid context current

I am fresh to OpenGLES on iMX, can someone spot where this might be caused?

Regards,

Leon.

标记 (2)
0 项奖励
回复
6 回复数

1,959 次查看
BenBeckwith
Contributor I

I did an "strace" of the "affine" app and this is the first error i encounter after clicking the "use OpenGL" button:

----

read(7, 0x60184, 4096)                  = -1 EAGAIN (Resource temporarilyunavailable)
ioctl(25168379, FBIOGET_FSCREENINFO, 0x8de28) = -1 EBADF (Bad file descriptor)
write(2, "QEglContext::createSurface(): Un"..., 75QEglContext::createSurface(): Unable to create EGL surface, error = 0x3003) = 75

----

Not sure if this helps.  Does anyone know what FBIOGET_FSCREENINFO is?

Thanks,

Ben

0 项奖励
回复

1,959 次查看
BenBeckwith
Contributor I

I'm having the same issue that Leon is describing.  Has there been any resolution to this?

Thanks,

Ben

0 项奖励
回复

1,959 次查看
micken
Contributor I

The simplegl plugin shouldn't be used as a general purpose plugin and afaik can't be used together with non GL widgets.

0 项奖励
回复

1,959 次查看
sidebranch
Contributor II

...which is not working:

|     -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
|                          linked to at run time.
|                          Possible values for <driver>: [  ahi directfb eglnullws linuxfb powervr qvfb transformed vnc ]

What should this plugin do exactly?

I guess we can learn a lot from this:

http://labs.qt.nokia.com/2011/10/03/chasing-the-raspberry-pi-dragon-opengl-es2-accelerated-qt-pi/

0 项奖励
回复

1,959 次查看
sidebranch
Contributor II

Thanks Michael,

I am working on i.MX53 support in OpenEmbedded, my knowledge about OpenGLES/EGL is minimal.

My current version is 4.7.4, I'll move to 4.8.0 and 5.0 afterwards.

I had no GLES enabled display plugin, I now added -gfx-plugin-simplegl to my configure and am rebuilding Qt.

    -opengl es2 -gfx-plugin-simplegl\

Regards,

Leon.

0 项奖励
回复

1,959 次查看
micken
Contributor I

Do you use a GLES enabled displayplugin ? Which version of Qt are you using ?

0 项奖励
回复