mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 13:38:35 +00:00
Pass vtx_offset and idx_offset to renderers
This commit is contained in:
parent
09f4ad6cf0
commit
a64cb2eb4d
@ -212,6 +212,7 @@ where
|
||||
DrawCmdParams {
|
||||
clip_rect,
|
||||
texture_id,
|
||||
..
|
||||
},
|
||||
} => {
|
||||
let clip_rect = [
|
||||
|
||||
@ -157,6 +157,7 @@ impl GliumRenderer {
|
||||
DrawCmdParams {
|
||||
clip_rect,
|
||||
texture_id,
|
||||
..
|
||||
},
|
||||
} => {
|
||||
let idx_end = idx_start + count;
|
||||
|
||||
@ -164,6 +164,8 @@ impl<'a> Iterator for DrawCmdIterator<'a> {
|
||||
let cmd_params = DrawCmdParams {
|
||||
clip_rect: cmd.ClipRect.into(),
|
||||
texture_id: TextureId::from(cmd.TextureId),
|
||||
vtx_offset: cmd.VtxOffset as usize,
|
||||
idx_offset: cmd.IdxOffset as usize,
|
||||
};
|
||||
if let Some(raw_callback) = cmd.UserCallback {
|
||||
DrawCmd::RawCallback {
|
||||
@ -186,6 +188,8 @@ pub type DrawIdx = sys::ImDrawIdx;
|
||||
pub struct DrawCmdParams {
|
||||
pub clip_rect: [f32; 4],
|
||||
pub texture_id: TextureId,
|
||||
pub vtx_offset: usize,
|
||||
pub idx_offset: usize,
|
||||
}
|
||||
|
||||
pub enum DrawCmd {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user