OGLplus  (0.59.0) a C++ wrapper for rendering APIs

application/020_bezier_patch/resources.hpp

Copyright Matus Chochlik. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

#ifndef OGLPLUS_EXAMPLE_RESOURCES_HPP // NOLINT(llvm-header-guard)
#define OGLPLUS_EXAMPLE_RESOURCES_HPP
#include <oglplus/gl.hpp>
//------------------------------------------------------------------------------
// program
//------------------------------------------------------------------------------
class patch_program {
public:
void init(execution_context&, video_context&);
void clean_up(video_context&);
void set_projection(video_context&, orbiting_camera&);
void set_wireframe_color(video_context&);
void set_surface_color(video_context&);
void bind_position_location(video_context&, oglp::vertex_attrib_location);
private:
oglp::uniform_location camera_matrix_loc;
oglp::uniform_location perspective_matrix_loc;
};
//------------------------------------------------------------------------------
// geometry
//------------------------------------------------------------------------------
class patch_geometry {
public:
void init(execution_context&, video_context&);
void clean_up(video_context&);
void draw(video_context&);
static auto position_loc() noexcept {
}
private:
oglp::owned_buffer_name _positions;
};
//------------------------------------------------------------------------------
} // namespace eagine::application
#endif
Application harness / wrapper code is placed in this namespace.
Definition: eagine.hpp:72
prog_var_location< EAGINE_ID_V(Uniform)> uniform_location
Alias for shader program uniform location wrapper.
Definition: prog_var_loc.hpp:115
gl_owned_object_name< vertex_array_tag > owned_vertex_array_name
Alias for owned GL vertex array object handle.
Definition: object_name.hpp:224
prog_var_location< EAGINE_ID_V(VertexAttr)> vertex_attrib_location
Alias for program vertex attribute location wrapper.
Definition: prog_var_loc.hpp:104
gl_owned_object_name< program_tag > owned_program_name
Alias for owned GL program object handle.
Definition: object_name.hpp:188

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).