proper blitting without texture attachment added - need to redo and refactor the stuff in pipeline

This commit is contained in:
Hartmut Seichter 2019-01-16 18:52:39 +01:00
parent 351d29cd54
commit 075d18b4b8
7 changed files with 153 additions and 97 deletions

View file

@ -23,6 +23,7 @@ public:
void set_size(const size& s);
pw::size size() const;
pw::size client_size() const;
void set_position(const point& p);
point position() const;

View file

@ -95,6 +95,9 @@ struct window::impl {
static void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
window::impl* impl = static_cast<window::impl*>(glfwGetWindowUserPointer(window));
debug::d() << "window::frame_buffer_size_callback " << width << "x" << height;
// impl->on_resize(width,height);
// std::cout << "framebuffer " << width << "x" << height << std::endl;
@ -218,9 +221,9 @@ struct window::impl {
glfwSetWindowTitle(_window,title.c_str());
}
void set_size(int w,int h)
void set_size(const ::pw::sizei& s)
{
glfwSetWindowSize(_window,w,h);
glfwSetWindowSize(_window,s.width,s.height);
}
::pw::size size() const
@ -230,6 +233,14 @@ struct window::impl {
return ::pw::size(w,h);
}
::pw::size client_size() const
{
int w,h;
glfwGetFramebufferSize(_window,&w,&h);
return ::pw::size(w,h);
}
::pw::point position() const
{
int x,y;
@ -237,9 +248,9 @@ struct window::impl {
return ::pw::point(x,y);
}
void set_position(int x,int y)
void set_position(const pointi& p)
{
glfwSetWindowPos(_window,x,y);
glfwSetWindowPos(_window,p.x,p.y);
}
void set_fullscreen(bool use_fullscreen)
@ -299,7 +310,7 @@ void window::set_title(const std::string& title)
void window::set_size(const ::pw::size& s)
{
_impl->set_size(static_cast<int>(std::round(s.width)),static_cast<int>(std::round(s.height)));
_impl->set_size(s.cast<int>());
}
size window::size() const
@ -307,9 +318,14 @@ size window::size() const
return _impl->size();
}
size window::client_size() const
{
return _impl->client_size();
}
void window::set_position(const point &p)
{
_impl->set_position(p.x,p.y);
_impl->set_position(p.cast<int>());
}
point window::position() const