Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Introduction to OpenGL 3.2

  1. #1
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Introduction to OpenGL 3.2

    I hope that someone could find this useful. The first (draft) version of the first (in a row) GL 3.2 tutorial can be found on these locations:

    http://www.wikiscripts.net/#action=post&id=213 and

    http://sites.google.com/site/openglt...---tutorial-01

    In fact this is just the preparation for the tutorials that will follow. If you have any suggestions or think that some of the tutorials (that follows) can also be posted on OpenGL/wiki, just say it.

    I have to excuse for the bad design of the pages, but everything will be fixed up soon (I hope).

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: Introduction to OpenGL 3.2

    Unfortunately, I have to announce that my next OpenGL 3.2 tutorial (Tutorial 02 - GLSL 1.5 and the Input Blocks) will have to wait the release of new drivers. Current NV 190.56 beta drivers do not support many of the OpenGL 3.2 built-in functionalities. It will be useless to expose only theory without chance to execute a peace of code.

    Current GLSL implementation generates a compilation error if blocks are used. It claims that NV_gpu_shader5 extension should be enabled, but the current drivers do not support that extension.

    Eagerly expect next release of NV drivers...

  3. #3
    Senior Member Regular Contributor LangFox's Avatar
    Join Date
    Oct 2001
    Location
    Shen Zhen, Guangdong, China
    Posts
    102

    Re: Introduction to OpenGL 3.2

    hehe, me too. So I still with 190.38.
    Best Regards,
    LangFox


    http://hi.baidu.com/lang_fox

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,650

    Re: Introduction to OpenGL 3.2

    Quote Originally Posted by Aleksandar
    This site won't let you print (to printer/PDF/etc.). Does anybody's flash let you print this?

    Thanks for providing a backup site. Much more usable.

  5. #5
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: Introduction to OpenGL 3.2

    The PDF version of the tutorial is now available for downloading. It will be revised as the tutorial changes.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,650

    Re: Introduction to OpenGL 3.2

    Thanks.

  7. #7
    Member Contributor
    Join Date
    Oct 2007
    Location
    persia,tabriz
    Posts
    71

    Re: Introduction to OpenGL 3.2

    why you are not use gl_FragColor ?

    and 2 shaders have #version 150 ??!!!

    Code :
    // minimal.frag
    #version 150 core
     
    in vec3 in_Position;
    in vec3 in_Color;
    out vec3 ex_Color;
     
    void main(void)
    {
          gl_Position = vec4(in_Position, 1.0);
          ex_Color = in_Color;
    }
     
     
    // minimal.frag
    #version 150 core
     
    // precision highp float;
     
    in vec3 ex_Color;
    out vec4 out_Color;
     
    void main(void)
    {
          out_Color = vec4(ex_Color,1.0);
    }

  8. #8
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: Introduction to OpenGL 3.2

    Quote Originally Posted by Pswin
    why you are not use gl_FragColor ?
    gl_FragColor is deprecated built-in variable (since GLSL 1.3). As I have defined that I want only "core" functionality (#version 150 core), GLSL should generate an error if gl_FragColor is used. I know that NVidia's drivers will accept mixing up of various versions of GLSL and currently ignore profile definition (although anything else than core and compatibility cannot be used as the profile), we should be prepare for the time when profile settings will be obeyed more strictly.

    Quote Originally Posted by Pswin
    and 2 shaders have #version 150 ??!!!
    Yes, that means GLSL 1.5 is in use.

    Thank you for the questions! They are very useful for updating the tutorial. Obviously I forgot to explicitly state some facts.

  9. #9
    Member Contributor
    Join Date
    Oct 2007
    Location
    persia,tabriz
    Posts
    71

    Re: Introduction to OpenGL 3.2

    this means:

    i must write two shaders for my application? ( a shader for GLSL 130+ and another for GLSL 110 and 120)

    can i wrote a shader which have two part ( a part for GLSL 130+ and another for GLSL 130- ) for example

    #ifdef VERSION_150
    // GLSL 1.5
    #elif define(ver...)
    // GLSL ...
    .
    .
    .

  10. #10
    Member Contributor
    Join Date
    Oct 2007
    Location
    persia,tabriz
    Posts
    71

    Re: Introduction to OpenGL 3.2

    change minimal.frag to minimal.vert in your toturial:

    Code :
    And the shaders are exactly the same as in previous tutorial.
     
    // minimal.frag
    #version 150 core
     
    in vec3 in_Position;
    in vec3 in_Color;
    out vec3 ex_Color;
     
    void main(void)
    {
          gl_Position = vec4(in_Position, 1.0);
          ex_Color = in_Color;
    }

Page 1 of 2 12 LastLast

Similar Threads

  1. introduction...
    By pdrestorationofcharlotte in forum OpenGL: User Software
    Replies: 0
    Last Post: 04-30-2012, 02:56 AM
  2. Introduction to basic projection
    By henne in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 06-15-2011, 08:44 AM
  3. introduction to programming opengl on os x
    By in forum OpenGL: macOS
    Replies: 4
    Last Post: 01-02-2007, 09:51 PM
  4. Introduction to OpenGL Programming
    By MikeC-nVNews in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-20-2001, 04:41 AM
  5. Introduction to OpenGL - transform help
    By dhbyrne in forum OpenGL: User Software
    Replies: 1
    Last Post: 11-24-2000, 06:16 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