Results 1 to 7 of 7

Thread: OpenGL Desktop Texture

  1. #1

    OpenGL Desktop Texture

    How can i get the desktop(screenshot) image as a texture in my openGL program ? I'm using VC++ / MFC

    thx

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2003
    Location
    UK
    Posts
    21

    Re: OpenGL Desktop Texture

    I suspect you might need to create a full-screen (single-buffer) window, but don't clear it. Then just do a glReadPixels. That should grab everything for you.

  3. #3

    Re: OpenGL Desktop Texture

    I thought i could use GetDesktop(or something like that)
    to get the handle and the get a HBITMAP... i saw this on codeguru.com

    i tried it, but it crashed P when i called the texture creation routines...

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    586

    Re: OpenGL Desktop Texture

    Try looking at http://msdn.microsoft.com and looking up knowledge article Q97193 entitled WINCAP Captures Screens Using DIB API. It has a sample, not gl specific. And, if that doesn't help you, search their docs.

  5. #5

    Re: OpenGL Desktop Texture

    thx a lot to you Adrian !

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2003
    Location
    UK
    Posts
    21

    Re: OpenGL Desktop Texture

    Happy to help. Did it work okay?

  7. #7

    Re: OpenGL Desktop Texture

    i don't have time to work on it right now... but i'll give it a try real soon

Similar Threads

  1. Opengl best texture compression format on desktop nowadays
    By elect in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-29-2014, 04:38 AM
  2. Replies: 1
    Last Post: 11-12-2013, 09:54 AM
  3. OpenGL under RDP (remote desktop)
    By jacky_romano in forum OpenGL: Windows
    Replies: 1
    Last Post: 12-13-2006, 10:11 AM
  4. Making a texture from the currenct Mac OS X desktop/screen?
    By Useless in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 06-05-2005, 09:29 PM
  5. Getting a texture map of the Windows Desktop
    By imported_Rob in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 03-01-2001, 06:31 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