Results 1 to 3 of 3

Thread: enable multisample

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    24

    enable multisample

    All,

    I am programming for a Windows environment, and I am attempting to use multisampling. Currently, both of the following "return" 0:

    Code :
    glGetIntegerv(GL_SAMPLE_BUFFERS, &buffers);
    glGetIntegerv(GL_SAMPLES, &samples);

    I believe this is because the pixel format descriptor I am using does not support multisampling. How do I create a descriptor that supports multisampling?

    Thank you,
    Robert

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2007
    Posts
    268

    Re: enable multisample

    You have to initialize the context throught some wgl function. The only way to have access to the wgl functions is to have an existing OpenGL context in the first place.

    To sum up:
    1. create a dummy OpenGL context
    2. get access to the wgl functions to create the context with multisampling
    3. get rid of the dummy context.

    Details for the context creation can be found in lesson 46 of NeHe tutorials:
    http://nehe.gamedev.net/data/lessons....asp?lesson=46


  3. #3
    Senior Member OpenGL Pro
    Join Date
    Sep 2004
    Location
    Prombaatu
    Posts
    1,386

    Re: enable multisample

    ... And should your hardware permit you to dabble in GL 3.2 (see TexImage2DMultisample) or extensions (see NV_explicit_multisample) you can render to multisample textures instead, which are considerably easier to setup and use but require that you resolve manually for presentation via BlitFramebuffer or shader (see e.g. sampler2DMS in the GLSL 1.5 spec).

Similar Threads

  1. Everything is fog , when i enable fog
    By Adrian B in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-09-2011, 04:47 PM
  2. How to enable SLI operation?
    By Tzupy in forum OpenGL: Advanced Coding
    Replies: 18
    Last Post: 01-25-2005, 11:57 AM
  3. Can't enable culling
    By Seamoon in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-10-2003, 07:14 AM
  4. Can't enable GL_POLYGON_SMOOTH. Can you HELP?
    By Sergei in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 10-16-2000, 10:25 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