Results 1 to 3 of 3

Thread: Render to buffer that is never displayed?

  1. #1
    Junior Member Newbie
    Join Date
    May 2008
    Posts
    3

    Render to buffer that is never displayed?

    I'm working on a C++ class that would use OpenGL occlusion queries to calculate what percentage of objects are occluded from different points of view. That's all-- no need to display them, ever, except during debugging.
    So far I have the code to do that done, except that it displays the window the rendering of the occluders as it does its work. I'd like to be able to make that hidden. So does anyone know how to get a rendering context for a framebuffer that is never displayed? Preferably this would be cross-platform but I doubt that is possible. For single platform solutions I am using Ubuntu.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Render to buffer that is never displayed?

    Use FBO. You will probably still have to create a window to get a GL context, then everything else can be hidden on a Framebuffer object.

  3. #3
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,931

    Re: Render to buffer that is never displayed?

    Occlusion queries count samples that pass the depth test. So if you disable color buffer writes (with glColorMask), you will get what you want. You still have to use the depth buffer, though.

    If I misread your question and you just need "no window", then use FBOs as ZBuffeR said

Similar Threads

  1. Depth Buffer Render
    By planza in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-05-2013, 02:03 AM
  2. render to vertex buffer
    By babis in forum OpenGL: Advanced Coding
    Replies: 22
    Last Post: 06-17-2008, 10:36 AM
  3. Render buffer copy
    By dletozeun in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 02-02-2008, 04:45 AM
  4. render to buffer object
    By marco_dup1 in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 11-10-2005, 02:29 AM
  5. How to get displayed object's vertices in a Buffer ?
    By jerin3D in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-18-2002, 07:46 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