Results 1 to 7 of 7

Thread: Printing OpenGL

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    España
    Posts
    45

    Lightbulb Printing OpenGL

    Hello, I'm making an app that buids a 3D grafic using OpenGL, but now I want to print it. Anybody knows the way to do this?

    I'm open to any suggestion.

    Bye and Thanks.

  2. #2
    Zaei
    Guest
    I think the standard method is to lock the back buffer, and copy each pixel to a bitmap file, and save that file. I dont use OGL, so i cant give you any code, but that will work.

    Z.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    España
    Posts
    45
    But, Is it posible to print it directly?

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    If you can get an hDC I believe you can pass it to the Printer object.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Zaei
    Guest
    Yep. As long as you can get a DC, you can print from that.

    Z.

  6. #6
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    Do u want to take a screen shot and save it to a file ?

  7. #7
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Showing the image and taking a screenshot is probably the best way of getting it to a DC. THEN you could print it

    If you're interested just reply here and we'll give you some code
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width