mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 15:07:43 +00:00
Graphics debug groups and bug fixes
This commit is contained in:
@@ -344,4 +344,25 @@ public:
|
||||
void Draw() const { CGraphics::DrawArray(m_start, m_vec.size() - m_start); }
|
||||
};
|
||||
|
||||
#ifdef BOO_GRAPHICS_DEBUG_GROUPS
|
||||
class GraphicsDebugGroup {
|
||||
/* Stack only */
|
||||
void* operator new(size_t);
|
||||
void operator delete(void*);
|
||||
void* operator new[](size_t);
|
||||
void operator delete[](void*);
|
||||
public:
|
||||
explicit GraphicsDebugGroup(const char* name, const zeus::CColor& color = zeus::skWhite) {
|
||||
zeus::simd_floats f(color.mSimd);
|
||||
CGraphics::g_BooMainCommandQueue->pushDebugGroup(name, f.array());
|
||||
}
|
||||
~GraphicsDebugGroup() {
|
||||
CGraphics::g_BooMainCommandQueue->popDebugGroup();
|
||||
}
|
||||
};
|
||||
#define SCOPED_GRAPHICS_DEBUG_GROUP(...) GraphicsDebugGroup _GfxDbg_(__VA_ARGS__);
|
||||
#else
|
||||
#define SCOPED_GRAPHICS_DEBUG_GROUP(...)
|
||||
#endif
|
||||
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user