I ended up using glPixelZoom(1.0,-1.0) to flip the image before I read this. What you have below seems like it will reduce work (not knowing much about the zoom operation). I'll check out setting the stride. I know nothing about graphics but I'm having fun learning. :) I'm an embedded programmer and I'm lucky to have an rs232 terminal half the time.
Thanks for the help! Bruce > > On May 13, 2007, at 5:44 AM, bruce wrote: > > > Maybe someone knows opengl. I read the image and then display it. > > The image is upsidedown. :( Ah well, at least the image is being > > displayed so more hunting. > > Yes. OpenGL sets its origin in the bottom left, as common in > mathematics, whereas FLTK sets the origin in the top left, as most > GUI libraries do. If you use the OpenGL function to copy memory > directly to the screen, you can set the "stride", the distance in > bytes from line to line, to 2*-width, and the start of the array to > the beginning of the *last* row, and you image will be flipped. > > > I'll post the readimage() updates I make. The way it works now > > looks like it will be pretty slow. > > Yes, because reading from the screen is very slow. Drawing directly > into texture map memory using OpenGL commands and then using texture > maps for rendering a possibly distorted or scaled image is much faster. > > ---- > http://robowerk.com/ > > _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

