Results 1 to 7 of 7

Thread: Some philosophical questions

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

    Some philosophical questions

    Hello, here are 3 problems I just can't solve :

    1. When using glut, how do you specify that you want a 32-bit depth-buffer ? (I automatically get a 24-bit buffer)

    2. If the alpha channel is ignored, if GLUT_RGBA = GLUT_RGB, what use is it to specify the 4th component of colors ? Is it always ignored ?

    3. I just can't get polygon antialiasing. I've tried glEnable (GL_POLYGON&LINE&POINT_SMOOTH);
    I've tried enabling blending. But it does not work !

    If you have some idea about any of these 3 problems... please help !

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Some philosophical questions

    1. Most modern consumer hardware supports 24 bit z and no greater. They use the other 8 bits for hardware stencil support.

    2. I'm not exactly certain if I follow this question, but it sounds like you are asking how a non existant alpha buffer impacts the fragment alpha component. The alpha buffer is only useful for destination alpha blending effects. It plays no role in alpha testing or in source alpha effects. That's why the 4th color component is still useful even without an alpha buffer.

    3. Can't answer as I've never messed with AA polygons. However, I know lots of other people have posted to the board on this topic so a search may do you some good.

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: Some philosophical questions

    As DFrey has already answered 1), I just have the last two to play with :

    2) If you are in RGB mode, there is no use in specifying a 4th component (alpha) with glColor... However, you can use the alpha channel of a texture to do some blending or multitexture effects (even if you color buffer does not have an alpha channel !).

    3) If you want to enable polygon antialiasing:

    Code :
    glHint(GL_POLYGON_SMOOTH_HINT,GL_NICEST);
    glEnable(GL_POLYGON_SMOOTH);
    Note that the hint you give in glHint can be ignored: some vendors will simply ignore this and won't antialias your polygons...

    What hardware are you using ?

    Regards.

    Eric

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

    Re: Some philosophical questions

    Wow I've just become a "frequent contributor" !

    OK thank you VERY MUCH, DFrey and Eric ! You solved my 3 problems. And for question 3, it was indeed the glHint who missed. Now it works, but it has created another problem : I have a white sky, and polygon antialiasing now produces a white grid on my teapots (exactly as if I had redrawn them in GL_WIRE mode). I guess that the antialiasing algorithm blends the polygon's color with the background color... However such a grid is not convenient. How could I suppress it ?

    [This message has been edited by Morglum (edited 07-30-2001).]

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2001
    Location
    North America, .
    Posts
    26

    Re: Some philosophical questions

    Your need to play with the blending function, GL_SRC_ALPHA_MINUS_DST_COLOR i think.
    Did you know that trekbbs use the same bbs engine???

  6. #6
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: Some philosophical questions

    src_alpha one_minus_src_alpha
    but personally on my card ive found polygon/line smooth to not give very good results. the only decent looking one is point_smooth

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

    Re: Some philosophical questions

    thanks, I'm just trying every possible combination of parameters for glBlendFunc. On my card, polygon antialiasing looks very good, but it is very slow.

Similar Threads

  1. NVidia Cg Philosophical Question
    By HollanErno in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 08-18-2008, 01:13 PM
  2. new to fbo's, two questions
    By Vexator in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 07-20-2006, 11:53 AM
  3. OGL 2.0 questions
    By Ninja in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-07-2002, 04:36 AM
  4. Cg Questions
    By pleopard in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 07-30-2002, 09:48 AM
  5. 3 questions :-)
    By nullspace in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-11-2001, 03:21 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