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.
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.
|
void |
getCmdListCmdBufferClipRect(ImVec4 dst,
int cmdListIdx,
int cmdBufferIdx)
Clipping rectangle (x1, y1, x2, y2).
|
ImVec4 |
getCmdListCmdBufferClipRect(int cmdListIdx,
int cmdBufferIdx)
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.
|
long |
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 dst)
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 dst)
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 dst)
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.
|
void |
scaleClipRects(ImVec2 fbScale)
Helper to scale the ClipRect field of each ImDrawCmd.
|
static int |
sizeOfImDrawIdx() |
static int |
sizeOfImDrawVert() |
isNotValidPtr, isValidPtr
public int getCmdListCmdBufferSize(int cmdListIdx)
public int getCmdListCmdBufferElemCount(int cmdListIdx, int cmdBufferIdx)
public ImVec4 getCmdListCmdBufferClipRect(int cmdListIdx, int cmdBufferIdx)
public void getCmdListCmdBufferClipRect(ImVec4 dst, int cmdListIdx, int cmdBufferIdx)
public long 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 float getDisplayPosX()
public float getDisplayPosY()
public void getDisplayPos(ImVec2 dst)
public ImVec2 getDisplaySize()
public float getDisplaySizeX()
public float getDisplaySizeY()
public void getDisplaySize(ImVec2 dst)
public ImVec2 getFramebufferScale()
public float getFramebufferScaleX()
public float getFramebufferScaleY()
public void getFramebufferScale(ImVec2 dst)
public ImGuiViewport getOwnerViewport()
public void deIndexAllBuffers()
public void scaleClipRects(ImVec2 fbScale)
public void scaleClipRects(float fbScaleX, float fbScaleY)