Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QGLShaderProgram class allows OpenGL shader programs to be linked and used. More...
Public Member Functions | |
QGLShaderProgram (QObject parent=null) | |
| |
QGLShaderProgram (QGLContext context, QObject parent=null) | |
| |
override void | CreateProxy () |
new bool | AddShader (QGLShader shader) |
| |
new bool | AddShaderFromSourceCode (QGLShader.ShaderTypeBit type, QByteArray source) |
| |
new bool | AddShaderFromSourceCode (QGLShader.ShaderTypeBit type, string source) |
| |
new bool | AddShaderFromSourceFile (QGLShader.ShaderTypeBit type, string fileName) |
| |
new int | AttributeLocation (QByteArray name) |
| |
new int | AttributeLocation (string name) |
| |
new bool | Bind () |
| |
new void | BindAttributeLocation (QByteArray name, int location) |
| |
new void | BindAttributeLocation (string name, int location) |
| |
new void | DisableAttributeArray (int location) |
| |
new void | DisableAttributeArray (string name) |
| |
new void | EnableAttributeArray (int location) |
| |
new void | EnableAttributeArray (string name) |
| |
new bool | IsLinked () |
| |
virtual bool | Link () |
| |
new string | Log () |
| |
new int | MaxGeometryOutputVertices () |
| |
new uint | ProgramId () |
| |
new void | Release () |
| |
new void | RemoveAllShaders () |
| |
new void | RemoveShader (QGLShader shader) |
| |
new void | SetAttributeArray (int location, QVector2D values, int stride=0) |
| |
new void | SetAttributeArray (int location, QVector3D values, int stride=0) |
| |
new void | SetAttributeArray (int location, QVector4D values, int stride=0) |
| |
new void | SetAttributeArray (string name, QVector2D values, int stride=0) |
| |
new void | SetAttributeArray (string name, QVector3D values, int stride=0) |
| |
new void | SetAttributeArray (string name, QVector4D values, int stride=0) |
| |
new void | SetAttributeArray (int location, float values, int tupleSize, int stride=0) |
| |
new void | SetAttributeArray (string name, float values, int tupleSize, int stride=0) |
| |
new void | SetAttributeBuffer (int location, int type, int offset, int tupleSize, int stride=0) |
| |
new void | SetAttributeBuffer (string name, int type, int offset, int tupleSize, int stride=0) |
| |
new void | SetAttributeValue (int location, QVector2D value) |
| |
new void | SetAttributeValue (int location, QVector3D value) |
| |
new void | SetAttributeValue (int location, QVector4D value) |
| |
new void | SetAttributeValue (int location, QColor value) |
| |
new void | SetAttributeValue (string name, QVector2D value) |
| |
new void | SetAttributeValue (string name, QVector3D value) |
| |
new void | SetAttributeValue (string name, QVector4D value) |
| |
new void | SetAttributeValue (string name, QColor value) |
| |
new void | SetAttributeValue (int location, float value) |
| |
new void | SetAttributeValue (string name, float value) |
| |
new void | SetAttributeValue (int location, float values, int columns, int rows) |
| |
new void | SetAttributeValue (string name, float values, int columns, int rows) |
| |
new void | SetAttributeValue (int location, float x, float y) |
| |
new void | SetAttributeValue (string name, float x, float y) |
| |
new void | SetAttributeValue (int location, float x, float y, float z) |
| |
new void | SetAttributeValue (string name, float x, float y, float z) |
| |
new void | SetAttributeValue (int location, float x, float y, float z, float w) |
| |
new void | SetAttributeValue (string name, float x, float y, float z, float w) |
| |
new void | SetUniformValue (int location, QVector2D value) |
| |
new void | SetUniformValue (int location, QVector3D value) |
| |
new void | SetUniformValue (int location, QVector4D value) |
| |
new void | SetUniformValue (int location, QColor color) |
| |
new void | SetUniformValue (int location, QPoint point) |
| |
new void | SetUniformValue (int location, QPointF point) |
| |
new void | SetUniformValue (int location, QSize size) |
| |
new void | SetUniformValue (int location, QSizeF size) |
| |
new void | SetUniformValue (int location, QMatrix4x4 value) |
| |
new void | SetUniformValue (int location, QTransform value) |
| |
new void | SetUniformValue (string name, QVector2D value) |
| |
new void | SetUniformValue (string name, QVector3D value) |
| |
new void | SetUniformValue (string name, QVector4D value) |
| |
new void | SetUniformValue (string name, QColor color) |
| |
new void | SetUniformValue (string name, QPoint point) |
| |
new void | SetUniformValue (string name, QPointF point) |
| |
new void | SetUniformValue (string name, QSize size) |
| |
new void | SetUniformValue (string name, QSizeF size) |
| |
new void | SetUniformValue (string name, QMatrix4x4 value) |
| |
new void | SetUniformValue (string name, QTransform value) |
| |
new void | SetUniformValue (int location, float value) |
| |
new void | SetUniformValue (int location, int value) |
| |
new void | SetUniformValue (int location, uint value) |
| |
new void | SetUniformValue (string name, float value) |
| |
new void | SetUniformValue (string name, int value) |
| |
new void | SetUniformValue (string name, uint value) |
| |
new void | SetUniformValue (int location, float x, float y) |
| |
new void | SetUniformValue (string name, float x, float y) |
| |
new void | SetUniformValue (int location, float x, float y, float z) |
| |
new void | SetUniformValue (string name, float x, float y, float z) |
| |
new void | SetUniformValue (int location, float x, float y, float z, float w) |
| |
new void | SetUniformValue (string name, float x, float y, float z, float w) |
| |
new void | SetUniformValueArray (int location, QVector2D values, int count) |
| |
new void | SetUniformValueArray (int location, QVector3D values, int count) |
| |
new void | SetUniformValueArray (int location, QVector4D values, int count) |
| |
new void | SetUniformValueArray (int location, QMatrix4x4 values, int count) |
| |
new void | SetUniformValueArray (string name, QVector2D values, int count) |
| |
new void | SetUniformValueArray (string name, QVector3D values, int count) |
| |
new void | SetUniformValueArray (string name, QVector4D values, int count) |
| |
new void | SetUniformValueArray (string name, QMatrix4x4 values, int count) |
| |
new void | SetUniformValueArray (int location, int values, int count) |
| |
new void | SetUniformValueArray (int location, uint values, int count) |
| |
new void | SetUniformValueArray (string name, int values, int count) |
| |
new void | SetUniformValueArray (string name, uint values, int count) |
| |
new void | SetUniformValueArray (int location, float values, int count, int tupleSize) |
| |
new void | SetUniformValueArray (string name, float values, int count, int tupleSize) |
| |
new System.Collections.Generic.List < QGLShader > | Shaders () |
| |
new int | UniformLocation (QByteArray name) |
| |
new int | UniformLocation (string name) |
| |
new void | Dispose () |
Public Member Functions inherited from QtCore.QObject | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new System.Collections.Generic.List < QObject > | Children () |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
new System.Collections.Generic.List < QByteArray > | DynamicPropertyNames () |
| |
virtual bool | OnEvent (QEvent arg1) |
| |
virtual bool | EventFilter (QObject arg1, QEvent arg2) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject arg1) |
| |
new bool | IsWidgetType () |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject arg1) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new bool | SignalsBlocked () |
| |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
Public Member Functions inherited from QtCore.Qt | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
Static Public Member Functions | |
static bool | HasOpenGLShaderPrograms (QGLContext context=null) |
| |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtCore.QObject | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static uint | RegisterUserData () |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
Static Public Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
static QDataStream | Read (QDataStream arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
static double | qAcos (double v) |
static void | qAddPostRoutine (System.Action arg1) |
static string | qAppName () |
static double | qAsin (double v) |
static double | qAtan (double v) |
static double | qAtan2 (double x, double y) |
static void | qBadAlloc () |
static int | qCeil (double v) |
static ushort | qChecksum (string s, uint len) |
static QByteArray | qCompress (QByteArray data) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
static double | qCos (double v) |
static double | qExp (double v) |
static double | qFabs (double v) |
static double | qFastCos (double x) |
static double | qFastSin (double x) |
static string | qFlagLocation (string method) |
static int | qFloor (double v) |
static bool | qFuzzyCompare (double p1, double p2) |
static bool | qFuzzyCompare (float p1, float p2) |
static bool | qFuzzyIsNull (double d) |
static bool | qFuzzyIsNull (float f) |
static uint | qHash (QBitArray key) |
static uint | qHash (QChar key) |
static uint | qHash (QStringRef key) |
static uint | qHash (QUrl url) |
static uint | qHash (QPersistentModelIndex index) |
static uint | qHash (QByteArray key) |
static uint | qHash (QModelIndex index) |
static uint | qHash (uint key) |
static uint | qHash (sbyte key) |
static uint | qHash (byte key) |
static uint | qHash (short key) |
static uint | qHash (NativeLong key) |
static uint | qHash (ushort key) |
static uint | qHash (long key) |
static uint | qHash (ulong key) |
static uint | qHash (int key) |
static uint | qHash (string key) |
static uint | qHash (NativeULong key) |
static double | qInf () |
static Qt.ActionQtMsgTypeString | qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | qIntCast (float f) |
static int | qIntCast (double f) |
static bool | qIsFinite (double d) |
static bool | qIsFinite (float f) |
static bool | qIsInf (float f) |
static bool | qIsInf (double d) |
static bool | qIsNaN (float f) |
static bool | qIsNaN (double d) |
static bool | qIsNull (float f) |
static bool | qIsNull (double d) |
static double | qLn (double v) |
static double | qPow (double x, double y) |
static double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
static double | qSin (double v) |
static double | qSqrt (double v) |
static bool | qStringComparisonHelper (QStringRef s1, string s2) |
static double | qTan (double v) |
static QByteArray | qUncompress (QByteArray data) |
static QByteArray | qUncompress (Pointer< byte > data, int nbytes) |
static string | qVersion () |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static int | Qrand () |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
static Pointer< sbyte > | Qstrdup (string arg1) |
static int | Qstricmp (string arg1, string arg2) |
static uint | Qstrlen (string str) |
static int | Qstrncmp (string str1, string str2, uint len) |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
static int | Qstrnicmp (string arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Protected Member Functions | |
QGLShaderProgram (System.Type dummy) | |
Protected Member Functions inherited from QtCore.QObject | |
QObject (System.Type dummy) | |
virtual void | OnChildEvent (QChildEvent arg1) |
| |
virtual void | ConnectNotify (string signal) |
| |
virtual void | OnCustomEvent (QEvent arg1) |
| |
new void | OnDestroyed (QObject arg1=null) |
| |
virtual void | DisconnectNotify (string signal) |
| |
new int | Receivers (string signal) |
| |
new QObject | Sender () |
| |
new int | SenderSignalIndex () |
| |
virtual void | OnTimerEvent (QTimerEvent arg1) |
| |
Properties | |
new int | GeometryInputType [get, set] |
| |
new int | GeometryOutputType [get, set] |
| |
new int | GeometryOutputVertexCount [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQGLShaderProgramSignals | Emit [get] |
Properties inherited from QtCore.QObject | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
new QObject | Parent [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
The QGLShaderProgram class allows OpenGL shader programs to be linked and used.
Introduction
This class supports shader programs written in the OpenGL Shading Language (GLSL) and in the OpenGL/ES Shading Language (GLSL/ES).
QGLShader and QGLShaderProgram shelter the programmer from the details of compiling and linking vertex and fragment shaders.
The following example creates a vertex shader program using the supplied source code. Once compiled and linked, the shader program is activated in the current QGLContext by calling QGLShaderProgram::bind():
QGLShader shader(QGLShader::Vertex);
shader.compileSourceCode(code);
QGLShaderProgram program(context);
program.addShader(shader);
program.link();
program.bind();
Writing portable shaders
Shader programs can be difficult to reuse across OpenGL implementations because of varying levels of support for standard vertex attributes and uniform variables. In particular, GLSL/ES lacks all of the standard variables that are present on desktop OpenGL systems: gl_Vertex, gl_Normal, gl_Color, and so on. Desktop OpenGL lacks the variable qualifiers highp, mediump, and lowp.
The QGLShaderProgram class makes the process of writing portable shaders easier by prefixing all shader programs with the following lines on desktop OpenGL:
#define highp
#define mediump
#define lowp
This makes it possible to run most GLSL/ES shader programs on desktop systems. The programmer should restrict themselves to just features that are present in GLSL/ES, and avoid standard variable names that only work on the desktop.
Simple shader example
program.addShaderFromSourceCode(QGLShader::Vertex,
"attribute highp vec4 vertex;\n"
"uniform highp mat4 matrix;\n"
"void main(void)\n"
"{\n"
" gl_Position = matrix * vertex;\n"
"}");
program.addShaderFromSourceCode(QGLShader::Fragment,
"uniform mediump vec4 color;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = color;\n"
"}");
program.link();
program.bind();
int vertexLocation = program.attributeLocation("vertex");
int matrixLocation = program.uniformLocation("matrix");
int colorLocation = program.uniformLocation("color");
With the above shader program active, we can draw a green triangle as follows:
static GLfloat const triangleVertices[] = {
60.0f, 10.0f, 0.0f,
110.0f, 110.0f, 0.0f,
10.0f, 110.0f, 0.0f
};
QColor color(0, 255, 0, 255);
QMatrix4x4 pmvMatrix;
pmvMatrix.ortho(rect());
program.enableAttributeArray(vertexLocation);
program.setAttributeArray(vertexLocation, triangleVertices, 3);
program.setUniformValue(matrixLocation, pmvMatrix);
program.setUniformValue(colorLocation, color);
glDrawArrays(GL_TRIANGLES, 0, 3);
program.disableAttributeArray(vertexLocation);
Binary shaders and programs
Binary shaders may be specified using glShaderBinary() on the return value from QGLShader::shaderId(). The QGLShader instance containing the binary can then be added to the shader program with addShader() and linked in the usual fashion with link().
Binary programs may be specified using glProgramBinaryOES() on the return value from programId(). Then the application should call link(), which will notice that the program has already been specified and linked, allowing other operations to be performed on the shader program.
See also QGLShader.
|
protected |
QtOpenGL.QGLShaderProgram.QGLShaderProgram | ( | QObject | parent = null | ) |
Constructs a new shader program and attaches it to parent. The program will be invalid until addShader() is called.
The shader program will be associated with the current QGLContext.
See also addShader().
QtOpenGL.QGLShaderProgram.QGLShaderProgram | ( | QGLContext | context, |
QObject | parent = null |
||
) |
Constructs a new shader program and attaches it to parent. The program will be invalid until addShader() is called.
The shader program will be associated with context.
See also addShader().
new bool QtOpenGL.QGLShaderProgram.AddShader | ( | QGLShader | shader | ) |
Adds a compiled shader to this shader program. Returns true if the shader could be added, or false otherwise.
Ownership of the shader object remains with the caller. It will not be deleted when this QGLShaderProgram instance is deleted. This allows the caller to add the same shader to multiple shader programs.
See also addShaderFromSourceCode(), addShaderFromSourceFile(), removeShader(), link(), and removeAllShaders().
new bool QtOpenGL.QGLShaderProgram.AddShaderFromSourceCode | ( | QGLShader.ShaderTypeBit | type, |
QByteArray | source | ||
) |
Compiles source as a shader of the specified type and adds it to this shader program. Returns true if compilation was successful, false otherwise. The compilation errors and warnings will be made available via log().
This function is intended to be a short-cut for quickly adding vertex and fragment shaders to a shader program without creating an instance of QGLShader first.
See also addShader(), addShaderFromSourceFile(), removeShader(), link(), log(), and removeAllShaders().
new bool QtOpenGL.QGLShaderProgram.AddShaderFromSourceCode | ( | QGLShader.ShaderTypeBit | type, |
string | source | ||
) |
Compiles source as a shader of the specified type and adds it to this shader program. Returns true if compilation was successful, false otherwise. The compilation errors and warnings will be made available via log().
This function is intended to be a short-cut for quickly adding vertex and fragment shaders to a shader program without creating an instance of QGLShader first.
See also addShader(), addShaderFromSourceFile(), removeShader(), link(), log(), and removeAllShaders().
new bool QtOpenGL.QGLShaderProgram.AddShaderFromSourceFile | ( | QGLShader.ShaderTypeBit | type, |
string | fileName | ||
) |
Compiles the contents of fileName as a shader of the specified type and adds it to this shader program. Returns true if compilation was successful, false otherwise. The compilation errors and warnings will be made available via log().
This function is intended to be a short-cut for quickly adding vertex and fragment shaders to a shader program without creating an instance of QGLShader first.
See also addShader() and addShaderFromSourceCode().
new int QtOpenGL.QGLShaderProgram.AttributeLocation | ( | QByteArray | name | ) |
This is an overloaded function.
Returns the location of the attribute name within this shader program's parameter list. Returns -1 if name is not a valid attribute for this shader program.
See also uniformLocation() and bindAttributeLocation().
new int QtOpenGL.QGLShaderProgram.AttributeLocation | ( | string | name | ) |
Returns the location of the attribute name within this shader program's parameter list. Returns -1 if name is not a valid attribute for this shader program.
See also uniformLocation() and bindAttributeLocation().
new bool QtOpenGL.QGLShaderProgram.Bind | ( | ) |
Binds this shader program to the active QGLContext and makes it the current shader program. Any previously bound shader program is released. This is equivalent to calling glUseProgram() on programId(). Returns true if the program was successfully bound; false otherwise. If the shader program has not yet been linked, or it needs to be re-linked, this function will call link().
See also link() and release().
new void QtOpenGL.QGLShaderProgram.BindAttributeLocation | ( | QByteArray | name, |
int | location | ||
) |
This is an overloaded function.
Binds the attribute name to the specified location. This function can be called before or after the program has been linked. Any attributes that have not been explicitly bound when the program is linked will be assigned locations automatically.
When this function is called after the program has been linked, the program will need to be relinked for the change to take effect.
See also attributeLocation().
new void QtOpenGL.QGLShaderProgram.BindAttributeLocation | ( | string | name, |
int | location | ||
) |
Binds the attribute name to the specified location. This function can be called before or after the program has been linked. Any attributes that have not been explicitly bound when the program is linked will be assigned locations automatically.
When this function is called after the program has been linked, the program will need to be relinked for the change to take effect.
See also attributeLocation().
|
virtual |
Reimplemented from QtCore.QObject.
new void QtOpenGL.QGLShaderProgram.DisableAttributeArray | ( | int | location | ) |
Disables the vertex array at location in this shader program that was enabled by a previous call to enableAttributeArray().
See also enableAttributeArray(), setAttributeArray(), setAttributeValue(), and setUniformValue().
new void QtOpenGL.QGLShaderProgram.DisableAttributeArray | ( | string | name | ) |
This is an overloaded function.
Disables the vertex array called name in this shader program that was enabled by a previous call to enableAttributeArray().
See also enableAttributeArray(), setAttributeArray(), setAttributeValue(), and setUniformValue().
new void QtOpenGL.QGLShaderProgram.Dispose | ( | ) |
new void QtOpenGL.QGLShaderProgram.EnableAttributeArray | ( | int | location | ) |
Enables the vertex array at location in this shader program so that the value set by setAttributeArray() on location will be used by the shader program.
See also disableAttributeArray(), setAttributeArray(), setAttributeValue(), and setUniformValue().
new void QtOpenGL.QGLShaderProgram.EnableAttributeArray | ( | string | name | ) |
This is an overloaded function.
Enables the vertex array called name in this shader program so that the value set by setAttributeArray() on name will be used by the shader program.
See also disableAttributeArray(), setAttributeArray(), setAttributeValue(), and setUniformValue().
|
static |
Returns true if shader programs written in the OpenGL Shading Language (GLSL) are supported on this system; false otherwise.
The context is used to resolve the GLSL extensions. If context is null, then QGLContext::currentContext() is used.
new bool QtOpenGL.QGLShaderProgram.IsLinked | ( | ) |
Returns true if this shader program has been linked; false otherwise.
See also link().
|
virtual |
Links together the shaders that were added to this program with addShader(). Returns true if the link was successful or false otherwise. If the link failed, the error messages can be retrieved with log().
Subclasses can override this function to initialize attributes and uniform variables for use in specific shader programs.
If the shader program was already linked, calling this function again will force it to be re-linked.
See also addShader() and log().
new string QtOpenGL.QGLShaderProgram.Log | ( | ) |
Returns the errors and warnings that occurred during the last link() or addShader() with explicitly specified source code.
See also link().
new int QtOpenGL.QGLShaderProgram.MaxGeometryOutputVertices | ( | ) |
Returns the hardware limit for how many vertices a geometry shader can output.
This function was introduced in Qt 4.7.
See also setGeometryOutputVertexCount().
new uint QtOpenGL.QGLShaderProgram.ProgramId | ( | ) |
Returns the OpenGL identifier associated with this shader program.
See also QGLShader::shaderId().
new void QtOpenGL.QGLShaderProgram.Release | ( | ) |
Releases the active shader program from the current QGLContext. This is equivalent to calling glUseProgram(0).
See also bind().
new void QtOpenGL.QGLShaderProgram.RemoveAllShaders | ( | ) |
Removes all of the shaders that were added to this program previously. The QGLShader objects for the shaders will not be deleted if they were constructed externally. QGLShader objects that are constructed internally by QGLShaderProgram will be deleted.
See also addShader() and removeShader().
new void QtOpenGL.QGLShaderProgram.RemoveShader | ( | QGLShader | shader | ) |
Removes shader from this shader program. The object is not deleted.
See also addShader(), link(), and removeAllShaders().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | int | location, |
QVector2D | values, | ||
int | stride = 0 |
||
) |
Sets an array of 2D vertex values on the attribute at location in this shader program. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | int | location, |
QVector3D | values, | ||
int | stride = 0 |
||
) |
Sets an array of 3D vertex values on the attribute at location in this shader program. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | int | location, |
QVector4D | values, | ||
int | stride = 0 |
||
) |
Sets an array of 4D vertex values on the attribute at location in this shader program. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | string | name, |
QVector2D | values, | ||
int | stride = 0 |
||
) |
This is an overloaded function.
Sets an array of 2D vertex values on the attribute called name in this shader program. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | string | name, |
QVector3D | values, | ||
int | stride = 0 |
||
) |
This is an overloaded function.
Sets an array of 3D vertex values on the attribute called name in this shader program. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | string | name, |
QVector4D | values, | ||
int | stride = 0 |
||
) |
This is an overloaded function.
Sets an array of 4D vertex values on the attribute called name in this shader program. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | int | location, |
float | values, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
Sets an array of vertex values on the attribute at location in this shader program. The tupleSize indicates the number of components per vertex (1, 2, 3, or 4), and the stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeArray | ( | string | name, |
float | values, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
This is an overloaded function.
Sets an array of vertex values on the attribute called name in this shader program. The tupleSize indicates the number of components per vertex (1, 2, 3, or 4), and the stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
See also setAttributeValue(), setUniformValue(), enableAttributeArray(), and disableAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeBuffer | ( | int | location, |
int | type, | ||
int | offset, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
Sets an array of vertex values on the attribute at location in this shader program, starting at a specific offset in the currently bound vertex buffer. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in the value array.
The type indicates the type of elements in the vertex value array, usually GL_FLOAT, GL_UNSIGNED_BYTE, etc. The tupleSize indicates the number of components per vertex: 1, 2, 3, or 4.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
This function was introduced in Qt 4.7.
See also setAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeBuffer | ( | string | name, |
int | type, | ||
int | offset, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
This is an overloaded function.
Sets an array of vertex values on the attribute called name in this shader program, starting at a specific offset in the currently bound vertex buffer. The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in the value array.
The type indicates the type of elements in the vertex value array, usually GL_FLOAT, GL_UNSIGNED_BYTE, etc. The tupleSize indicates the number of components per vertex: 1, 2, 3, or 4.
The array will become active when enableAttributeArray() is called on the name. Otherwise the value specified with setAttributeValue() for name will be used.
This function was introduced in Qt 4.7.
See also setAttributeArray().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
QVector2D | value | ||
) |
Sets the attribute at location in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
QVector3D | value | ||
) |
Sets the attribute at location in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
QVector4D | value | ||
) |
Sets the attribute at location in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
QColor | value | ||
) |
Sets the attribute at location in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
QVector2D | value | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
QVector3D | value | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
QVector4D | value | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
QColor | value | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
float | value | ||
) |
Sets the attribute at location in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
float | value | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to value.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
float | values, | ||
int | columns, | ||
int | rows | ||
) |
Sets the attribute at location in the current context to the contents of values, which contains columns elements, each consisting of rows elements. The rows value should be 1, 2, 3, or 4. This function is typically used to set matrix values and column vectors.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
float | values, | ||
int | columns, | ||
int | rows | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to the contents of values, which contains columns elements, each consisting of rows elements. The rows value should be 1, 2, 3, or 4. This function is typically used to set matrix values and column vectors.
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
float | x, | ||
float | y | ||
) |
Sets the attribute at location in the current context to the 2D vector (x, y).
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
float | x, | ||
float | y | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to the 2D vector (x, y).
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the attribute at location in the current context to the 3D vector (x, y, z).
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
float | x, | ||
float | y, | ||
float | z | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to the 3D vector (x, y, z).
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | int | location, |
float | x, | ||
float | y, | ||
float | z, | ||
float | w | ||
) |
Sets the attribute at location in the current context to the 4D vector (x, y, z, w).
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetAttributeValue | ( | string | name, |
float | x, | ||
float | y, | ||
float | z, | ||
float | w | ||
) |
This is an overloaded function.
Sets the attribute called name in the current context to the 4D vector (x, y, z, w).
See also setUniformValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QVector2D | value | ||
) |
Sets the uniform variable at location in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QVector3D | value | ||
) |
Sets the uniform variable at location in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QVector4D | value | ||
) |
Sets the uniform variable at location in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QColor | color | ||
) |
Sets the uniform variable at location in the current context to the red, green, blue, and alpha components of color.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QPoint | point | ||
) |
Sets the uniform variable at location in the current context to the x and y coordinates of point.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QPointF | point | ||
) |
Sets the uniform variable at location in the current context to the x and y coordinates of point.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QSize | size | ||
) |
Sets the uniform variable at location in the current context to the width and height of the given size.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QSizeF | size | ||
) |
Sets the uniform variable at location in the current context to the width and height of the given size.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QMatrix4x4 | value | ||
) |
Sets the uniform variable at location in the current context to a 4x4 matrix value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
QTransform | value | ||
) |
Sets the uniform variable at location in the current context to a 3x3 transformation matrix value that is specified as a QTransform value.
To set a QTransform value as a 4x4 matrix in a shader, use setUniformValue(location, QMatrix4x4(value)).
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QVector2D | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QVector3D | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QVector4D | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QColor | color | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to the red, green, blue, and alpha components of color.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QPoint | point | ||
) |
This is an overloaded function.
Sets the uniform variable associated with name in the current context to the x and y coordinates of point.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QPointF | point | ||
) |
This is an overloaded function.
Sets the uniform variable associated with name in the current context to the x and y coordinates of point.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QSize | size | ||
) |
This is an overloaded function.
Sets the uniform variable associated with name in the current context to the width and height of the given size.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QSizeF | size | ||
) |
This is an overloaded function.
Sets the uniform variable associated with name in the current context to the width and height of the given size.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QMatrix4x4 | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to a 4x4 matrix value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
QTransform | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to a 3x3 transformation matrix value that is specified as a QTransform value.
To set a QTransform value as a 4x4 matrix in a shader, use setUniformValue(name, QMatrix4x4(value)).
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
float | value | ||
) |
Sets the uniform variable at location in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
int | value | ||
) |
Sets the uniform variable at location in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
uint | value | ||
) |
Sets the uniform variable at location in the current context to value. This function should be used when setting sampler values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
float | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
int | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to value.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
uint | value | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to value. This function should be used when setting sampler values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
float | x, | ||
float | y | ||
) |
Sets the uniform variable at location in the current context to the 2D vector (x, y).
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
float | x, | ||
float | y | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to the 2D vector (x, y).
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the uniform variable at location in the current context to the 3D vector (x, y, z).
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
float | x, | ||
float | y, | ||
float | z | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to the 3D vector (x, y, z).
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | int | location, |
float | x, | ||
float | y, | ||
float | z, | ||
float | w | ||
) |
Sets the uniform variable at location in the current context to the 4D vector (x, y, z, w).
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValue | ( | string | name, |
float | x, | ||
float | y, | ||
float | z, | ||
float | w | ||
) |
This is an overloaded function.
Sets the uniform variable called name in the current context to the 4D vector (x, y, z, w).
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | int | location, |
QVector2D | values, | ||
int | count | ||
) |
Sets the uniform variable array at location in the current context to the count 2D vector elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | int | location, |
QVector3D | values, | ||
int | count | ||
) |
Sets the uniform variable array at location in the current context to the count 3D vector elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | int | location, |
QVector4D | values, | ||
int | count | ||
) |
Sets the uniform variable array at location in the current context to the count 4D vector elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | int | location, |
QMatrix4x4 | values, | ||
int | count | ||
) |
Sets the uniform variable array at location in the current context to the count 4x4 matrix elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | string | name, |
QVector2D | values, | ||
int | count | ||
) |
This is an overloaded function.
Sets the uniform variable array called name in the current context to the count 2D vector elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | string | name, |
QVector3D | values, | ||
int | count | ||
) |
This is an overloaded function.
Sets the uniform variable array called name in the current context to the count 3D vector elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | string | name, |
QVector4D | values, | ||
int | count | ||
) |
This is an overloaded function.
Sets the uniform variable array called name in the current context to the count 4D vector elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | string | name, |
QMatrix4x4 | values, | ||
int | count | ||
) |
This is an overloaded function.
Sets the uniform variable array called name in the current context to the count 4x4 matrix elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | int | location, |
int | values, | ||
int | count | ||
) |
Sets the uniform variable array at location in the current context to the count elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | int | location, |
uint | values, | ||
int | count | ||
) |
Sets the uniform variable array at location in the current context to the count elements of values. This overload should be used when setting an array of sampler values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | string | name, |
int | values, | ||
int | count | ||
) |
This is an overloaded function.
Sets the uniform variable array called name in the current context to the count elements of values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | string | name, |
uint | values, | ||
int | count | ||
) |
This is an overloaded function.
Sets the uniform variable array called name in the current context to the count elements of values. This overload should be used when setting an array of sampler values.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | int | location, |
float | values, | ||
int | count, | ||
int | tupleSize | ||
) |
Sets the uniform variable array at location in the current context to the count elements of values. Each element has tupleSize components. The tupleSize must be 1, 2, 3, or 4.
See also setAttributeValue().
new void QtOpenGL.QGLShaderProgram.SetUniformValueArray | ( | string | name, |
float | values, | ||
int | count, | ||
int | tupleSize | ||
) |
This is an overloaded function.
Sets the uniform variable array called name in the current context to the count elements of values. Each element has tupleSize components. The tupleSize must be 1, 2, 3, or 4.
See also setAttributeValue().
new System.Collections.Generic.List<QGLShader> QtOpenGL.QGLShaderProgram.Shaders | ( | ) |
Returns a list of all shaders that have been added to this shader program using addShader().
See also addShader() and removeShader().
|
static |
|
static |
|
static |
|
static |
new int QtOpenGL.QGLShaderProgram.UniformLocation | ( | QByteArray | name | ) |
This is an overloaded function.
Returns the location of the uniform variable name within this shader program's parameter list. Returns -1 if name is not a valid uniform variable for this shader program.
See also attributeLocation().
new int QtOpenGL.QGLShaderProgram.UniformLocation | ( | string | name | ) |
Returns the location of the uniform variable name within this shader program's parameter list. Returns -1 if name is not a valid uniform variable for this shader program.
See also attributeLocation().
|
getprotected |
|
getset |
Returns the geometry shader input type, if active.
This parameter takes effect the next time the program is linked.
This function was introduced in Qt 4.7.
Sets the input type from inputType.
This parameter takes effect the next time the program is linked.
|
getset |
Returns the geometry shader output type, if active.
This parameter takes effect the next time the program is linked.
This function was introduced in Qt 4.7.
Sets the output type from the geometry shader, if active, to outputType.
This parameter takes effect the next time the program is linked.
This function was introduced in Qt 4.7.
|
getset |
Returns the maximum number of vertices the current geometry shader program will produce, if active.
This parameter takes effect the ntext time the program is linked.
This function was introduced in Qt 4.7.
Sets the maximum number of vertices the current geometry shader program will produce, if active, to count.
This parameter takes effect the next time the program is linked.
This function was introduced in Qt 4.7.
|
staticget |