-
Notifications
You must be signed in to change notification settings - Fork 346
Open
Description
I would like to integrate the ImGui.Net into the costume engine based on SlimDX(Directx 9)
In the last few days, I almost integrated, but only missing to solve one single problem. When I render ImGui surfaces and obtain ImDrawCmd, instead of the ImDrawCmd.TextureId needs to obtain the raw texture(byte[] rawtex) to able to reconstruct and draw with SlimDX.
I can not find any way that ImGUI return the array of bytes from one texture ID :( Exist any way to get the texture in a byte from the ImDrawCmd? Exists to get raw texture(byte[]) from ImGUI??
Current status of the code
` ImGui.Render();
ImDrawDataPtr draw_data = ImGui.GetDrawData();
var vertex_offset = 0;
var index_offset = 0;
for (var i = 0; i < draw_data.CmdListsCount; ++i)
{
var command_list = draw_data.CmdListsRange[i];
for (var command_index = 0; command_index < command_list.CmdBuffer.Size; ++command_index)
{
var draw_command = command_list.CmdBuffer[command_index];
{
DrawPrimitives(vertex_offset, index_offset, command_list, draw_command);
}
index_offset += (int)draw_command.ElemCount;
}
vertex_offset += command_list.VtxBuffer.Size;
}
}`
Metadata
Metadata
Assignees
Labels
No labels
