|
| D3D11Material (ID3D11DeviceContext *context) |
|
virtual void | bind () override |
|
virtual void | unbind () override |
|
virtual bool | setTexture (uint32_t index, std::string const &name, Texture *texture) override |
|
virtual void | removeTexture (uint32_t index) override |
|
virtual void | unload () override |
|
virtual void | onLoad (Core::BuilderNode const *node) override |
|
virtual void | onSave (Core::BuilderNode *node) const override |
|
Texture * | getTexture (uint32_t index) const |
|
uint32_t | getNumTextures () const |
|
std::vector< TextureSamplerInfo > const * | getTextures () const |
|
bool | setVertexShader (std::string const &name) |
|
void | setVertexShader (VertexShader *shader) |
|
bool | setGeometryShader (std::string const &name) |
|
void | setGeometryShader (GeometryShader *shader) |
|
bool | setFragmentShader (std::string const &name) |
|
void | setFragmentShader (FragmentShader *shader) |
|
bool | setPreTessellationShader (std::string const &name) |
|
void | setPreTessellationShader (PreTessellationShader *shader) |
|
bool | setPostTessellationShader (std::string const &name) |
|
void | setPostTessellationShader (PostTessellationShader *shader) |
|
VertexShader * | getVertexShader () const |
|
GeometryShader * | getGeometryShader () const |
|
FragmentShader * | getFragmentShader () const |
|
PreTessellationShader * | getPreTessellationShader () const |
|
PostTessellationShader * | getPostTessellationShader () const |
|
virtual void | setUniform (std::string const &name, uint32_t registerIndex, float value) |
|
virtual bool | getUniform (std::string const &name, float &value) |
|
virtual void | setUniform (std::string const &name, uint32_t registerIndex, Math::Vector4f const &value, std::string const &type=Utils::TypeName< Math::Vector4f >::name) |
|
virtual bool | getUniform (std::string const &name, Math::Vector4f &value) |
|
virtual void | setUniform (std::string const &name, uint32_t registerIndex, Math::Matrix3x3 const &value) |
|
virtual bool | getUniform (std::string const &name, Math::Matrix3x3 &value) |
|
virtual void | setUniform (std::string const &name, uint32_t registerIndex, Math::Matrix4x4 const &value) |
|
virtual bool | getUniform (std::string const &name, Math::Matrix4x4 &value) |
|
UniformBuffer const * | getUniformBuffer () const |
|
void | setPrimitiveStyle (PrimitiveStyle style) |
|
PrimitiveStyle | getPrimitiveStyle () const |
|
void | setFillMode (FillMode mode) |
|
FillMode | getFillMode () const |
|
void | setRenderPriority (uint32_t priority) |
|
uint32_t | getRenderPriority () const |
|
| Resource (File const &source) |
|
virtual void | forceLoad () |
|
File | getSourceFile () const |
|
void | setSourceFile (File const &file) |
|
void | setIsInMemory (bool inMemory) |
|
bool | isInMemory () const |
|
void | setSize (uint64_t size) |
|
uint64_t | getSize () const |
|
ResourceType | getResourceType () const |
|
void | setName (std::string const &name) |
|
std::string const & | getName () const |
|
std::string const & | getMappingName () const |
|
void | setMappingName (std::string const &name) |
|
ResourceMetadata * | getMetadata () const |
|
void | setMetadata (ResourceMetadata *metadata) |
|
void | getAllExposedNames (std::vector< std::string > &names) const |
|
bool | getVariable (std::string const &name, ExposedVariable &var) |
|
template<typename T > |
bool | getVariableValue (std::string const &name, T &var) |
|
template<typename T > |
bool | setVariableValue (std::string const &name, T const &value) |
|
virtual void | onVariableModified (std::string const &varName) |
|
bool Ocular::Graphics::D3D11Material::setTexture |
( |
uint32_t |
index, |
|
|
std::string const & |
name, |
|
|
Texture * |
texture |
|
) |
| |
|
overridevirtual |
Assigns a texture to a specific input register for use by the shaders that are part of this material. All textures are automatically bound to all relevant (non-NULL) shader stages.
Depending on the underlying graphics API, and shader implementation language, some may make use of the index or the name or both.
Note that some texture assignment indices and names are reserved by the engine. See ----— for a list of all reserved locations.
- Parameters
-
[in] | index | The index to bind the texture to. This can be on the range of 0 to (GraphicsDriver::getMaxBoundTextures - 1). Note that indices do not have to be sequential. For example, you may have use 0, 1, 3, 79. |
[in] | name | The name to bind the texture to. |
[in] | texture | The texture to bind. |
- Returns
- TRUE if texture was successfully set. May fail due to invalid index value.
Reimplemented from Ocular::Graphics::Material.