|
|
static const uint32_t | MaxDataSize = 16 |
| | Maximum size of the m_Data array.
|
| |
|
|
std::string | m_Name |
| |
|
std::string | m_Type |
| |
|
uint32_t | m_Register |
| |
|
uint32_t | m_Size |
| |
|
std::array< float, Uniform::MaxDataSize > | m_Data |
| |
| float const * Ocular::Graphics::Uniform::getData |
( |
| ) |
const |
- Returns
- A pointer to the internal data. Guaranteed to be (MaxDataSize * sizeof(float)) in size, though only part of the data array may actually be in use (see getSize()). Unused portions may be anything as the array is only cleared to zero once during creation.
| float Ocular::Graphics::Uniform::getElement |
( |
uint32_t |
index | ) |
const |
Retrieves the data at the specified index.
- Parameters
-
| [in] | index | Index of data to retrieve. Depending on the type of underlying uniform (float, vector, matrix), this may be on the range of [0,16). |
- Returns
- The data at the specified index. If index or underlying data is invalid, will return 0.0.
| std::string const & Ocular::Graphics::Uniform::getName |
( |
| ) |
const |
- Returns
- The string name of this Uniform.
| uint32_t Ocular::Graphics::Uniform::getRegister |
( |
| ) |
const |
- Returns
- The register index of this Uniform.
| uint32_t Ocular::Graphics::Uniform::getSize |
( |
| ) |
const |
- Returns
- Number of data elements stored in this uniform.
| std::string const & Ocular::Graphics::Uniform::getType |
( |
| ) |
const |
- Returns
- The superficial type of this Uniform.
| void Ocular::Graphics::Uniform::setData |
( |
float |
data | ) |
|
Sets the uniform data.
- Parameters
-
| [in] | data | Single float value for the Uniform to represent. |
| void Ocular::Graphics::Uniform::setData |
( |
Math::Vector4f const & |
data | ) |
|
Sets the uniform data.
- Parameters
-
| [in] | data | A four-component vector for the Uniform to represent. |
Sets the uniform data.
- Parameters
-
| [in] | data | A 3x3 matrix for the Uniform to represent. |
Sets the uniform data.
- Parameters
-
| [in] | data | A 4x4 matrix for the Uniform to represent. |
| bool Ocular::Graphics::Uniform::setData |
( |
uint32_t |
size, |
|
|
float const * |
data |
|
) |
| |
Sets the uniform data.
- Parameters
-
| [in] | size | Number of elements being passed. Valid values are: 1, 4, 12, 16. |
| [in] | data | Uniform data to set. |
- Returns
- TRUE if successful. May return false if size is invalid, or elements is NULL.
| void Ocular::Graphics::Uniform::setName |
( |
std::string const & |
name | ) |
|
Sets the name of this Uniform.
- Parameters
-
| void Ocular::Graphics::Uniform::setRegister |
( |
uint32_t |
index | ) |
|
Sets the register index of this Uniform.
- Parameters
-
| void Ocular::Graphics::Uniform::setType |
( |
std::string const & |
type | ) |
|
Sets the superficial type of this Uniform (float, Color, Vector4f, Matrix4x4)
- Parameters
-
| [in] | type | String representation of the type (see Utils::TypeName<T>::name) |
The documentation for this class was generated from the following files:
- C:/Projects/OcularEngine/OcularCore/include/Graphics/Shader/Uniform/Uniform.hpp
- C:/Projects/OcularEngine/OcularCore/src/Graphics/Shader/Uniform/Uniform.cpp