Major update to revamp development
This commit is contained in:
parent
df12d68b22
commit
7479bfd625
12 changed files with 133 additions and 45 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include "pw/core/image.hpp"
|
#include "pw/core/image.hpp"
|
||||||
#include "pw/core/matrix_transform.hpp"
|
#include "pw/core/matrix_transform.hpp"
|
||||||
#include "pw/core/rectangle.hpp"
|
#include "pw/core/rectangle.hpp"
|
||||||
|
#include "pw/core/color.hpp"
|
||||||
|
|
||||||
#include "runtime_lua.hpp"
|
#include "runtime_lua.hpp"
|
||||||
|
|
||||||
|
@ -49,6 +50,17 @@ void register_core_function(sol::state& lua,sol::table& ns)
|
||||||
ns.set("pi",pw::pi<real_t>());
|
ns.set("pi",pw::pi<real_t>());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ns.new_usertype<color>("color",
|
||||||
|
sol::call_constructor,sol::constructors<color(),color(real_t,real_t,real_t,real_t)>(),
|
||||||
|
"rgba",&color::rgba,
|
||||||
|
"data",sol::property([](color& c) { return std::ref(c.rgba.data);} ),
|
||||||
|
"table",sol::property([](const color& c){ return sol::as_table(std::array<vector4::value_type,4>{c.rgba.x(),c.rgba.y(),c.rgba.z(),c.rgba.w()}); },
|
||||||
|
[](color& c,const sol::table& t) { c = color((real_t)t[0],t[1],t[2],t[3]);})
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
ns.new_usertype<matrix4x4>("matrix4x4",
|
ns.new_usertype<matrix4x4>("matrix4x4",
|
||||||
sol::call_constructor,sol::constructors<matrix4x4()>(),
|
sol::call_constructor,sol::constructors<matrix4x4()>(),
|
||||||
"row",&matrix4x4::row,
|
"row",&matrix4x4::row,
|
||||||
|
@ -170,6 +182,7 @@ void register_core_function(sol::state& lua,sol::table& ns)
|
||||||
sol::call_constructor,sol::constructors<geometry(),geometry(geometry::primitive_topology_type,vector3_array,geometry::indices_t)>(),
|
sol::call_constructor,sol::constructors<geometry(),geometry(geometry::primitive_topology_type,vector3_array,geometry::indices_t)>(),
|
||||||
"primitive_topology", sol::property(&geometry::primitive_topology,&geometry::set_primitive_topology),
|
"primitive_topology", sol::property(&geometry::primitive_topology,&geometry::set_primitive_topology),
|
||||||
"compute_normals", &geometry::compute_normals,
|
"compute_normals", &geometry::compute_normals,
|
||||||
|
"change_count",sol::property(&geometry::change_count,&geometry::set_change_count),
|
||||||
"indices",sol::property( [](const geometry& g){ return sol::as_table(g.indices());},
|
"indices",sol::property( [](const geometry& g){ return sol::as_table(g.indices());},
|
||||||
[](geometry& g,sol::table t){
|
[](geometry& g,sol::table t){
|
||||||
std::vector<uint32_t> vals;
|
std::vector<uint32_t> vals;
|
||||||
|
|
|
@ -55,8 +55,9 @@ void register_visual_function(sol::state& lua,sol::table &ns)
|
||||||
|
|
||||||
ns.new_usertype<renderer>("renderer"
|
ns.new_usertype<renderer>("renderer"
|
||||||
,sol::call_constructor,sol::constructors<renderer(),renderer(const geometry&)>()
|
,sol::call_constructor,sol::constructors<renderer(),renderer(const geometry&)>()
|
||||||
,"create",&renderer::create
|
,"update",&renderer::update
|
||||||
,"ready",sol::readonly_property(&renderer::ready)
|
,"ready",sol::readonly_property(&renderer::ready)
|
||||||
|
,"change_count",sol::readonly_property(&renderer::change_count)
|
||||||
,"release",&renderer::release
|
,"release",&renderer::release
|
||||||
,"draw",&renderer::draw
|
,"draw",&renderer::draw
|
||||||
);
|
);
|
||||||
|
@ -80,6 +81,7 @@ void register_visual_function(sol::state& lua,sol::table &ns)
|
||||||
ns.new_usertype<context>("context"
|
ns.new_usertype<context>("context"
|
||||||
,sol::call_constructor,sol::constructors<context()>()
|
,sol::call_constructor,sol::constructors<context()>()
|
||||||
,"clear",&context::clear
|
,"clear",&context::clear
|
||||||
|
,"clearcolor",sol::property(&context::clearcolor,&context::set_clearcolor)
|
||||||
,"set_viewport",&context::set_viewport
|
,"set_viewport",&context::set_viewport
|
||||||
,"get_error",&context::get_error
|
,"get_error",&context::get_error
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,7 +29,10 @@
|
||||||
namespace pw {
|
namespace pw {
|
||||||
|
|
||||||
struct color {
|
struct color {
|
||||||
vector4 components;
|
|
||||||
|
vector4 rgba {0, 0, 0, 1};
|
||||||
|
|
||||||
|
color() = default;
|
||||||
|
|
||||||
color(uint8_t r8,uint8_t g8,uint8_t b8,uint8_t a8)
|
color(uint8_t r8,uint8_t g8,uint8_t b8,uint8_t a8)
|
||||||
: color(static_cast<real_t>(r8 / std::numeric_limits<uint8_t>::max()),
|
: color(static_cast<real_t>(r8 / std::numeric_limits<uint8_t>::max()),
|
||||||
|
@ -40,10 +43,14 @@ struct color {
|
||||||
}
|
}
|
||||||
|
|
||||||
color(real_t r,real_t g,real_t b,real_t a)
|
color(real_t r,real_t g,real_t b,real_t a)
|
||||||
: components({r,g,b,a})
|
: rgba({r,g,b,a})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
color(const vector4& v) : rgba(v) { }
|
||||||
|
|
||||||
|
operator vector4() const { return rgba; }
|
||||||
|
|
||||||
uint32_t to_rgb8888() const {
|
uint32_t to_rgb8888() const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,10 @@ public:
|
||||||
|
|
||||||
aabb bounds() const;
|
aabb bounds() const;
|
||||||
|
|
||||||
|
uint64_t change_count() const { return _change_count; }
|
||||||
|
void set_change_count(uint64_t n) { _change_count = n; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
primitive_topology_type _primitive_topology = primitive_topology_type::point_list;
|
primitive_topology_type _primitive_topology = primitive_topology_type::point_list;
|
||||||
|
|
|
@ -28,6 +28,6 @@ target_include_directories(pixwerx
|
||||||
|
|
||||||
target_link_libraries(pixwerx
|
target_link_libraries(pixwerx
|
||||||
pwbinding
|
pwbinding
|
||||||
# -Wl,--whole-archive -lpwscripting -Wl,--no-whole-archive
|
|
||||||
pwcore
|
pwcore
|
||||||
pwsystem)
|
pwsystem
|
||||||
|
)
|
||||||
|
|
|
@ -15,19 +15,12 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
||||||
//PW_RUNTIME_LUA_USE(core)
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc,const char** argv) {
|
int main(int argc,const char** argv) {
|
||||||
|
|
||||||
argagg::parser argparser {{
|
argagg::parser argparser {{
|
||||||
{ "help", {"-h", "--help"},
|
{ "help", {"-h", "--help"}, "shows this help message", 0},
|
||||||
"shows this help message", 0},
|
{ "file", {"-f", "--file"}, "load file to run", 1}
|
||||||
{ "file", {"-f", "--file"},
|
}};
|
||||||
"load file to run", 1}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
argagg::parser_results args;
|
argagg::parser_results args;
|
||||||
|
|
||||||
|
|
|
@ -122,21 +122,26 @@ end
|
||||||
-- the renderer for a geometry
|
-- the renderer for a geometry
|
||||||
local renderer = pw.renderer()
|
local renderer = pw.renderer()
|
||||||
|
|
||||||
if not renderer:create(g) then
|
|
||||||
print("couldn't create renderer")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- camera position
|
-- camera position
|
||||||
local cam_pos = pw.vector3(0,0,0)
|
local cam_pos = pw.vector3(0,0,0)
|
||||||
|
|
||||||
|
-- model position
|
||||||
local model_pos = pw.vector3(0,0,0)
|
local model_pos = pw.vector3(0,0,0)
|
||||||
|
|
||||||
|
|
||||||
|
-- create new context (should move into a scene later)
|
||||||
local ctx = pw.context()
|
local ctx = pw.context()
|
||||||
|
|
||||||
|
-- create a texture
|
||||||
local tx = pw.texture()
|
local tx = pw.texture()
|
||||||
|
|
||||||
|
-- create texture from an image
|
||||||
tx:create(img)
|
tx:create(img)
|
||||||
|
|
||||||
|
-- show how to unload it here
|
||||||
|
|
||||||
|
|
||||||
|
-- set function to
|
||||||
w.on_resize = function(self)
|
w.on_resize = function(self)
|
||||||
-- use client_size to resize the viewport
|
-- use client_size to resize the viewport
|
||||||
ctx:set_viewport(pw.rectangle(pw.point(0,0),self.client_size:cast_to_float()))
|
ctx:set_viewport(pw.rectangle(pw.point(0,0),self.client_size:cast_to_float()))
|
||||||
|
@ -146,6 +151,9 @@ end
|
||||||
-- setup a lua callback function as callback
|
-- setup a lua callback function as callback
|
||||||
w.on_update = function(self)
|
w.on_update = function(self)
|
||||||
|
|
||||||
|
ctx.clearcolor = pw.color(pw.mathf.ping_pong(pw.time.now,1.0),0,1,1)
|
||||||
|
ctx:clear()
|
||||||
|
|
||||||
-- set view matrix with look_at - view matrix is moving the world - hence inverse!
|
-- set view matrix with look_at - view matrix is moving the world - hence inverse!
|
||||||
mv = pw.matrixtransform.look_at(cam_pos,cam_pos + pw.vector3.forward,pw.vector3.up).inverse
|
mv = pw.matrixtransform.look_at(cam_pos,cam_pos + pw.vector3.forward,pw.vector3.up).inverse
|
||||||
|
|
||||||
|
@ -153,7 +161,11 @@ w.on_update = function(self)
|
||||||
aspect_ratio = self.client_size.width / self.client_size.height
|
aspect_ratio = self.client_size.width / self.client_size.height
|
||||||
|
|
||||||
-- create a view frustum for a perspective projection
|
-- create a view frustum for a perspective projection
|
||||||
mp = pw.matrixtransform.perspective_projection(1.3,aspect_ratio,0.2,100)
|
mp = pw.matrixtransform.perspective_projection(math.rad(45),aspect_ratio,0.2,100)
|
||||||
|
|
||||||
|
--
|
||||||
|
-- this code is raw rendering mode
|
||||||
|
--
|
||||||
|
|
||||||
-- just some toying around
|
-- just some toying around
|
||||||
local color_red = pw.mathf.ping_pong(pw.time.now,1.0)
|
local color_red = pw.mathf.ping_pong(pw.time.now,1.0)
|
||||||
|
@ -173,10 +185,14 @@ w.on_update = function(self)
|
||||||
s:set_uniform_mat4("projection",mp)
|
s:set_uniform_mat4("projection",mp)
|
||||||
s:set_uniform_vec4("color",cl)
|
s:set_uniform_vec4("color",cl)
|
||||||
|
|
||||||
|
-- specific to our shader
|
||||||
s:set_uniform_int("tex_color",0)
|
s:set_uniform_int("tex_color",0)
|
||||||
|
|
||||||
tx:bind()
|
tx:bind()
|
||||||
|
|
||||||
|
-- update renderer from geometry
|
||||||
|
renderer:update(g)
|
||||||
|
|
||||||
-- draw
|
-- draw
|
||||||
renderer:draw()
|
renderer:draw()
|
||||||
|
|
||||||
|
@ -190,12 +206,16 @@ end
|
||||||
-- before entering the update loop make the window visible
|
-- before entering the update loop make the window visible
|
||||||
w.visible = true
|
w.visible = true
|
||||||
|
|
||||||
|
-- some fluffyness
|
||||||
|
local speed = 0
|
||||||
|
|
||||||
-- main update loop
|
-- main update loop
|
||||||
while w:update() do
|
while w:update() do
|
||||||
|
|
||||||
-- only check if get a new input
|
-- only check if get a new input
|
||||||
if pw.input.get().has_input then
|
if pw.input.get().has_input then
|
||||||
|
|
||||||
|
|
||||||
-- somehow works
|
-- somehow works
|
||||||
if pw.input.get().input_string == 'f' then
|
if pw.input.get().input_string == 'f' then
|
||||||
w.fullscreen = not w.fullscreen
|
w.fullscreen = not w.fullscreen
|
||||||
|
@ -209,6 +229,7 @@ while w:update() do
|
||||||
-- just to quickly modify speed
|
-- just to quickly modify speed
|
||||||
local move_step = 0.05
|
local move_step = 0.05
|
||||||
|
|
||||||
|
|
||||||
-- camera
|
-- camera
|
||||||
if pw.input.get().input_string == 'w' then
|
if pw.input.get().input_string == 'w' then
|
||||||
cam_pos.z = cam_pos.z - move_step
|
cam_pos.z = cam_pos.z - move_step
|
||||||
|
@ -224,6 +245,8 @@ while w:update() do
|
||||||
cam_pos.y = cam_pos.y - move_step
|
cam_pos.y = cam_pos.y - move_step
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- just some debugging
|
-- just some debugging
|
||||||
print(cam_pos.x,cam_pos.y,cam_pos.z)
|
print(cam_pos.x,cam_pos.y,cam_pos.z)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ set(hdrs
|
||||||
include/pw/visual/context.hpp
|
include/pw/visual/context.hpp
|
||||||
include/pw/visual/framebuffer.hpp
|
include/pw/visual/framebuffer.hpp
|
||||||
include/pw/visual/shader.hpp
|
include/pw/visual/shader.hpp
|
||||||
include/pw/visual/pipeline.hpp
|
# include/pw/visual/pipeline.hpp
|
||||||
include/pw/visual/texture.hpp
|
include/pw/visual/texture.hpp
|
||||||
include/pw/visual/renderer.hpp
|
include/pw/visual/renderer.hpp
|
||||||
)
|
)
|
||||||
|
@ -13,8 +13,8 @@ set(srcs
|
||||||
src/framebuffer.cpp
|
src/framebuffer.cpp
|
||||||
src/shader.cpp
|
src/shader.cpp
|
||||||
src/pass.cpp
|
src/pass.cpp
|
||||||
src/pipeline.cpp
|
# src/pipeline.cpp
|
||||||
src/target.cpp
|
# src/target.cpp
|
||||||
src/texture.cpp
|
src/texture.cpp
|
||||||
src/renderer.cpp
|
src/renderer.cpp
|
||||||
)
|
)
|
||||||
|
@ -39,5 +39,3 @@ target_include_directories(
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(pwvisual pwscene glad)
|
target_link_libraries(pwvisual pwscene glad)
|
||||||
|
|
||||||
#add_subdirectory(tests)
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <pw/core/size.hpp>
|
#include <pw/core/size.hpp>
|
||||||
#include <pw/core/vector.hpp>
|
#include <pw/core/vector.hpp>
|
||||||
#include <pw/core/rectangle.hpp>
|
#include <pw/core/rectangle.hpp>
|
||||||
|
#include <pw/core/color.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace pw {
|
namespace pw {
|
||||||
|
@ -47,11 +48,12 @@ public:
|
||||||
size viewport_size() const;
|
size viewport_size() const;
|
||||||
point viewport_origin() const;
|
point viewport_origin() const;
|
||||||
|
|
||||||
void set_clearcolor(vector4f const& c);
|
void set_clearcolor(const color &c);
|
||||||
|
color clearcolor() const;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
u_int32_t get_error() const;
|
uint32_t get_error() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct impl;
|
struct impl;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#ifndef PW_VISUAL_MESH_RENDERER_HPP
|
#ifndef PW_VISUAL_MESH_RENDERER_HPP
|
||||||
#define PW_VISUAL_MESH_RENDERER_HPP
|
#define PW_VISUAL_MESH_RENDERER_HPP
|
||||||
|
|
||||||
#include <pw/core/matrix.hpp>
|
#include <memory>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace pw {
|
namespace pw {
|
||||||
|
@ -14,17 +13,20 @@ class geometry;
|
||||||
*/
|
*/
|
||||||
class renderer {
|
class renderer {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
renderer();
|
renderer();
|
||||||
renderer(const geometry& m);
|
renderer(const geometry& m);
|
||||||
|
|
||||||
~renderer();
|
~renderer();
|
||||||
|
|
||||||
bool create(const geometry &m);
|
bool update(const geometry &m);
|
||||||
void release();
|
void release();
|
||||||
|
|
||||||
void draw();
|
void draw();
|
||||||
bool ready() const;
|
bool ready() const;
|
||||||
|
|
||||||
|
uint64_t change_count() const;
|
||||||
|
void set_change_count(uint64_t n);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
struct impl;
|
struct impl;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "pw/visual/context.hpp"
|
#include "pw/visual/context.hpp"
|
||||||
|
#include "pw/core/vector.hpp"
|
||||||
|
|
||||||
#include "glad/glad.h"
|
#include "glad/glad.h"
|
||||||
|
|
||||||
|
@ -7,6 +8,8 @@ namespace pw {
|
||||||
|
|
||||||
struct context::impl {
|
struct context::impl {
|
||||||
|
|
||||||
|
vector4f _clear_color { 0, 1, 0, 1};
|
||||||
|
|
||||||
void set_viewport(const rectangle& v)
|
void set_viewport(const rectangle& v)
|
||||||
{
|
{
|
||||||
glViewport(v.position.x,v.position.y,v.size.width,v.size.height);
|
glViewport(v.position.x,v.position.y,v.size.width,v.size.height);
|
||||||
|
@ -21,9 +24,17 @@ struct context::impl {
|
||||||
|
|
||||||
void clear()
|
void clear()
|
||||||
{
|
{
|
||||||
|
glEnable(GL_CULL_FACE);
|
||||||
|
glCullFace(GL_BACK);
|
||||||
|
glFrontFace(GL_CCW);
|
||||||
|
|
||||||
|
glClearColor(_clear_color[0],_clear_color[1],_clear_color[2],_clear_color[3]);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uint32_t get_error() const
|
uint32_t get_error() const
|
||||||
{
|
{
|
||||||
return glGetError();
|
return glGetError();
|
||||||
|
@ -65,6 +76,17 @@ u_int32_t context::get_error() const
|
||||||
return _impl->get_error();
|
return _impl->get_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
color context::clearcolor() const
|
||||||
|
{
|
||||||
|
return _impl->_clear_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
void context::set_clearcolor(const color& c)
|
||||||
|
{
|
||||||
|
_impl->_clear_color = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "pw/core/geometry.hpp"
|
#include "pw/core/geometry.hpp"
|
||||||
#include "pw/core/size.hpp"
|
#include "pw/core/size.hpp"
|
||||||
#include "pw/core/debug.hpp"
|
#include "pw/core/debug.hpp"
|
||||||
|
#include "pw/core/matrix.hpp"
|
||||||
|
|
||||||
#include "glad/glad.h"
|
#include "glad/glad.h"
|
||||||
|
|
||||||
|
@ -13,10 +14,13 @@ namespace pw {
|
||||||
|
|
||||||
struct renderer::impl {
|
struct renderer::impl {
|
||||||
|
|
||||||
|
uint64_t _change_count { 0 };
|
||||||
|
|
||||||
uint32_t _vao { 0 };
|
uint32_t _vao { 0 };
|
||||||
uint32_t _ebo { 0 };
|
uint32_t _ebo { 0 };
|
||||||
std::vector<uint32_t> _vbos { };
|
std::vector<uint32_t> _vbos { };
|
||||||
|
|
||||||
|
|
||||||
GLint _mesh_elements = { 0 };
|
GLint _mesh_elements = { 0 };
|
||||||
|
|
||||||
impl() = default;
|
impl() = default;
|
||||||
|
@ -31,12 +35,14 @@ struct renderer::impl {
|
||||||
return glIsVertexArray != nullptr && GL_TRUE == glIsVertexArray(_vao);
|
return glIsVertexArray != nullptr && GL_TRUE == glIsVertexArray(_vao);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool create(const geometry& m)
|
bool update(const geometry& m)
|
||||||
{
|
{
|
||||||
|
if (_change_count == m.change_count())
|
||||||
|
return false;
|
||||||
|
|
||||||
// reset if the renderer already in use
|
// reset if the renderer already in use
|
||||||
if (ready()) {
|
if (ready())
|
||||||
release();
|
release();
|
||||||
}
|
|
||||||
|
|
||||||
_mesh_elements = m.indices().size();
|
_mesh_elements = m.indices().size();
|
||||||
|
|
||||||
|
@ -115,6 +121,9 @@ struct renderer::impl {
|
||||||
glBindVertexArray(0);
|
glBindVertexArray(0);
|
||||||
|
|
||||||
|
|
||||||
|
this->_change_count = m.change_count();
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// get errors
|
// get errors
|
||||||
auto error = glGetError();
|
auto error = glGetError();
|
||||||
|
@ -141,7 +150,8 @@ struct renderer::impl {
|
||||||
void draw()
|
void draw()
|
||||||
{
|
{
|
||||||
|
|
||||||
#if 1
|
// following code has no business being here ;)
|
||||||
|
#if 0
|
||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
glCullFace(GL_BACK);
|
glCullFace(GL_BACK);
|
||||||
glFrontFace(GL_CCW);
|
glFrontFace(GL_CCW);
|
||||||
|
@ -181,7 +191,8 @@ renderer::renderer()
|
||||||
renderer::renderer(const geometry &m)
|
renderer::renderer(const geometry &m)
|
||||||
{
|
{
|
||||||
renderer();
|
renderer();
|
||||||
_impl->create(m);
|
// directly update
|
||||||
|
_impl->update(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer::~renderer()
|
renderer::~renderer()
|
||||||
|
@ -193,9 +204,9 @@ bool renderer::ready() const
|
||||||
return _impl->ready();
|
return _impl->ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool renderer::create(const geometry &m)
|
bool renderer::update(const geometry &m)
|
||||||
{
|
{
|
||||||
return _impl->create(m);
|
return _impl->update(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
void renderer::release()
|
void renderer::release()
|
||||||
|
@ -208,6 +219,17 @@ void renderer::draw()
|
||||||
_impl->draw();
|
_impl->draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t renderer::change_count() const
|
||||||
|
{
|
||||||
|
return _impl->_change_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
void renderer::set_change_count(uint64_t n)
|
||||||
|
{
|
||||||
|
_impl->_change_count = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//class viewport {
|
//class viewport {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue