small fixes
This commit is contained in:
@@ -16,7 +16,10 @@ void NodeCanvas::init()
|
||||
m_canvas->create(CANVAS_RES, CANVAS_RES);
|
||||
m_canvas->m_unsaved = false;
|
||||
m_canvas->m_node = this;
|
||||
m_sampler.create(GL_NEAREST);
|
||||
|
||||
m_sampler.create();
|
||||
m_sampler.set_filter(GL_LINEAR, GL_NEAREST);
|
||||
|
||||
m_sampler_linear.create(GL_LINEAR);
|
||||
m_sampler_stencil.create(GL_LINEAR, GL_REPEAT);
|
||||
m_face_plane.create<1>(2, 2);
|
||||
@@ -32,7 +35,10 @@ void NodeCanvas::restore_context()
|
||||
{
|
||||
Node::restore_context();
|
||||
m_canvas->create(CANVAS_RES, CANVAS_RES);
|
||||
m_sampler.create(GL_NEAREST);
|
||||
|
||||
m_sampler.create();
|
||||
|
||||
m_sampler.set_filter(GL_LINEAR, GL_NEAREST);
|
||||
m_face_plane.create<1>(2, 2);
|
||||
m_canvas->snapshot_restore();
|
||||
CanvasMode::node = this;
|
||||
@@ -278,7 +284,7 @@ void NodeCanvas::draw()
|
||||
|
||||
void NodeCanvas::handle_resize(glm::vec2 old_size, glm::vec2 new_size)
|
||||
{
|
||||
if (new_size.x > m_canvas->m_width)
|
||||
if (new_size.x != m_canvas->m_width || new_size.y != m_canvas->m_height)
|
||||
{
|
||||
#if __IOS__
|
||||
m_canvas->m_mixer.create((int)new_size.x * m_canvas->m_mixer_scale,
|
||||
|
||||
Reference in New Issue
Block a user