Original Post
Dear All,
I am here with some basic question,regarding EGL surface creation.Currenly i am working on the composition part but unfortunately my os (custom) doest have a support to create a pixmap.Sorry i am in basic level in terms of surface composition.Please let me know whether my approach is right???
[source]
pixmap_ = XCreatePixmap(
dpy, window, size_.width(), size_.height(), gwa.depth);
[/source]
But unfortunately the above call i cant use because i dont have X11 support. so could any one please guide me how to overcome this issue to create a pixmap through openGL ES 2.0.Right now my implementation for linux is as follows
[source]
pixmap_ = XCreatePixmap(
dpy, window, size_.width(), size_.height(), gwa.depth);
image_ = eglCreateImageKHR(
edpy, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR,
reinterpret_cast(pixmap_), NULL);
glGenTextures(1, &texture_);
GLint current_texture = 0;
glGetIntegerv(GL_TEXTURE_BINDING_2D, ¤t_texture);
glBindTexture(GL_TEXTURE_2D, texture_);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image_);
glBindTexture(GL_TEXTURE_2D, current_texture);
[/source]
So i am struck up with XCreatePixmap..please let me know how we can create pixmap through openGL ES 2.0 rather than depending on native calls.
I am here with some basic question,regarding EGL surface creation.Currenly i am working on the composition part but unfortunately my os (custom) doest have a support to create a pixmap.Sorry i am in basic level in terms of surface composition.Please let me know whether my approach is right???
[source]
pixmap_ = XCreatePixmap(
dpy, window, size_.width(), size_.height(), gwa.depth);
[/source]
But unfortunately the above call i cant use because i dont have X11 support. so could any one please guide me how to overcome this issue to create a pixmap through openGL ES 2.0.Right now my implementation for linux is as follows
[source]
pixmap_ = XCreatePixmap(
dpy, window, size_.width(), size_.height(), gwa.depth);
image_ = eglCreateImageKHR(
edpy, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR,
reinterpret_cast
glGenTextures(1, &texture_);
GLint current_texture = 0;
glGetIntegerv(GL_TEXTURE_BINDING_2D, ¤t_texture);
glBindTexture(GL_TEXTURE_2D, texture_);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image_);
glBindTexture(GL_TEXTURE_2D, current_texture);
[/source]
So i am struck up with XCreatePixmap..please let me know how we can create pixmap through openGL ES 2.0 rather than depending on native calls.