draw-through

it is possible to render with OpenGL/DX by using draw-through.
This commit is contained in:
cnjinhao
2015-01-12 09:39:28 +08:00
parent 7496fea110
commit f67dbdb14b
10 changed files with 101 additions and 10 deletions

View File

@@ -20,19 +20,27 @@ namespace nana
//@brief: This name is only visible for this compiling-unit
namespace restrict
{
typedef detail::bedrock::core_window_t core_window_t;
extern detail::bedrock& bedrock;
inline detail::drawer& get_drawer(window wd)
namespace
{
return reinterpret_cast<core_window_t*>(wd)->drawer;
using core_window_t = detail::bedrock::core_window_t;
inline detail::drawer& get_drawer(window wd)
{
return reinterpret_cast<core_window_t*>(wd)->drawer;
}
}
}
//class drawing
drawing::drawing(window wd)
:handle_(wd)
{}
{
if (!API::is_window(wd))
throw std::invalid_argument("drawing: invalid window parameter");
if (reinterpret_cast<restrict::core_window_t*>(wd)->is_draw_through())
throw std::invalid_argument("drawing: the window is draw_through enabled");
}
drawing::~drawing(){} //Just for polymorphism