Results 1 to 5 of 5

Thread: Snapping OpenGL client to ClipBoard

  1. #1
    Member Newbie
    Join Date
    Mar 2002
    Posts
    34

    Snapping OpenGL client to ClipBoard

    I'm using the code here: http://www.codeguru.com/opengl/snap.shtml
    to capture my openGL scene into a picture file. But when I call the method in my program and then I try pasting into a picture file, I just get a big light grey rectangle pasted into the file. It doesn't capture the image on my openGL screen. However, the rectangle that gets pasted is always the same size as my openGL scene, it just doesn't draw the scene. Anybody know what could be wrong and how i could fix this?

    [This message has been edited by Rajveer (edited 04-08-2002).]

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: Snapping OpenGL client to ClipBoard

    Looks like a pixel-format problem. The pixel format should be the same on both sides (your rendering context and your file). For example if you're rendering in 24-bit rgb, then you should export to a 24-bit rgb file. If it's not, make sure you've done the conversion properly.

  3. #3
    Member Newbie
    Join Date
    Mar 2002
    Posts
    34

    Re: Snapping OpenGL client to ClipBoard

    Already accounted that, it said on the site that the code I'm using is for screen configurations set to true color. I checked my settings and it was set to 24 bit true color. As far as exporting to a file, I'm trying to paste it into MSPaint. I'm not sure how to check if the file is 24-bit rgb. Couldn't find anything in the program help, but I don't think this is the problem. Anyone know what else might be wrong?

  4. #4

    Re: Snapping OpenGL client to ClipBoard

    Here is a working version with source code by the same author Pierre Alliez.
    http://www.codeproject.com/useritems/glexport.asp

    That should fix your problems

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Feb 2002
    Location
    Bonn, Germany
    Posts
    1,633

    Re: Snapping OpenGL client to ClipBoard

    Also note that you can simply press Alt-PrintScreen to capture the contents of any window - including OpenGL windows - into the clipboard. Works just fine for me

Similar Threads

  1. snapping in OpenGL 2
    By rhizome in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-10-2002, 10:52 PM
  2. Client Server Opengl
    By lobstah in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 05-24-2002, 12:06 PM
  3. copy to clipboard
    By bzombori in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-22-2002, 12:03 PM
  4. Client/Server and OpenGL
    By softland_gh in forum OpenGL: Advanced Coding
    Replies: 13
    Last Post: 01-09-2001, 01:34 PM
  5. Snapping object in 3D world to a point...
    By [SW]Falcon in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 08-14-2000, 03:33 PM

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