54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
/**
|
|
This file is a part of our_dick
|
|
Copyright (C) 2022 rexy712
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef OUR_DICK_BOARD_GFX_HPP
|
|
#define OUR_DICK_BOARD_GFX_HPP
|
|
|
|
#include "gfx/material.hpp"
|
|
#include "gfx/ogl/vbo.hpp"
|
|
#include "gfx/ogl/vao.hpp"
|
|
#include "gfx/ogl/shader_program.hpp"
|
|
#include "gfx/resource_manager.hpp"
|
|
|
|
#include <utility> //pair
|
|
#include <memory> //shared_ptr
|
|
|
|
class tile;
|
|
|
|
class board_gfx
|
|
{
|
|
private:
|
|
std::shared_ptr<gfx::ogl::texture_array> m_textures;
|
|
gfx::ogl::vao m_vao;
|
|
gfx::ogl::vbo m_vbo;
|
|
|
|
public:
|
|
board_gfx(gfx::resource_manager& resman);
|
|
~board_gfx(void) = default;
|
|
|
|
void set_uniforms(gfx::ogl::shader_program& sh);
|
|
void bind_buffers(void);
|
|
void bind_attributes(void);
|
|
|
|
void buffer_tiles(const tile* t);
|
|
|
|
void render(gfx::ogl::shader_program& shader);
|
|
};
|
|
|
|
#endif
|