Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwingltexture.h
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 54 | public: | |||
---|---|---|---|---|---|
79 | /** | 79 | /** | ||
80 | * Specifies which component of a texel is placed in each respective | 80 | * Specifies which component of a texel is placed in each respective | ||
81 | * component of the vector returned to the shader. | 81 | * component of the vector returned to the shader. | ||
82 | * | 82 | * | ||
83 | * Valid values are GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_ONE and GL_ZERO. | 83 | * Valid values are GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_ONE and GL_ZERO. | ||
84 | * | 84 | * | ||
85 | * @see swizzleSupported() | 85 | * @see swizzleSupported() | ||
86 | * @since 5.2 | 86 | * @since 5.2 | ||
87 | */ | 87 | **/ | ||
88 | void setSwizzle(GLenum red, GLenum green, GLenum blue, GLenum alpha); | 88 | void setSwizzle(GLenum red, GLenum green, GLenum blue, GLenum alpha); | ||
89 | 89 | | |||
90 | /** | 90 | /** | ||
91 | * Returns a matrix that transforms texture coordinates of the given type, | 91 | * Returns a matrix that transforms texture coordinates of the given type, | ||
92 | * taking the texture target and the y-inversion flag into account. | 92 | * taking the texture target and the y-inversion flag into account. | ||
93 | * | 93 | * | ||
94 | * @since 4.11 | 94 | * @since 4.11 | ||
95 | */ | 95 | **/ | ||
96 | QMatrix4x4 matrix(TextureCoordinateType type) const; | 96 | QMatrix4x4 matrix(TextureCoordinateType type) const; | ||
97 | 97 | | |||
98 | void update(const QImage& image, const QPoint &offset = QPoint(0, 0), const QRect &src = QRect()); | 98 | void update(const QImage& image, const QPoint &offset = QPoint(0, 0), const QRect &src = QRect()); | ||
99 | virtual void discard(); | 99 | virtual void discard(); | ||
100 | void bind(); | 100 | void bind(); | ||
101 | void unbind(); | 101 | void unbind(); | ||
102 | void render(QRegion region, const QRect& rect, bool hardwareClipping = false); | 102 | void render(QRegion region, const QRect& rect, bool hardwareClipping = false); | ||
103 | 103 | | |||
104 | GLuint texture() const; | 104 | GLuint texture() const; | ||
105 | GLenum target() const; | 105 | GLenum target() const; | ||
106 | GLenum filter() const; | 106 | GLenum filter() const; | ||
107 | GLenum internalFormat() const; | 107 | GLenum internalFormat() const; | ||
108 | 108 | | |||
109 | /** @short | 109 | /** @short | ||
110 | * Make the texture fully transparent | 110 | * Make the texture fully transparent | ||
111 | * Warning: this clobbers the current framebuffer binding except on fglrx | 111 | * Warning: this clobbers the current framebuffer binding except on fglrx | ||
112 | */ | 112 | **/ | ||
113 | void clear(); | 113 | void clear(); | ||
114 | bool isDirty() const; | 114 | bool isDirty() const; | ||
115 | void setFilter(GLenum filter); | 115 | void setFilter(GLenum filter); | ||
116 | void setWrapMode(GLenum mode); | 116 | void setWrapMode(GLenum mode); | ||
117 | void setDirty(); | 117 | void setDirty(); | ||
118 | 118 | | |||
119 | void generateMipmaps(); | 119 | void generateMipmaps(); | ||
120 | 120 | | |||
121 | static bool framebufferObjectSupported(); | 121 | static bool framebufferObjectSupported(); | ||
122 | 122 | | |||
123 | /** | 123 | /** | ||
124 | * Returns true if texture swizzle is supported, and false otherwise | 124 | * Returns true if texture swizzle is supported, and false otherwise | ||
125 | * | 125 | * | ||
126 | * Texture swizzle requires OpenGL 3.3, GL_ARB_texture_swizzle, or OpenGL ES 3.0. | 126 | * Texture swizzle requires OpenGL 3.3, GL_ARB_texture_swizzle, or OpenGL ES 3.0. | ||
127 | * | 127 | * | ||
128 | * @since 5.2 | 128 | * @since 5.2 | ||
129 | */ | 129 | **/ | ||
130 | static bool supportsSwizzle(); | 130 | static bool supportsSwizzle(); | ||
131 | 131 | | |||
132 | /** | 132 | /** | ||
133 | * Returns @c true if texture formats R* are supported, and @c false otherwise. | 133 | * Returns @c true if texture formats R* are supported, and @c false otherwise. | ||
134 | * | 134 | * | ||
135 | * This requires OpenGL 3.0, GL_ARB_texture_rg or OpenGL ES 3.0 or GL_EXT_texture_rg. | 135 | * This requires OpenGL 3.0, GL_ARB_texture_rg or OpenGL ES 3.0 or GL_EXT_texture_rg. | ||
136 | * | 136 | * | ||
137 | * @since 5.2.1 | 137 | * @since 5.2.1 | ||
Show All 16 Lines |