I previous had a problem with texture filtering of CEGUI elements in OpenGL, where the textures had point filtering applied instead of linear filtering. Sinbad discovered a bug in OgreCEGUIRenderer.cpp where the order of calling initRenderStates and _setTexture mattered in OpenGL whereas it didn't matter in DirectX.
I applied the solution for this bug on my old Dagon as I can't upgrade to Eihort atm. But I still have som issues with elements where I set the texture "manually" like image buttons and static images. These elements will get linear filtered only when pressing them i.e. they get focus. But until then they have point filtering applied.
I discovered a bug in the doRender loop in OgreCEGUIRenderer.cpp that causes this behavior:
Code: Select all
 while(i != d_quadlist.end())
{
d_currTexture = i->texture;
d_render_op.vertexData->vertexStart = d_bufferPos;
for (; i != d_quadlist.end(); ++i)
{
const QuadInfo& quad = (*i);
if (d_currTexture != quad.texture)
/// If it has a different texture, render this quad in next operation
break;
d_bufferPos += VERTEX_PER_QUAD;
}
d_render_op.vertexData->vertexCount = d_bufferPos - d_render_op.vertexData->vertexStart;
/// Set texture, and do the render
d_render_sys->_setTexture(0, true, d_currTexture->getName());
if (first)
{
initRenderStates();
first = false;
}
d_render_sys->_render(d_render_op);
}
Code: Select all
for (; i != d_quadlist.end(); ++i)
{
const QuadInfo& quad = (*i);
if (d_currTexture != quad.texture) {
/// If it has a different texture, render this quad in next operation
first = true;
break;
}
d_bufferPos += VERTEX_PER_QUAD;
}
Martin Bang Andersen