Results 1 to 6 of 6

Thread: a couple (likely obvious) questions

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2002
    Posts
    15

    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

  2. #2
    Member Contributor
    Join Date
    Jan 2003
    Location
    UK
    Posts
    51

    Re: a couple (likely obvious) questions

    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.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: a couple (likely obvious) questions

    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.
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Guest

    Re: a couple (likely obvious) questions

    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???

  5. #5
    Junior Member Newbie
    Join Date
    Dec 2002
    Posts
    15

    Re: a couple (likely obvious) questions

    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?

  6. #6
    Member Contributor
    Join Date
    Jan 2003
    Location
    UK
    Posts
    51

    Re: a couple (likely obvious) questions

    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.

Similar Threads

  1. a couple of questions please
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-17-2004, 12:07 AM
  2. A couple of questions
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-29-2003, 05:26 AM
  3. Hello and a couple of questions
    By Shaba1 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-17-2002, 06:09 AM
  4. A couple Cpw questions...
    By jpummill in forum OpenGL: General
    Replies: 3
    Last Post: 02-25-2002, 11:09 AM
  5. A couple questions...
    By iNsaNEiVaN in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-29-2001, 11:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean