Represents an OpenGL shader program present on a particular context.
#include <Rendering/OpenGL/Shaders/wsglshaderprogram.h>
|
| WSGLShaderProgram (const QOpenGLContext *context=nullptr, QObject *parent=nullptr) |
|
| WSGLShaderProgram (QObject *parent) |
|
| ~WSGLShaderProgram () override |
|
bool | activateCapabilities (WSGLRenderer &renderer) |
|
bool | addCapability (WSGLShaderProgramCapability *capability) |
|
bool | bindTextureCoordBuffer (int location, WSGLRenderer &renderer, Texturizer &texturizer, WSGLRenderItem &item, Shader &shader) |
|
void | clearInternalLog () |
|
bool | compileAndLink (const QString &vertexShaderFileName, const QString &fragmentShaderFileName, const QString &geometryShaderFileName, const QVariantMap &preprocessorDefinitions=QVariantMap()) |
|
bool | compileAndLink (const QString &vertexShaderFileName, const QString &fragmentShaderFileName, const QVariantMap &preprocessorDefinitions=QVariantMap()) |
|
bool | deactivateCapabilities (WSGLRenderer &renderer) |
|
const QString & | getInternalLog (const Application::LogManager::MessageCategory &category) const |
|
bool | getUseInternalLog () const |
|
bool | isValid () |
|
bool | renderGlyphs (WSGLRenderer &renderer, WSGLRenderItem &item, RenderGlyphCallback *perGlyphCallback=nullptr, const WSGLRenderElementsFilter *elementFilter=nullptr) |
|
bool | renderItem (WSGLRenderer &renderer, WSGLRenderItem &item, const WSGLRenderElementsFilter *elementFilter=nullptr) |
|
bool | renderUsingCustomFunction (WSGLRenderer &renderer, WSGLRenderItem &item, CustomRenderFunction &function) |
|
void | setUniformValue (int location, const Mesh::TransformMatrix &value) |
|
void | setUniformValue (int location, const Mesh::Vector3d &value) |
|
void | setUseInternalLog (bool b) |
|
| BasicTextLogger () |
|
virtual | ~BasicTextLogger () |
|
void | logLine (const Application::LogManager::MessageCategory &category, const QString &msg) const |
|
void | logLine (const QString &msg) const |
|
void | logText (const Application::LogManager::MessageCategory &category, const QString &msg) const |
|
void | logText (const QString &msg) const |
|
◆ WSGLShaderProgram() [1/2]
◆ WSGLShaderProgram() [2/2]
WSGLShaderProgram |
( |
const QOpenGLContext * |
context = nullptr , |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
◆ ~WSGLShaderProgram()
◆ activateCapabilities()
◆ addCapability()
Adds a capability to the program. When the program is activated, deactivated or an item is rendered, this capability will be included in this process.
- Note
- Capabilitys can depend on other capabilities. This function will return false if a capability's dependencies have not already been added.
◆ bindTextureCoordBuffer()
- Parameters
-
location | The vertex attribute location to which the buffer will be bound. |
renderer | The renderer to which the buffer will be bound. |
texturizer | The texturizer which contains details of how to get texture coordinates. |
renderItem | The render item for which the coordinates are being generated. |
shader | The shader being used to bind the coord buffer |
Looks up (or creates) a texture coordinate buffer using the details provided by texturizer, the model referenced by renderItem and binds it to the vertex attribute location specified by location.
- Returns
- true if the buffer was able to be bound successfully, false otherwise.
◆ clearInternalLog()
void clearInternalLog |
( |
| ) |
|
◆ compileAndLink() [1/2]
bool compileAndLink |
( |
const QString & |
vertexShaderFileName, |
|
|
const QString & |
fragmentShaderFileName, |
|
|
const QString & |
geometryShaderFileName, |
|
|
const QVariantMap & |
preprocessorDefinitions = QVariantMap() |
|
) |
| |
◆ compileAndLink() [2/2]
bool compileAndLink |
( |
const QString & |
vertexShaderFileName, |
|
|
const QString & |
fragmentShaderFileName, |
|
|
const QVariantMap & |
preprocessorDefinitions = QVariantMap() |
|
) |
| |
◆ deactivateCapabilities()
◆ getInternalLog()
- Parameters
-
category | The desired message category. |
- Returns
- The message log contents for the specific category.
◆ getUseInternalLog()
bool getUseInternalLog |
( |
| ) |
const |
◆ isValid()
Checks whether or not the program is valid and ready to execute (see glValidateProgram). It also takes into account whether or not all of the required uniforms have been set. It will also print any validation problems (if they exist) to the log.
NOTE: Since this is invoking a series of 'get' calls, it is recommended it be used only during debug builds.
- Returns
- true if the program is ready to execute.
◆ renderGlyphs()
◆ renderItem()
◆ renderUsingCustomFunction()
◆ setUniformValue() [1/2]
◆ setUniformValue() [2/2]
◆ setUseInternalLog()
void setUseInternalLog |
( |
bool |
b | ) |
|