Results 1 to 4 of 4

Thread: eglCreateWindowSurface

  1. #1
    Junior Member
    Join Date
    Jan 2009
    Posts
    1

    eglCreateWindowSurface

    Hello,
    I develop an OpengGLES application for Windows Mobile.
    I have some problem with refresh of opengles, because I draw 2D elements above opengles layer.
    I would like to know if it's possible to define eglCreateWindowSurface only on a part of the screen ?
    If not, is it possible to do glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) ; only on a part of the screen.

    Thank you for your help.

  2. #2
    Junior Member
    Join Date
    Dec 2008
    Location
    Oslo, Norway
    Posts
    25

    Re: eglCreateWindowSurface

    I don't think there's any way of making a windowed surface for a sub-section of a window in Windows Mobile. Perhaps you can make a child-window, and make your egl-surface from that? I guess that only works if you have a rectangular sub-section of the window you want to render to.

    glClear() can affect only a part of the framebuffer, by using scissoring. However, glClear modifies the back-buffer, and not the front-buffer, and when eglSwapBuffers() is called, it will still overwrite your 2D elements.

    Now, mixed rendering is really hairy, and I'd strongly recommend you stick to one API for all your rendering. Can you for instance render your 2D elements to a bitmap, and upload that as a texture? Or possibly better, can you render it directly with OpenGL ES?
    Erik "kusma" Faye-Lund

  3. #3

    Re: eglCreateWindowSurface

    I want to have an instructions page in my OpenGL ES game. You say that mixed rendering is messy, so do you mean that it is better to write all the instructions on a texture, which I then put on a rectangle which is shown directly in front of the camera? This approach would avoid any mixed rendering.

    Quote Originally Posted by kusma
    I don't think there's any way of making a windowed surface for a sub-section of a window in Windows Mobile. Perhaps you can make a child-window, and make your egl-surface from that? I guess that only works if you have a rectangular sub-section of the window you want to render to.

    glClear() can affect only a part of the framebuffer, by using scissoring. However, glClear modifies the back-buffer, and not the front-buffer, and when eglSwapBuffers() is called, it will still overwrite your 2D elements.

    Now, mixed rendering is really hairy, and I'd strongly recommend you stick to one API for all your rendering. Can you for instance render your 2D elements to a bitmap, and upload that as a texture? Or possibly better, can you render it directly with OpenGL ES?

  4. #4
    Senior Member
    Join Date
    May 2008
    Posts
    100

    Re: eglCreateWindowSurface

    Just to throw out an idea, if your platform support layer/overlays, you might be able to access them via the level attribute of an egl config. That way you could easily overlayer your UI on top without affecting the contents of your other window. Alternatively, if your native graphics support layer/overlays you could just use the native API to do everything including rendering.

    If your stuck with a single layer, then egl on it's own doesn't have any mechanism for doing composition, or even set the position of an eglWindowSurface. So you would need to see if your particular platform provides some kind of a windowing system (or something like OpenWF) which would grant you more flexibility.

Similar Threads

  1. Android: eglCreateWindowSurface - invalid arguments
    By threaderslash in forum OpenGL ES 2X - for programmable 3D graphics pipelines
    Replies: 1
    Last Post: 04-08-2012, 05:59 AM
  2. eglCreateWindowSurface fails with EGL_BAD_MATCH
    By Teraslilja in forum OpenGL ES 2X - for programmable 3D graphics pipelines
    Replies: 0
    Last Post: 05-12-2011, 08:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •