Tab->Spaces :(

This commit is contained in:
ocornut
2014-11-30 15:53:47 +00:00
parent 197b2763fc
commit a5a84a9b69
4 changed files with 291 additions and 291 deletions
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -18,7 +18,7 @@ struct CUSTOMVERTEX
{
D3DXVECTOR3 pos;
D3DCOLOR col;
D3DXVECTOR2 uv;
D3DXVECTOR2 uv;
};
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1)
@@ -48,8 +48,8 @@ static void ImImpl_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_c
vtx_dst->pos.y = vtx_src->pos.y;
vtx_dst->pos.z = 0.0f;
vtx_dst->col = (vtx_src->col & 0xFF00FF00) | ((vtx_src->col & 0xFF0000)>>16) | ((vtx_src->col & 0xFF) << 16); // RGBA --> ARGB for DirectX9
vtx_dst->uv.x = vtx_src->uv.x;
vtx_dst->uv.y = vtx_src->uv.y;
vtx_dst->uv.x = vtx_src->uv.x;
vtx_dst->uv.y = vtx_src->uv.y;
vtx_dst++;
vtx_src++;
}
@@ -93,9 +93,9 @@ static void ImImpl_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_c
{
// Render command list
const ImDrawList* cmd_list = cmd_lists[n];
for (size_t cmd_i = 0; cmd_i < cmd_list->commands.size(); cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->commands[cmd_i];
for (size_t cmd_i = 0; cmd_i < cmd_list->commands.size(); cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->commands[cmd_i];
const RECT r = { (LONG)pcmd->clip_rect.x, (LONG)pcmd->clip_rect.y, (LONG)pcmd->clip_rect.z, (LONG)pcmd->clip_rect.w };
g_pd3dDevice->SetScissorRect(&r);
g_pd3dDevice->DrawPrimitive(D3DPT_TRIANGLELIST, vtx_offset, pcmd->vtx_count/3);
+4 -4
View File
@@ -69,17 +69,17 @@ static void ImImpl_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_c
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert), (void*)(vtx_buffer + offsetof(ImDrawVert, col)));
int vtx_offset = 0;
for (size_t cmd_i = 0; cmd_i < cmd_list->commands.size(); cmd_i++)
for (size_t cmd_i = 0; cmd_i < cmd_list->commands.size(); cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->commands[cmd_i];
const ImDrawCmd* pcmd = &cmd_list->commands[cmd_i];
glScissor((int)pcmd->clip_rect.x, (int)(height - pcmd->clip_rect.w), (int)(pcmd->clip_rect.z - pcmd->clip_rect.x), (int)(pcmd->clip_rect.w - pcmd->clip_rect.y));
glDrawArrays(GL_TRIANGLES, vtx_offset, pcmd->vtx_count);
vtx_offset += pcmd->vtx_count;
}
}
// Restore modified state
glDisableClientState(GL_COLOR_ARRAY);
// Restore modified state
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glMatrixMode(GL_MODELVIEW);
+2 -2
View File
@@ -4331,7 +4331,7 @@ void ImGuiTextEditCallbackData::InsertChars(int pos, const char* new_text, const
if (new_text_len + text_len + 1 >= BufSize)
return;
size_t upos = (size_t)pos;
size_t upos = (size_t)pos;
if (text_len != upos)
memmove(Buf + upos + new_text_len, Buf + upos, text_len - upos);
memcpy(Buf + upos, new_text, new_text_len * sizeof(char));
@@ -5798,7 +5798,7 @@ bool ImFont::LoadFromMemory(const void* data, size_t data_size)
IM_ASSERT(Kerning == NULL && KerningCount == 0);
Kerning = (FntKerning*)p;
KerningCount = block_size / sizeof(FntKerning);
break;
break;
default:
break;
}