mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Renamed XX-bits -> XX-bit in comments to match what the world appears to be using.
This commit is contained in:
@ -293,7 +293,7 @@ CODE
|
||||
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));
|
||||
|
||||
// Render 'pcmd->ElemCount/3' indexed triangles.
|
||||
// By default the indices ImDrawIdx are 16-bits, you can change them to 32-bits in imconfig.h if your engine doesn't support 16-bits indices.
|
||||
// By default the indices ImDrawIdx are 16-bit, you can change them to 32-bit in imconfig.h if your engine doesn't support 16-bit indices.
|
||||
MyEngineDrawIndexedTriangles(pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer, vtx_buffer);
|
||||
}
|
||||
idx_buffer += pcmd->ElemCount;
|
||||
@ -1186,7 +1186,7 @@ const char* ImStrchrRange(const char* str, const char* str_end, char c)
|
||||
|
||||
int ImStrlenW(const ImWchar* str)
|
||||
{
|
||||
//return (int)wcslen((const wchar_t*)str); // FIXME-OPT: Could use this when wchar_t are 16-bits
|
||||
//return (int)wcslen((const wchar_t*)str); // FIXME-OPT: Could use this when wchar_t are 16-bit
|
||||
int n = 0;
|
||||
while (*str++) n++;
|
||||
return n;
|
||||
@ -1448,7 +1448,7 @@ void* ImFileLoadToMemory(const char* filename, const char* mode, size_t* out_f
|
||||
// [SECTION] MISC HELPERS/UTILITIES (ImText* functions)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Convert UTF-8 to 32-bits character, process single character input.
|
||||
// Convert UTF-8 to 32-bit character, process single character input.
|
||||
// Based on stb_from_utf8() from github.com/nothings/stb/
|
||||
// We handle UTF-8 decoding error by skipping forward.
|
||||
int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end)
|
||||
@ -3910,7 +3910,7 @@ static void AddDrawListToDrawData(ImVector<ImDrawList*>* out_list, ImDrawList* d
|
||||
// (A) Handle the ImDrawCmd::VtxOffset value in your renderer back-end, and set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset'.
|
||||
// Most example back-ends already support this from 1.71. Pre-1.71 back-ends won't.
|
||||
// Some graphics API such as GL ES 1/2 don't have a way to offset the starting vertex so it is not supported for them.
|
||||
// (B) Or handle 32-bits indices in your renderer back-end, and uncomment '#define ImDrawIdx unsigned int' line in imconfig.h.
|
||||
// (B) Or handle 32-bit indices in your renderer back-end, and uncomment '#define ImDrawIdx unsigned int' line in imconfig.h.
|
||||
// Most example back-ends already support this. For example, the OpenGL example code detect index size at compile-time:
|
||||
// glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer_offset);
|
||||
// Your own engine or render API may use different parameters or function calls to specify index sizes.
|
||||
|
Reference in New Issue
Block a user