a couple (likely obvious) questions

Question #1:

 You are, in OpenGL, able to write a rendered frame into a buffer that you would have direct access to, allowing you to save the bitmap information out to a file, correct? You know, save the rendered image as you would with a 3D modeling/animation App, instead of just being able to draw it to the screen buffer. Or do you just access the screen buffer and write that info out? Also, if you CAN save this info out, is there an absolute pixel limit on the size you may render out and save? are the only restrictions the available memory and the time you are willing to sit and wait?

Question 2:

 Is there any way to coax more memory into the texture storage department? I don't care if it's painfully slow and the machine emits groaning noises and sparks. 
 I just pulled my implementation's limits and it said that I could use an image for texturing that was up to 2048 X 2048 pixels square. I am looking to get image information back out for print (as discussed in question 1), sometimes for large prints. Some of the textured surfaces are going to be right up in there a lot and I will need those images texturing the surfaces to be both large and as crisp as they looked going in. I feel that for my needs a texture of 2048 x 2048 may not suffice. Am I out of luck on a grand scale?

Any help on these two questions would be great.

thanks in advance,
Josh

  1. You can retrieve the image you have just drawn using the glReadPixels command. The size of this image will be the same as the size of the gl window. You can create offscreen buffers (pbuffers) but that is more involved.

  2. You will not be able to create textures larger than the maximum supported by your implementation.

One solution if you need textures greater than 2048x2048 might be to simply break the textures you need into multiple textures. Depending on your scene, this might make setting up texcoords and knowing when to bind the right texture a bit more difficult, though.

2048x2048 is huge for a texture map (heck my monitor can only go up to 1280x1024). What kinda program are you making if you dont mind me asking???

I, admittedly, was trying to cut corners in a 2D image skewing package. Which leads me to ask a different question. Does anyone know if you can RETRIEVE a matrix in OpenGL. They talk about loading matrices in the red book but I couldn’t find a place that showed how to pull the values of the current matrix back into a buffer for use elsewhere. Is this possible?

The matrices are state variables and can be retreved using the Get* commands. From the redbook:

GLdouble mvmatrix[16], projmatrix[16];
glGetDoublev (GL_MODELVIEW_MATRIX, mvmatrix);
glGetDoublev (GL_PROJECTION_MATRIX, projmatrix);

I don’t think there is a dedicated GetMatrix type command.