Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
OpenGLMaterial.hpp
1/*
2Copyright (C) 2016-2019,2021,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGAMES_OPENGLMATERIAL_HPP
17#define AEONGAMES_OPENGLMATERIAL_HPP
18#include "OpenGLBuffer.hpp"
19
20namespace AeonGames
21{
22 class Material;
23 class OpenGLRenderer;
24 class OpenGLPipeline;
27 {
28 public:
30 OpenGLMaterial ( OpenGLRenderer& aOpenGLRenderer, const Material& aMaterial );
32 OpenGLMaterial ( OpenGLMaterial&& aOpenGLMaterial );
33 OpenGLMaterial ( const OpenGLMaterial& ) = delete;
34 OpenGLMaterial& operator= ( const OpenGLMaterial& ) = delete;
35 OpenGLMaterial& operator= ( OpenGLMaterial&& ) = delete;
40 void Bind ( const OpenGLPipeline& aPipeline ) const;
41 private:
42 OpenGLRenderer& mOpenGLRenderer;
43 const Material* mMaterial;
44 OpenGLBuffer mUniformBuffer{};
45 };
46}
47#endif
Represents a surface material with uniform properties and texture samplers.
Definition Material.hpp:38
OpenGL GPU buffer wrapper implementing the Buffer interface.
OpenGLMaterial(OpenGLRenderer &aOpenGLRenderer, const Material &aMaterial)
Construct from a renderer and material resource.
void Bind(const OpenGLPipeline &aPipeline) const
Binds the material to the specified pipeline.
OpenGL shader program pipeline with attribute and uniform reflection.
OpenGL rendering backend implementing the Renderer interface.
<- This is here just for the literals
Definition AABB.hpp:31