![]() |
LibCarna Version 3.4.0
|
Represents an acquisition of video resources from a particular Material. This realizes the RAII idiom. More...
#include <Material.hpp>
Public Member Functions | |
ManagedInterface (Material &material) | |
Acquires the video resources from material. | |
virtual | ~ManagedInterface () |
Releases the video resources previously acquired from the managing geometryFeature. | |
void | activate (RenderState &renderState) const |
Activates this material by setting the proper shader on the current context, configuring it and tweaking the renderState. | |
const ShaderProgram & | shader () const |
References the shader of this material. | |
Public Attributes | |
Material & | material |
References the material. | |
![]() | |
GeometryFeature & | geometryFeature |
References the GeometryFeature that manages the video resources that this object interfaces. | |
Additional Inherited Members | |
![]() | |
ManagedInterface (GeometryFeature &gf) | |
Acquires the video resources from gf. | |
Represents an acquisition of video resources from a particular Material. This realizes the RAII idiom.
Definition at line 267 of file Material.hpp.
LibCarna::base::Material::ManagedInterface::ManagedInterface | ( | Material & | material | ) |
Acquires the video resources from material.
The instantiated ManagedInterface
object is only valid within the current OpenGL context. Delete the object in order to release the acquired resources. Usually the resources are uploaded to video memory when they are first acquired, and deleted from video memory when the last acquisition is released. This depends on whether the resources are sharable across OpenGL contexts.
|
virtual |
Releases the video resources previously acquired from the managing geometryFeature.
Reimplemented from LibCarna::base::GeometryFeature::ManagedInterface.
Material& LibCarna::base::Material::ManagedInterface::material |
References the material.
Definition at line 298 of file Material.hpp.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen