Qt 4.8
Functions | Variables
shadereffectitem.cpp File Reference
#include "shadereffectitem.h"
#include "shadereffect.h"
#include "glfunctions.h"
#include <QPainter>
#include <QtOpenGL>

Go to the source code of this file.

Functions

static int size_of_type (GLenum type)
 

Variables

static const char qt_default_fragment_code []
 
static const char qt_default_vertex_code []
 
static const char qt_emptyAttributeName [] = ""
 
static const char qt_postion_attribute_name [] = "qt_Vertex"
 
static const char qt_texcoord_attribute_name [] = "qt_MultiTexCoord0"
 

Function Documentation

◆ size_of_type()

static int size_of_type ( GLenum  type)
inlinestatic

Definition at line 550 of file shadereffectitem.cpp.

Referenced by ShaderEffectItem::bindGeometry().

551 {
552  static int sizes[] = {
553  sizeof(char),
554  sizeof(unsigned char),
555  sizeof(short),
556  sizeof(unsigned short),
557  sizeof(int),
558  sizeof(unsigned int),
559  sizeof(float),
560  2,
561  3,
562  4,
563  sizeof(double)
564  };
565  return sizes[type - GL_BYTE];
566 }
int type
Definition: qmetatype.cpp:239
#define GL_BYTE

Variable Documentation

◆ qt_default_fragment_code

const char qt_default_fragment_code[]
static
Initial value:
=
"varying highp vec2 qt_TexCoord0;\n"
"uniform lowp sampler2D source;\n"
"void main(void)\n"
"{\n"
"gl_FragColor = texture2D(source, qt_TexCoord0.st);\n"
"}\n"

Definition at line 60 of file shadereffectitem.cpp.

Referenced by ShaderEffectItem::updateProperties(), and ShaderEffectItem::updateShaderProgram().

◆ qt_default_vertex_code

const char qt_default_vertex_code[]
static
Initial value:
=
"uniform highp mat4 qt_ModelViewProjectionMatrix;\n"
"attribute highp vec4 qt_Vertex;\n"
"attribute highp vec2 qt_MultiTexCoord0;\n"
"varying highp vec2 qt_TexCoord0;\n"
"void main(void)\n"
"{\n"
"qt_TexCoord0 = qt_MultiTexCoord0;\n"
"gl_Position = qt_ModelViewProjectionMatrix * qt_Vertex;\n"
"}\n"

Definition at line 49 of file shadereffectitem.cpp.

Referenced by ShaderEffectItem::updateProperties(), and ShaderEffectItem::updateShaderProgram().

◆ qt_emptyAttributeName

const char qt_emptyAttributeName[] = ""
static

Definition at line 70 of file shadereffectitem.cpp.

Referenced by ShaderEffectItem::lookThroughShaderCode().

◆ qt_postion_attribute_name

const char qt_postion_attribute_name[] = "qt_Vertex"
static

◆ qt_texcoord_attribute_name

const char qt_texcoord_attribute_name[] = "qt_MultiTexCoord0"
static