our_dick/include/square.hpp
2020-10-11 12:36:05 -07:00

54 lines
1.3 KiB
C++

/**
This file is a part of our_dick
Copyright (C) 2020 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_SQUARE_HPP
#define OUR_DICK_SQUARE_HPP
#include "graphics/mesh.hpp"
#include "graphics/model.hpp"
#include "graphics/material.hpp"
#include "graphics/shader_program.hpp"
#include "renderable.hpp"
gfx::unified_mesh square_mesh(const gfx::material& blank, const gfx::material& o, const gfx::material& x);
class square : public renderable_iface
{
public:
enum class value{
BLANK,
O,
X,
};
private:
gfx::model* m_model;
value m_active_value = value::BLANK;
public:
square(gfx::model* model);
void set_value(value v);
value get_value()const;
void render(gfx::shader_program&)override;
};
#endif