I am using Yocto as an embedded system with OpenGL 2.1, GLEW 2.0.0 and Mesa 17.0.2. I am software rendering off screen to a monitor through HD/SDI. The problem I am having is my update rate is around 1 hertz. On my development machine I have about 20 FPS when hardware acceleration is disabled on Debian. The embedded machine isn't as powerful so I understand a performance hit, but 1 FPS seems a bit low. For my Optimization I disabled:
glDiasble(GL_LINE_SMOOTH)
glDiasble(GL_POINT_SMOOTH)
glDiasble(GL_SMOOTH)
glDiasble(GL_MULTISAMPLE)
glShadeModel(GL_NONE)
I do not have any culling because I am only using 2D images.
However I do set the min and mag filter to GL_NEAREST.
My buffer swapping and context creation is something like:
bool makeContext()
{
width = 1280;
height = 720;
context = OSMesaCreateContextExt(OSMESA_RGBA, 0, 0, 0, NULL);
if(!context)
{
//...
return false;
}
bufferSize = width * height * 4 * sizeof(GL_UNSIGNED_BYTE);
frameBuffer = (char*)mallic(bufferSize);
frameBuffer = (char*)0_buf_baseaddr;
if(!OSMesaMakeCurrent(context, frameBuffer, GL_UNSIGNED_BYTE, width, height));
{
//...
return false;
}
OSMesaPixelStore(OSMESA_Y_UP, 0)
{
//...
}
return true;
}
void swapBuffers()
{
frameBuffer = (char*) swap_page(); //returns a spot in memory with update
OSMesaMakeCurrent(context, frameBuffer, GL_UNSIGNED_BYTE, width, height);
}
I was thinking about applying stenciling, but I'm not sure if that will help the performance. I'm almost certain the issue stems from the heavy use of Alpha channels with my images I'm using. Multiple moving layers behind one another to the effects I wanted.
Is there anything wrong with my swapping or creation that's obvious? Also, based on the optimizations I have already made, is there anything else I can do that might help?