|
|
|
@ -181,35 +181,27 @@ class MAGNUM_EXPORT AbstractShaderProgram { |
|
|
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
protected: |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Program parameters |
|
|
|
* @brief Allow retrieving program binary |
|
|
|
* |
|
|
|
* |
|
|
|
* @see setParameter() |
|
|
|
* Disabled by default. |
|
|
|
|
|
|
|
* @requires_gl41 Extension @extension{ARB,get_program_binary} |
|
|
|
|
|
|
|
* @note This function should be called after attachShader() calls and |
|
|
|
|
|
|
|
* before link(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
enum class Parameter: GLenum { |
|
|
|
inline void setRetrievableBinary(bool enabled) { |
|
|
|
/**
|
|
|
|
glProgramParameteri(program, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, enabled ? GL_TRUE : GL_FALSE); |
|
|
|
* Allow retrieving program binary. Disabled by default. |
|
|
|
} |
|
|
|
* |
|
|
|
|
|
|
|
* @requires_gl41 Extension @extension{ARB,get_program_binary} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
RetrievableBinary = GL_PROGRAM_BINARY_RETRIEVABLE_HINT, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Allow the program to be bound to individual pipeline stages. |
|
|
|
|
|
|
|
* Disabled by default. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @requires_gl41 Extension @extension{ARB,separate_shader_objects} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
Separable = GL_PROGRAM_SEPARABLE |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Set program parameter |
|
|
|
* @brief Allow the program to be bound to individual pipeline stages |
|
|
|
* |
|
|
|
* |
|
|
|
|
|
|
|
* Disabled by default. |
|
|
|
|
|
|
|
* @requires_gl41 Extension @extension{ARB,separate_shader_objects} |
|
|
|
* @note This function should be called after attachShader() calls and |
|
|
|
* @note This function should be called after attachShader() calls and |
|
|
|
* before link(). |
|
|
|
* before link(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline void setParameter(Parameter parameter, bool value) { |
|
|
|
inline void setSeparable(bool enabled) { |
|
|
|
glProgramParameteri(program, static_cast<GLenum>(parameter), value ? GL_TRUE : GL_FALSE); |
|
|
|
glProgramParameteri(program, GL_PROGRAM_SEPARABLE, enabled ? GL_TRUE : GL_FALSE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|