Results 1 to 3 of 3

Thread: PBuffer Surface with FSAA mode

  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    28

    PBuffer Surface with FSAA mode

    Hi.

    I use PBuffer Surface to bind a texture in WindowSurface.
    It's no problem.
    But, When I set FSAA mode in WindowSurface. like this..

    EGL_SAMPLE_BUFFERS, 1;
    EGL_SAMPLES, 4;

    I was faced with these problems.
    PBuffer Texture pixels cutted and
    texture mapping position was changed.

    My OMAP2430(MBX-Lite) device PBuffer setting is like this..

    Code :
    EGLConfig EglConfig = 0;
    EGLint i32ConfigID;
    int i32BufferSize;
    EGLDisplay eglDisplay = eglGetCurrentDisplay();
    eglQueryContext(eglDisplay, eglGetCurrentContext(), EGL_CONFIG_ID, &i32ConfigID);
    eglGetConfigAttrib(eglDisplay, (EGLConfig) i32ConfigID, EGL_BUFFER_SIZE,&i32BufferSize);
    EGLint i32ConfigNo;
    EGLint conflist[] =
    {
       EGL_CONFIG_CAVEAT, EGL_NONE,
    	EGL_BUFFER_SIZE, i32BufferSize,
    	EGL_DEPTH_SIZE, 16,
    	EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
    	EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE,
    	EGL_NONE
    };
     
    eglChooseConfig(m_EGLDisplay, conflist, &EglConfig, 1, &i32ConfigNo) || i32ConfigNo != 1)
     
    EGLint list[]=
    {
    	EGL_WIDTH, 512,
    	EGL_HEIGHT, 512,
    	EGL_TEXTURE_TARGET, EGL_TEXTURE_2D,
    	EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB,
    	EGL_NONE
    };
     
    m_EGLPbuffer = eglCreatePbufferSurface(m_EGLDisplay, EglConfig, list);

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: PBuffer Surface with FSAA mode

    Quote Originally Posted by danielkim
    I was faced with these problems.
    PBuffer Texture pixels cutted and
    texture mapping position was changed.
    Could you please describe these issues in more detail?

    Note that the 4 sample antialiasing mode on MBX Lite is acutally 2x2 supersampling, i.e. for each pixel four texture samples are taken, and the positions of these texture samples are all slightly shifted compared to non-antialiased rendering. Maybe that explains your problem?
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  3. #3
    Junior Member
    Join Date
    Oct 2006
    Posts
    28

    Re: PBuffer Surface with FSAA mode

    Quote Originally Posted by Xmas
    Could you please describe these issues in more detail?
    Our WindowSurface is 800*480 and I created 512*512 PBuffer Surface.
    after eglMakeCurrent(); // from Winsurface to PBuffer.
    I set view matrix and call glViewport(0,0,320,480) at PBuffer space
    and I draw Something at PBuffer.
    after I call eglBindTexImage() and eglMakeCurrent() //from PBuffer to WindowSuface.
    And, I use this PBuffer texture at WindowSurface.

    I set PBuffer texture UV coordinates like this..
    because of glViewport(0,0,320,480).
    U1 = 0.0f, V1 = (float)(480/512);
    U2 = 0.0f, V2 = (float)0.0f;
    U3 = (float)(320/512), V3 = (float)(480/512);
    U4 = (float)(320/512) V4 = 0.0f;

    Actually, PBuffer Texture accurately mapped at the right half of the screen.

    Strangely, When I disable FSAA mode, this places where I intended.
    But, when I enable FSAA mode, it shrinks to a quarter of its size, and shifts itself to left.

    and It has no problem on PVR PC Emu.. this only happens on the device.

    Is FSAA mode related to glViewport()??

Similar Threads

  1. Can I only Create a Pbuffer without create a window surface
    By sunim in forum Cross API and window system integration
    Replies: 3
    Last Post: 02-04-2012, 12:14 PM
  2. How to copy pixel buffer to EGL pbuffer surface?
    By jerry.yang in forum OpenGL ES general technical discussions
    Replies: 3
    Last Post: 12-17-2008, 09:35 PM

Posting Permissions

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