implement simple brush projection on single cube face, add camera rotation instead of pan

This commit is contained in:
2017-04-26 23:51:05 +01:00
parent 874176c19a
commit e6332322b3
4 changed files with 141 additions and 19 deletions

View File

@@ -11,11 +11,13 @@ NS_START
class Canvas
{
Plane m_plane;
Plane m_plane_brush;
BrushMesh m_mesh;
bool m_dirty = false;
public:
bool m_erase = false;
glm::mat4 m_mvp;
glm::mat4 m_mv;
glm::mat4 m_proj;
glm::vec4 m_box;
int m_width;
int m_height;
@@ -30,6 +32,8 @@ public:
Texture2D m_tex2;
Sampler m_sampler;
Sampler m_sampler_bg;
glm::vec2 m_cam_rot;
float m_cam_fov = 85;
bool create(int width, int height);
void resize(int width, int height);