* limitations under the License.
*/
+#include <dali/graphics-api/graphics-program-create-info.h>
#include <dali/graphics-api/graphics-reflection.h>
#include "test-gl-abstraction.h"
class TestGraphicsReflection : public Graphics::Reflection
{
public:
- TestGraphicsReflection(TestGlAbstraction& gl);
+ TestGraphicsReflection(TestGlAbstraction& gl, Property::Array& vertexFormats, const Graphics::ProgramCreateInfo& createInfo, std::vector<UniformData>& customUniforms);
uint32_t GetVertexAttributeLocation(const std::string& name) const override;
Dali::Graphics::VertexInputAttributeFormat GetVertexAttributeFormat(uint32_t location) const override;
std::vector<Dali::Graphics::UniformInfo> GetSamplers() const override;
Graphics::ShaderLanguage GetLanguage() const override;
- TestGlAbstraction& mGl;
+public: // Test methods
+ void SetAttributes(std::vector<std::string> locations)
+ {
+ mAttributes.clear();
+ mAttributes.resize(locations.size());
+ for(auto& location : locations)
+ {
+ mAttributes.push_back(location);
+ }
+ }
+
+ Dali::Property::Type GetMemberType(int blockIndex, int location) const;
+
+ TestGlAbstraction& mGl;
+ mutable std::vector<std::string> mAttributes;
+ std::vector<UniformData> mCustomUniforms;
+
+ Graphics::UniformBlockInfo mDefaultUniformBlock{}; ///< The emulated UBO containing all the standalone uniforms
+ std::vector<Graphics::UniformBlockInfo> mUniformBlocks{}; ///< List of uniform blocks
};
} // namespace Dali