PDA

View Full Version : glDrawPixels & glPixelZoom Projection!



joda
04-16-2003, 08:04 AM
Hey!

Im changing some code in an opengl application and I need some help with projections.

The app renders image maps using scanlines like.

for (int y = 0; y < h; ++y)
{
glRasterPos2i ( 0, y + 1);
glDrawPixels ( w, 1,
_mode,
GL_UNSIGNED_BYTE,
buffer+y*w*3 );
}

I tried to change the loop by just adding a simple glDrawPixels line but that screwed up some renders.

How do I apply zoom? if I increase zoom the width changes correctly but what about the height ( it doesnt change, makes the images look very compressed )? the example is rendering p/scanline and takes line after line but how do I implement a correct zoom compatible scanline rendering?

Thanks!

// Joda