I've got a simple application showing a custom frame buffer (it is sort of an emulator of the frame buffer functionality) using OpenGL:
void GLWidget::resizeGL( int w, int h )
{
glViewport( 0, 0, w, h );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( 0, w, 0, h, -1, 1 );
}
void GLWidget::paintGL()
{
if( pScreen != 0 )
{
glRasterPos2i( 0, 2 * pScreen->height );
glPixelZoom( 2, -2 );
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
glDrawPixels( pScreen->width, pScreen->height, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, pScreen->pixels );
}
}
Really, this is all I want to do it, no shaders, no fancy tricks, just the double zoom and show. This code is years old and while porting it to Windows I've noticed that it wont compile anymore. First I thought it's a Windows specific thing but then I realized it's actually the new OpenGL Windows 7 comes with (unlike Arch Linux I'm using on daily basis).
So what to do about that? I really don't feel like installing a custom math library for the matrix stuff, I can't believe the latest OpenGL can't "just show the buffer".