(577946c1f05aaaa2a3f9682001aeb4144386b26b)
#include "qopengltextureblitter.h"
#include <QtOpenGL/QOpenGLShaderProgram>
#include <QtOpenGL/QOpenGLVertexArrayObject>
#include <QtOpenGL/QOpenGLBuffer>
#include <QtGui/QOpenGLContext>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLExtraFunctions>
Go to the source code of this file.
◆ GL_TEXTURE_EXTERNAL_OES
#define GL_TEXTURE_EXTERNAL_OES 0x8D65 |
◆ GL_TEXTURE_HEIGHT
#define GL_TEXTURE_HEIGHT 0x1001 |
◆ GL_TEXTURE_RECTANGLE
#define GL_TEXTURE_RECTANGLE 0x84F5 |
◆ GL_TEXTURE_WIDTH
#define GL_TEXTURE_WIDTH 0x1000 |
◆ targetToProgramIndex()
◆ fragment_shader
static const char fragment_shader |
|
static |
Initial value:=
"varying highp vec2 uv;"
"uniform sampler2D textureSampler;"
"uniform bool swizzle;"
"uniform highp float opacity;"
"void main() {"
" highp vec4 tmpFragColor = texture2D(textureSampler,uv);"
" tmpFragColor.a *= opacity;"
" gl_FragColor = swizzle ? tmpFragColor.bgra : tmpFragColor;"
"}"
Definition at line 107 of file qopengltextureblitter.cpp.
◆ fragment_shader150
static const char fragment_shader150 |
|
static |
Initial value:=
"#version 150 core\n"
"in vec2 uv;"
"out vec4 fragcolor;"
"uniform sampler2D textureSampler;"
"uniform bool swizzle;"
"uniform float opacity;"
"void main() {"
" vec4 tmpFragColor = texture(textureSampler, uv);"
" tmpFragColor.a *= opacity;"
" fragcolor = swizzle ? tmpFragColor.bgra : tmpFragColor;"
"}"
Definition at line 83 of file qopengltextureblitter.cpp.
◆ fragment_shader150_rectangle
static const char fragment_shader150_rectangle |
|
static |
Initial value:=
"#version 150 core\n"
"in vec2 uv;"
"out vec4 fragcolor;"
"uniform sampler2DRect textureSampler;"
"uniform bool swizzle;"
"uniform float opacity;"
"void main() {"
" vec4 tmpFragColor = texture(textureSampler, uv);"
" tmpFragColor.a *= opacity;"
" fragcolor = swizzle ? tmpFragColor.bgra : tmpFragColor;"
"}"
Definition at line 141 of file qopengltextureblitter.cpp.
◆ fragment_shader_external_oes
static const char fragment_shader_external_oes |
|
static |
Initial value:=
"#extension GL_OES_EGL_image_external : require\n"
"varying highp vec2 uv;"
"uniform samplerExternalOES textureSampler;\n"
"uniform bool swizzle;"
"uniform highp float opacity;"
"void main() {"
" highp vec4 tmpFragColor = texture2D(textureSampler, uv);"
" tmpFragColor.a *= opacity;"
" gl_FragColor = swizzle ? tmpFragColor.bgra : tmpFragColor;"
"}"
Definition at line 118 of file qopengltextureblitter.cpp.
◆ fragment_shader_rectangle
static const char fragment_shader_rectangle |
|
static |
Initial value:=
"varying highp vec2 uv;"
"uniform sampler2DRect textureSampler;"
"uniform bool swizzle;"
"uniform highp float opacity;"
"void main() {"
" highp vec4 tmpFragColor = texture2DRect(textureSampler,uv);"
" tmpFragColor.a *= opacity;"
" gl_FragColor = swizzle ? tmpFragColor.bgra : tmpFragColor;"
"}"
Definition at line 130 of file qopengltextureblitter.cpp.
◆ texture_buffer_data
static const GLfloat texture_buffer_data |
|
static |
Initial value:= {
0, 0,
0, 1,
1, 0,
0, 1,
1, 0,
1, 1
}
Definition at line 163 of file qopengltextureblitter.cpp.
◆ vertex_buffer_data
static const GLfloat vertex_buffer_data |
|
static |
Initial value:= {
-1,-1, 0,
-1, 1, 0,
1,-1, 0,
-1, 1, 0,
1,-1, 0,
1, 1, 0
}
Definition at line 154 of file qopengltextureblitter.cpp.
◆ vertex_shader
static const char vertex_shader |
|
static |
Initial value:=
"attribute highp vec3 vertexCoord;"
"attribute highp vec2 textureCoord;"
"varying highp vec2 uv;"
"uniform highp mat4 vertexTransform;"
"uniform highp mat3 textureTransform;"
"void main() {"
" uv = (textureTransform * vec3(textureCoord,1.0)).xy;"
" gl_Position = vertexTransform * vec4(vertexCoord,1.0);"
"}"
Definition at line 96 of file qopengltextureblitter.cpp.
◆ vertex_shader150
static const char vertex_shader150 |
|
static |
Initial value:=
"#version 150 core\n"
"in vec3 vertexCoord;"
"in vec2 textureCoord;"
"out vec2 uv;"
"uniform mat4 vertexTransform;"
"uniform mat3 textureTransform;"
"void main() {"
" uv = (textureTransform * vec3(textureCoord,1.0)).xy;"
" gl_Position = vertexTransform * vec4(vertexCoord,1.0);"
"}"
Definition at line 71 of file qopengltextureblitter.cpp.