Results 1 to 3 of 3

Thread: How to check or set GLSL version?

  1. #1
    Join Date
    Dec 2010
    Location
    Poland. Jelenia Góra.
    Posts
    7
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to check or set GLSL version?

    You can check and set in QGLFormat a version of OpenGL, but how to do the same for GLSL?
    There is glGetString, but for GL_SHADING_LANGUAGE_VERSION you get undeclared identifier

    Qt Code:
    1. const GLubyte* pVersion = glGetString(GL_VERSION);
    2. //const GLubyte* pShaderVersion = glGetString(GL_SHADING_LANGUAGE_VERSION); //undeclared identifier
    To copy to clipboard, switch view to plain text mode 
    Last edited by bartosz.kwasniewski; 19th December 2010 at 16:26.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to check or set GLSL version?

    Qt Code:
    1. #include "glext.h"
    To copy to clipboard, switch view to plain text mode 
    glext.h

  3. The following user says thank you to stampede for this useful post:

    bartosz.kwasniewski (20th December 2010)

  4. #3
    Join Date
    Dec 2010
    Location
    Poland. Jelenia Góra.
    Posts
    7
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to check or set GLSL version?

    Thank you. I tried to include it, but I had errors, but now i put it after<QtOpenGL>, and it's working.

    Qt Code:
    1. #include <QtGui>
    2. #include <QtOpenGL>
    3. #include <GL\glext.h> //Must be placed after "#include <QtOpenGL>"
    4. #include "MyQGLWidget.h"
    5. #include <QDebug>
    6. ...
    To copy to clipboard, switch view to plain text mode 
    And I have: GL_VERSION: 3.3.0 GL_SHADING_LANGUAGE_VERSION: 3.30 NVIDIA via Cg compiler

Similar Threads

  1. QMake Check for Qt version in QMake
    By PaladinOfKaos in forum Qt Tools
    Replies: 1
    Last Post: 24th October 2010, 14:41
  2. renderPixmap() fails to load glsl shaders
    By jscurlee in forum Qt Programming
    Replies: 0
    Last Post: 17th September 2010, 22:12
  3. GLSL shaders, multitexturing and Qt
    By jcox23 in forum Qt Programming
    Replies: 0
    Last Post: 20th January 2010, 19:37
  4. Replies: 5
    Last Post: 5th June 2009, 10:07
  5. GLSL GLWidget and textures
    By themolecule in forum Qt Programming
    Replies: 0
    Last Post: 25th April 2008, 07:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.