summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/target.cpp
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-02-18 15:57:34 +0100
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-02-21 03:03:23 +0100
commit9a47a870df619656e9092f2f77622e84e640307a (patch)
treeb8640bf79ffb55d0c9ed6fc27bbd4ce16a5e1a2e /src/osd/modules/render/bgfx/target.cpp
parentdadf8e7d79696996ab3ef840fe99a588ede538fa (diff)
First take on render API reorg, nw
Diffstat (limited to 'src/osd/modules/render/bgfx/target.cpp')
-rw-r--r--src/osd/modules/render/bgfx/target.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/target.cpp b/src/osd/modules/render/bgfx/target.cpp
new file mode 100644
index 00000000000..b45ccde519e
--- /dev/null
+++ b/src/osd/modules/render/bgfx/target.cpp
@@ -0,0 +1,12 @@
+#include "target.h"
+
+bgfx_target::bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, bool filter)
+ : bgfx_texture(name, format, width, height, nullptr, BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | (filter ? 0 : (BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT)))
+{
+ m_target = bgfx::createFrameBuffer(1, &m_handle, false);
+}
+
+bgfx_target::~bgfx_target()
+{
+ bgfx::destroyFrameBuffer(m_target);
+}