Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/opengl/qglshaderprogram.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    5555QT_MODULE(OpenGL)
    5656
    57 #if !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
     57#if !defined(QT_OPENGL_ES_1)
    5858
    5959class QGLShaderProgram;
     
    6767    {
    6868        Vertex          = 0x0001,
    69         Fragment        = 0x0002
     69        Fragment        = 0x0002,
     70        Geometry        = 0x0004
    7071    };
    7172    Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit)
     
    8990    GLuint shaderId() const;
    9091
     92    static bool hasOpenGLShaders(ShaderType type, const QGLContext *context = 0);
     93
    9194private:
    9295    friend class QGLShaderProgram;
     
    100103
    101104class QGLShaderProgramPrivate;
     105
     106#ifndef GL_EXT_geometry_shader4
     107#  define GL_LINES_ADJACENCY_EXT 0xA
     108#  define GL_LINE_STRIP_ADJACENCY_EXT 0xB
     109#  define GL_TRIANGLES_ADJACENCY_EXT 0xC
     110#  define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD
     111#endif
     112
    102113
    103114class Q_OPENGL_EXPORT QGLShaderProgram : public QObject
     
    128139
    129140    GLuint programId() const;
     141
     142    int maxGeometryOutputVertices() const;
     143
     144    void setGeometryOutputVertexCount(int count);
     145    int geometryOutputVertexCount() const;
     146
     147    void setGeometryInputType(GLenum inputType);
     148    GLenum geometryInputType() const;
     149
     150    void setGeometryOutputType(GLenum outputType);
     151    GLenum geometryOutputType() const;
    130152
    131153    void bindAttributeLocation(const char *name, int location);
     
    166188        (int location, const QVector4D *values, int stride = 0);
    167189    void setAttributeArray
     190        (int location, GLenum type, const void *values, int tupleSize, int stride = 0);
     191    void setAttributeArray
    168192        (const char *name, const GLfloat *values, int tupleSize, int stride = 0);
    169193    void setAttributeArray
     
    173197    void setAttributeArray
    174198        (const char *name, const QVector4D *values, int stride = 0);
     199    void setAttributeArray
     200        (const char *name, GLenum type, const void *values, int tupleSize, int stride = 0);
     201
     202    void setAttributeBuffer
     203        (int location, GLenum type, int offset, int tupleSize, int stride = 0);
     204    void setAttributeBuffer
     205        (const char *name, GLenum type, int offset, int tupleSize, int stride = 0);
     206
     207#ifdef Q_MAC_COMPAT_GL_FUNCTIONS
     208    void setAttributeArray
     209        (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0);
     210    void setAttributeArray
     211        (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0);
     212    void setAttributeBuffer
     213        (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0);
     214    void setAttributeBuffer
     215        (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0);
     216#endif
    175217
    176218    void enableAttributeArray(int location);
     
    217259    void setUniformValue(int location, const QMatrix4x3& value);
    218260    void setUniformValue(int location, const QMatrix4x4& value);
     261    void setUniformValue(int location, const GLfloat value[2][2]);
     262    void setUniformValue(int location, const GLfloat value[3][3]);
    219263    void setUniformValue(int location, const GLfloat value[4][4]);
    220264    void setUniformValue(int location, const QTransform& value);
     
    243287    void setUniformValue(const char *name, const QMatrix4x3& value);
    244288    void setUniformValue(const char *name, const QMatrix4x4& value);
     289    void setUniformValue(const char *name, const GLfloat value[2][2]);
     290    void setUniformValue(const char *name, const GLfloat value[3][3]);
    245291    void setUniformValue(const char *name, const GLfloat value[4][4]);
    246292    void setUniformValue(const char *name, const QTransform& value);
Note: See TracChangeset for help on using the changeset viewer.