Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2005

    Motion bulr with OpenGL ES

    How can I implemet this effect with OpenGL ES on a rotating quad in Symbian?
    I've tryed this code:
    glClear( GL_DEPTH_BUFFER_BIT );
    glDisable( GL_CULL_FACE );

    but when I active the motion blur the quad stop to rotate! I've tryed to use only
    glClear( GL_DEPTH_BUFFER_BIT ); and it run, but it's not a real motion blur because there's no blending?
    Can Someone help me?!

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003

    Re: Motion bulr with OpenGL ES


    Is your render loop something like this:

    1. clear depth
    2. render quad
    3. eglSwapBuffers( )
    4. clear depth
    5. render quad
    6. eglSwapBuffers( )


    In that case you should take a careful look on the EGL specification on the semantics of the eglSwapBuffers( ). Specifically, contents of the color buffer after a call to eglSwapBuffers( ) are _undefined_ => color buffer contents cannot be accumulater from the frame to another.

    There are couple of ways around it:

    1) create separate render surface (PBuffer) for your accumulated rendering,
    all rendering will be done there (no swapbuffers -> frame buffer will be
    kept). whenever you want to display the buffer, you can for example
    copy the content to a texture, call eglMakeCurrent on the window
    surface, and render the texture to the screen with two triangles

    2) same as (1), but you can use eglCopyBuffers( ) to copy PBuffer contents
    to native pixmap (CFbsBitmap), then draw that to screen with standard
    Symbian bitblits (note: remember to use eglWaitGL( ) and eglWaitNative)))

    3) same as (1), but you use glReadPixels( ) to read the data from PBuffer
    into Symbian bitmap, then bitblit it ...

    4) use window surfaces, but draw the contents of for example frames
    N-3,N-2,N-1, and N into the window surface (thus 4x render load),
    and swap that to the display

    Choices are many. Depending on the content, some choices may be faster
    than others. If you are really trying to get simple content working, then choice (4) may be for you. If you have really complex frames, then some of the other alternatives should work better.

    Jani Vaarala
    Graphics Architect

Similar Threads

  1. Another OpenGL ES problem
    By rvhaasen in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2006-08-16, 22:48
  2. Does 6680 support OpenGL ES?
    By Elotom in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2005-06-27, 03:16
  3. OpenGL ES and View Arch. in Series 60
    By abolfoooud in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-06-06, 13:36
  4. OpenGL ES applications fail to startup
    By sandberg in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2005-01-11, 11:37
  5. extracting motion vectors from h.263 coder
    By DrChandra in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2004-12-24, 09:53

Posting Permissions

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