summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/renderer_d3d9.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/renderer_d3d9.h')
-rw-r--r--3rdparty/bgfx/src/renderer_d3d9.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/3rdparty/bgfx/src/renderer_d3d9.h b/3rdparty/bgfx/src/renderer_d3d9.h
index 0bef1737058..0b0e030dc5c 100644
--- a/3rdparty/bgfx/src/renderer_d3d9.h
+++ b/3rdparty/bgfx/src/renderer_d3d9.h
@@ -325,12 +325,22 @@ namespace bgfx { namespace d3d9
void destroy()
{
- DX_RELEASE(m_ptr, 0);
+ if (0 == (m_flags & BGFX_TEXTURE_INTERNAL_SHARED) )
+ {
+ DX_RELEASE(m_ptr, 0);
+ }
DX_RELEASE(m_surface, 0);
DX_RELEASE(m_staging, 0);
m_textureFormat = TextureFormat::Unknown;
}
+ void overrideInternal(uintptr_t _ptr)
+ {
+ destroy();
+ m_flags |= BGFX_TEXTURE_INTERNAL_SHARED;
+ m_ptr = (IDirect3DBaseTexture9*)_ptr;
+ }
+
void updateBegin(uint8_t _side, uint8_t _mip);
void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem);
void updateEnd();
@@ -379,7 +389,7 @@ namespace bgfx { namespace d3d9
m_depthHandle.idx = invalidHandle;
}
- void create(uint8_t _num, const TextureHandle* _handles);
+ void create(uint8_t _num, const Attachment* _attachment);
void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat);
uint16_t destroy();
HRESULT present();