Lines Matching refs:pcmd
284 const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
285 if (pcmd->UserCallback)
287 pcmd->UserCallback(cmd_list, pcmd);
291 // The texture for the draw call is specified by pcmd->TextureId.
293 MyEngineBindTexture((MyTexture*)pcmd->TextureId);
302 // - Note that pcmd->ClipRect contains Min+Max bounds. Some graphics API may use Min+Max, other may use Min+Size (size being Max-Min)
304 MyEngineScissor((int)(pcmd->ClipRect.x - pos.x), (int)(pcmd->ClipRect.y - pos.y), (int)(pcmd->ClipRect.z - pos.x), (int)(pcmd->ClipRect.w - pos.y));
306 // Render 'pcmd->ElemCount/3' indexed triangles.
308 MyEngineDrawIndexedTriangles(pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer, vtx_buffer);
310 idx_buffer += pcmd->ElemCount;
610 MyTexture* texture = (MyTexture*)pcmd->TextureId;
3678 // glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer_offset);
9319 for (const ImDrawCmd* pcmd = draw_list->CmdBuffer.begin(); pcmd < draw_list->CmdBuffer.end(); elem_offset += pcmd->ElemCount, pcmd++)
9321 if (pcmd->UserCallback == NULL && pcmd->ElemCount == 0)
9323 if (pcmd->UserCallback)
9325 ImGui::BulletText("Callback %p, user_data %p", pcmd->UserCallback, pcmd->UserCallbackData);
9329 bool pcmd_node_open = ImGui::TreeNode((void*)(pcmd - draw_list->CmdBuffer.begin()), "Draw %4d %s vtx, tex 0x%p, clip_rect (%4.0f,%4.0f)-(%4.0f,%4.0f)", pcmd->ElemCount, draw_list->IdxBuffer.Size > 0 ? "indexed" : "non-indexed", pcmd->TextureId, pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w);
9332 ImRect clip_rect = pcmd->ClipRect;
9334 for (int i = elem_offset; i < elem_offset + (int)pcmd->ElemCount; i++)
9343 ImGuiListClipper clipper(pcmd->ElemCount/3); // Manually coarse clip our print out of individual vertices to save CPU, only items that may be visible.