Merge remote-tracking branch 'origin' into 2015-03-antialiased-primitives

Conflicts:
	examples/directx11_example/imgui_impl_dx11.cpp
	examples/directx9_example/imgui_impl_dx9.cpp
	examples/opengl3_example/imgui_impl_glfw_gl3.cpp
	examples/opengl_example/imgui_impl_glfw.cpp
	imgui.cpp
This commit is contained in:
ocornut
2015-07-07 12:15:35 -06:00
7 changed files with 217 additions and 227 deletions

View File

@ -119,7 +119,7 @@ static void ImGui_ImplDX11_RenderDrawLists(ImDrawData* draw_data)
for (int n = 0; n < draw_data->cmd_lists_count; n++)
{
const ImDrawList* cmd_list = draw_data->cmd_lists[n];
for (size_t cmd_i = 0; cmd_i < cmd_list->cmd_buffer.size(); cmd_i++)
for (int cmd_i = 0; cmd_i < cmd_list->cmd_buffer.size(); cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->cmd_buffer[cmd_i];
if (pcmd->user_callback)

View File

@ -43,7 +43,7 @@ static void ImGui_ImplDX9_RenderDrawLists(ImDrawData* draw_data)
{
const ImDrawList* cmd_list = draw_data->cmd_lists[n];
const ImDrawVert* vtx_src = &cmd_list->vtx_buffer[0];
for (size_t i = 0; i < cmd_list->vtx_buffer.size(); i++)
for (int i = 0; i < cmd_list->vtx_buffer.size(); i++)
{
vtx_dst->pos.x = vtx_src->pos.x;
vtx_dst->pos.y = vtx_src->pos.y;
@ -97,7 +97,7 @@ static void ImGui_ImplDX9_RenderDrawLists(ImDrawData* draw_data)
for (int n = 0; n < draw_data->cmd_lists_count; n++)
{
const ImDrawList* cmd_list = draw_data->cmd_lists[n];
for (size_t cmd_i = 0; cmd_i < cmd_list->cmd_buffer.size(); cmd_i++)
for (int cmd_i = 0; cmd_i < cmd_list->cmd_buffer.size(); cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->cmd_buffer[cmd_i];
if (pcmd->user_callback)

View File

@ -23,7 +23,7 @@ static GLuint g_FontTexture = 0;
static int g_ShaderHandle = 0, g_VertHandle = 0, g_FragHandle = 0;
static int g_AttribLocationTex = 0, g_AttribLocationProjMtx = 0;
static int g_AttribLocationPosition = 0, g_AttribLocationUV = 0, g_AttribLocationColor = 0;
static size_t g_VboSize = 0;
static int g_VboSize = 0;
static unsigned int g_VboHandle = 0, g_VaoHandle = 0;
// This is the main rendering function that you have to implement and provide to ImGui (via setting up 'RenderDrawListsFn' in the ImGuiIO structure)
@ -59,7 +59,7 @@ static void ImGui_ImplGlfwGL3_RenderDrawLists(ImDrawData* draw_data)
// Grow our buffer according to what we need
glBindBuffer(GL_ARRAY_BUFFER, g_VboHandle);
size_t needed_vtx_size = draw_data->total_vtx_count * sizeof(ImDrawVert);
int needed_vtx_size = draw_data->total_vtx_count * sizeof(ImDrawVert);
if (g_VboSize < needed_vtx_size)
{
g_VboSize = needed_vtx_size + 5000 * sizeof(ImDrawVert); // Grow buffer

View File

@ -62,7 +62,7 @@ static void ImGui_ImplGlfw_RenderDrawLists(ImDrawData* draw_data)
glTexCoordPointer(2, GL_FLOAT, sizeof(ImDrawVert), (void*)(vtx_buffer + OFFSETOF(ImDrawVert, uv)));
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert), (void*)(vtx_buffer + OFFSETOF(ImDrawVert, col)));
for (size_t cmd_i = 0; cmd_i < cmd_list->cmd_buffer.size(); cmd_i++)
for (int cmd_i = 0; cmd_i < cmd_list->cmd_buffer.size(); cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->cmd_buffer[cmd_i];
if (pcmd->user_callback)