Results 1 to 3 of 3

Thread: screeshots

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    ...
    Posts
    28

    screeshots

    i wanna make screenshots of my program
    whats the best way and how does it work with non-opengl programs?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: screeshots

    Hello

    There is a function called glReadPixels you can use to read the pixels from a buffer. To the function you pass the coordinates of the box you want to get (in your case, the entire screen), in what format you want to obtain the data (as float, int, byte), how you want the data to be packed (RGB, RGBA...), what buffer (colorbuffer, depthbuffer...), and a pointer an array where you want the data to be placed.
    Then you have to write the data to a file in a nice format.
    As far as I know, this is the only way to make screenshots in OpenGL.

    However, this method is not working in non-gl programs, since glReadPixels is a OpenGL function.

    Bob

  3. #3
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    122

    Re: screeshots

    If you need just a few screenshots you can use in Windows the 'print'-key on your keyboard...

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