Arm Community
Site
Search
User
Site
Search
User
Groups
Education Hub
Distinguished Ambassadors
Open Source Software and Platforms
Research Collaboration and Enablement
Forums
AI and ML forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Arm Virtual Hardware forum
Automotive forum
Compilers and Libraries forum
Graphics, Gaming, and VR forum
High Performance Computing (HPC) forum
Infrastructure Solutions forum
Internet of Things (IoT) forum
Keil forum
Morello forum
Operating Systems forum
SoC Design and Simulation forum
SystemReady Forum
Blogs
AI and ML blog
Announcements
Architectures and Processors blog
Automotive blog
Graphics, Gaming, and VR blog
High Performance Computing (HPC) blog
Infrastructure Solutions blog
Internet of Things (IoT) blog
Operating Systems blog
SoC Design and Simulation blog
Tools, Software and IDEs blog
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Graphics, Gaming, and VR forum
eglCreatePixmapSurface error 0x300a
Jump...
Cancel
Locked
Locked
Replies
8 replies
Subscribers
136 subscribers
Views
8462 views
Users
0 members are here
OpenGL ES
Mali-GPU
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
eglCreatePixmapSurface error 0x300a
jack li
over 11 years ago
Note: This was originally posted on 12th September 2012 at
http://forums.arm.com
When I try the SAMSUNG S3 run the above code, I failed.
void GLImageRenderBlux::initEGL(int width, int height, SkBitmap bitmap)
{
const EGLint attribList[] = { EGL_WIDTH, width, EGL_HEIGHT, height, EGL_NONE };
EGLConfig config;
EGLint maj;
EGLint min;
m_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
checkEGLError("eglGetDisplay");
if(m_display == EGL_NO_DISPLAY) {
LOGE("getDisplay fail!");
return ;
}
if(eglInitialize(m_display, &maj, &min) == EGL_FALSE) {
LOGE("Initialize fail");
return ;
}
config = chooseConfig(m_display);
EGLint contextAttrs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
m_context = eglCreateContext(m_display, config, EGL_NO_CONTEXT, contextAttrs);
checkEGLError("eglCreateContext");
if(m_context == EGL_NO_CONTEXT) {
LOGE("Create Context failure");
return ;
}
//
SkPixelRef* ref = bitmap.pixelRef();
SkSafeRef(ref);
ref->lockPixels();
egl_native_pixmap_t pixmap;
pixmap.version = sizeof(pixmap);
pixmap.width = width;
pixmap.height = height;
pixmap.stride = bitmap.rowBytes() / bitmap.bytesPerPixel();
pixmap.format = SkBitmap::kARGB_8888_Config;
pixmap.data = (uint8_t*)ref->pixels();
ref->unlockPixels();
m_surface = eglCreatePixmapSurface(m_display, config, &pixmap, attribList);
checkEGLError("eglCreatePixmapSurface");
if(m_surface == EGL_NO_SURFACE) {
LOGE("Create Surface failure");
return ;
}
if (!eglMakeCurrent(m_display, m_surface, m_surface, m_context)) {
LOGE("Make Current failure");
return ;
}
}
EGLConfig GLImageRenderBlux::chooseConfig(EGLDisplay display)
{
EGLConfig config;
EGLint numConfigs;
static const EGLint configAttribs[] = {
EGL_SURFACE_TYPE,
EGL_PIXMAP_BIT,
EGL_RENDERABLE_TYPE,
EGL_OPENGL_ES2_BIT,
EGL_NONE
};
eglChooseConfig(display, configAttribs, &config, 1, &numConfigs);
checkEGLError("eglPbufferConfig");
if (numConfigs != 1) {
LOGE("eglPbufferConfig failed (%d)\n", numConfigs);
}
return config;
}
Error information is as follows:
'eglCreatePixmapSurface error: EGL_BAD_NATIVE_PIXMAP (0x300a)'
'[color=#FF0000]Create Surface failure'[/color]
Does any know how to fix the problem?
Parents
Karthik Hariharakrishnan
over 11 years ago
Note: This was originally posted on 21st September 2012 at
http://forums.arm.com
Hi Likai,
I have tried your above code snippet also on a Galaxy S2 (Android 4.0.4) and have not faced any issue. In the above code snippet, you also seem to be checking if the framebuffer is complete. If incomplete, you should get the following in Logcat, but I can't see it in your console log.
[color=#FF0000][font=Arial, sans-serif][size=2]
Framebuffer incomplete at XXX
[/size][/font][/color]
Cheers
Karthik
Cancel
Up
0
Down
Cancel
Reply
Karthik Hariharakrishnan
over 11 years ago
Note: This was originally posted on 21st September 2012 at
http://forums.arm.com
Hi Likai,
I have tried your above code snippet also on a Galaxy S2 (Android 4.0.4) and have not faced any issue. In the above code snippet, you also seem to be checking if the framebuffer is complete. If incomplete, you should get the following in Logcat, but I can't see it in your console log.
[color=#FF0000][font=Arial, sans-serif][size=2]
Framebuffer incomplete at XXX
[/size][/font][/color]
Cheers
Karthik
Cancel
Up
0
Down
Cancel
Children
No data