I use PBuffer Surface to bind a texture in WindowSurface.
It’s no problem.
But, When I set FSAA mode in WindowSurface. like this…
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…
EGLConfig EglConfig = 0;
EGLDisplay eglDisplay = eglGetCurrentDisplay();
eglQueryContext(eglDisplay, eglGetCurrentContext(), EGL_CONFIG_ID, &i32ConfigID);
eglGetConfigAttrib(eglDisplay, (EGLConfig) i32ConfigID, EGL_BUFFER_SIZE,&i32BufferSize);
EGLint conflist =
eglChooseConfig(m_EGLDisplay, conflist, &EglConfig, 1, &i32ConfigNo) || i32ConfigNo != 1)
m_EGLPbuffer = eglCreatePbufferSurface(m_EGLDisplay, EglConfig, list);
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?
Our WindowSurface is 800480 and I created 512512 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()??
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.