mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
AA branch: Re-added PrimVtx() + PrimWriteVtx, PrimWriteIdx for finer control (#133)
This commit is contained in:
parent
2f574ef952
commit
09e8c4ec11
4
imgui.h
4
imgui.h
@ -1088,9 +1088,13 @@ struct ImDrawList
|
||||
IMGUI_API void ChannelsSetCurrent(int idx);
|
||||
|
||||
// Internal helpers
|
||||
// NB: all primitives needs to be reserved via PrimReserve() beforehand!
|
||||
IMGUI_API void PrimReserve(int idx_count, int vtx_count);
|
||||
IMGUI_API void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col);
|
||||
IMGUI_API void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col);
|
||||
inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
|
||||
inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col){ _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
|
||||
inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
|
||||
IMGUI_API void UpdateClipRect();
|
||||
IMGUI_API void UpdateTextureID();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user