AA branch: API breaking change documentation

This commit is contained in:
ocornut 2015-07-07 18:31:41 -06:00
parent af7f35d7c2
commit ac56e4e209

View File

@ -141,16 +141,18 @@
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code. Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
- 2015/07/05 (1.42) - switched rendering data to use indexed rendering. this is saving a fair amount of CPU/GPU and enables us to get anti-aliasing for a marginal cost. - 2015/07/05 (1.42) - switched rendering data to use indexed rendering. this is saving a fair amount of CPU/GPU and enables us to get anti-aliasing for a marginal cost.
this necessary change will break your rendering function! the fix should be very easy. this necessary change will break your rendering function! the fix should be very easy. sorry for that :(
- if you are using a vanilla copy of one of the imgui_impl_XXXX.cpp provided in the example, you just need to update your copy and you can ignore the rest. - if you are using a vanilla copy of one of the imgui_impl_XXXX.cpp provided in the example, you just need to update your copy and you can ignore the rest.
- the signature of io.RenderDrawListsFn has changed! - the signature of io.RenderDrawListsFn has changed!
ImGui_XXXX_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_count) ImGui_XXXX_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_count)
became: became:
ImGui_XXXX_RenderDrawLists(ImDrawData* draw_data). ImGui_XXXX_RenderDrawLists(ImDrawData* draw_data).
- the ImDrawData structure contains 'cmd_lists', 'cmd_lists_count' and more (that were previously passed as parameters). argument 'cmd_lists' -> 'draw_data->cmd_lists'
argument 'cmd_lists_count' -> 'draw_data->cmd_lists_count'
ImDrawList 'commands' -> 'cmd_buffer'
ImDrawCmd 'vtx_count' -> 'elem_count' (same value, multiple of 3)
- the ImDrawList and ImDrawCmd structures also have changed to allow for indexed rendering. - the ImDrawList and ImDrawCmd structures also have changed to allow for indexed rendering.
each ImDrawList now contains both a vertex buffer (vtx_buffer) and an index buffer (idx_buffer). each ImDrawList now contains both a vertex buffer (vtx_buffer) and an index buffer (idx_buffer). For each command, render elem_count/3 triangles using indices from the index buffer.
renamed the 'vtx_count' field of ImDrawCmd to 'elem_count' to reflect this. Render 'elem_count' (multiple of 3) using indices from the index buffer.
- if you REALLY cannot render indexed primitives, you can call the draw_data->DeIndexAllBuffers() method to de-index your buffer. This is slow and a waste of CPU/GPU. Prefer using indexed rendering! - if you REALLY cannot render indexed primitives, you can call the draw_data->DeIndexAllBuffers() method to de-index your buffer. This is slow and a waste of CPU/GPU. Prefer using indexed rendering!
- refer to code in the examples/ folder or ask on the github if you are unsure of how to upgrade. - refer to code in the examples/ folder or ask on the github if you are unsure of how to upgrade.
- 2015/07/02 (1.42) - renamed SetScrollPosHere() to SetScrollFromCursorPos(). Kept inline redirection function (will obsolete). - 2015/07/02 (1.42) - renamed SetScrollPosHere() to SetScrollFromCursorPos(). Kept inline redirection function (will obsolete).