Skip to content

Commit

Permalink
AA branch: Re-added PrimVtx() + PrimWriteVtx, PrimWriteIdx for finer …
Browse files Browse the repository at this point in the history
…control (#133)
  • Loading branch information
ocornut committed Jul 8, 2015
1 parent 2f574ef commit 09e8c4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};
Expand Down

0 comments on commit 09e8c4e

Please sign in to comment.