public final class ImDrawData extends ImGuiStruct
BINDING NOTICE: Since it's impossible to do a 1:1 mapping with JNI, current class provides "getCmdList*()" methods. Those are used to get the data needed to do a rendering.
Modifier and Type | Field and Description |
---|---|
static int |
SIZEOF_IM_DRAW_IDX |
static int |
SIZEOF_IM_DRAW_VERT |
ptr
Constructor and Description |
---|
ImDrawData(long ptr) |
Modifier and Type | Method and Description |
---|---|
void |
deIndexAllBuffers()
Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed.
|
ImVec4 |
getCmdListCmdBufferClipRect(int cmdListIdx,
int cmdBufferIdx)
Clipping rectangle (x1, y1, x2, y2).
|
void |
getCmdListCmdBufferClipRect(int cmdListIdx,
int cmdBufferIdx,
ImVec4 dstImVec4)
Clipping rectangle (x1, y1, x2, y2).
|
int |
getCmdListCmdBufferElemCount(int cmdListIdx,
int cmdBufferIdx)
Number of indices (multiple of 3) to be rendered as triangles.
|
int |
getCmdListCmdBufferIdxOffset(int cmdListIdx,
int cmdBufferIdx)
Start offset in index buffer.
|
int |
getCmdListCmdBufferSize(int cmdListIdx)
Draw commands.
|
int |
getCmdListCmdBufferTextureId(int cmdListIdx,
int cmdBufferIdx)
User-provided texture ID.
|
int |
getCmdListCmdBufferVtxOffset(int cmdListIdx,
int cmdBufferIdx)
Start offset in vertex buffer.
|
java.nio.ByteBuffer |
getCmdListIdxBufferData(int cmdListIdx) |
int |
getCmdListIdxBufferSize(int cmdListIdx)
Index buffer.
|
int |
getCmdListsCount()
Number of ImDrawList* to render
|
java.nio.ByteBuffer |
getCmdListVtxBufferData(int cmdListIdx) |
int |
getCmdListVtxBufferSize(int cmdListIdx)
Vertex buffer.
|
ImVec2 |
getDisplayPos()
Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
|
void |
getDisplayPos(ImVec2 dstImVec2)
Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
|
float |
getDisplayPosX()
Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
|
float |
getDisplayPosY()
Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
|
ImVec2 |
getDisplaySize()
Size of the viewport to render (== io.DisplaySize for the main viewport)
(DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
|
void |
getDisplaySize(ImVec2 dstImVec2)
Size of the viewport to render (== io.DisplaySize for the main viewport)
(DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
|
float |
getDisplaySizeX()
Size of the viewport to render (== io.DisplaySize for the main viewport)
(DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
|
float |
getDisplaySizeY()
Size of the viewport to render (== io.DisplaySize for the main viewport)
(DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
|
ImVec2 |
getFramebufferScale()
Amount of pixels for each unit of DisplaySize.
|
void |
getFramebufferScale(ImVec2 dstImVec2)
Amount of pixels for each unit of DisplaySize.
|
float |
getFramebufferScaleX()
Amount of pixels for each unit of DisplaySize.
|
float |
getFramebufferScaleY()
Amount of pixels for each unit of DisplaySize.
|
ImGuiViewport |
getOwnerViewport()
Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not).
|
int |
getTotalIdxCount()
For convenience, sum of all ImDrawList's IdxBuffer.Size
|
int |
getTotalVtxCount()
For convenience, sum of all ImDrawList's VtxBuffer.Size
|
boolean |
getValid()
Only valid after Render() is called and before the next NewFrame() is called.
|
void |
scaleClipRects(float fbScaleX,
float fbScaleY)
Helper to scale the ClipRect field of each ImDrawCmd.
|
static int |
sizeOfImDrawIdx() |
static int |
sizeOfImDrawVert() |
isNotValidPtr, isValidPtr
public static final int SIZEOF_IM_DRAW_IDX
public static final int SIZEOF_IM_DRAW_VERT
public int getCmdListCmdBufferSize(int cmdListIdx)
public int getCmdListCmdBufferElemCount(int cmdListIdx, int cmdBufferIdx)
public ImVec4 getCmdListCmdBufferClipRect(int cmdListIdx, int cmdBufferIdx)
public void getCmdListCmdBufferClipRect(int cmdListIdx, int cmdBufferIdx, ImVec4 dstImVec4)
public int getCmdListCmdBufferTextureId(int cmdListIdx, int cmdBufferIdx)
public int getCmdListCmdBufferVtxOffset(int cmdListIdx, int cmdBufferIdx)
>
0 to support meshes larger than 64K vertices with 16-bit indices.public int getCmdListCmdBufferIdxOffset(int cmdListIdx, int cmdBufferIdx)
public int getCmdListIdxBufferSize(int cmdListIdx)
public java.nio.ByteBuffer getCmdListIdxBufferData(int cmdListIdx)
public int getCmdListVtxBufferSize(int cmdListIdx)
public java.nio.ByteBuffer getCmdListVtxBufferData(int cmdListIdx)
public static int sizeOfImDrawVert()
public static int sizeOfImDrawIdx()
public boolean getValid()
public int getCmdListsCount()
public int getTotalIdxCount()
public int getTotalVtxCount()
public ImVec2 getDisplayPos()
public void getDisplayPos(ImVec2 dstImVec2)
public float getDisplayPosX()
public float getDisplayPosY()
public ImVec2 getDisplaySize()
public void getDisplaySize(ImVec2 dstImVec2)
public float getDisplaySizeX()
public float getDisplaySizeY()
public ImVec2 getFramebufferScale()
public void getFramebufferScale(ImVec2 dstImVec2)
public float getFramebufferScaleX()
public float getFramebufferScaleY()
public ImGuiViewport getOwnerViewport()
public void deIndexAllBuffers()
public void scaleClipRects(float fbScaleX, float fbScaleY)