mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-10-26 12:27:30 +00:00 
			
		
		
		
	AA branch: API breaking change documentation
This commit is contained in:
		
							
								
								
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							| @@ -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. | ||||
|   | ||||
|  - 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. | ||||
|                      - the signature of io.RenderDrawListsFn has changed!  | ||||
|                             ImGui_XXXX_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_count) | ||||
|                        became: | ||||
|                             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. | ||||
|                        each ImDrawList now contains both a vertex buffer (vtx_buffer) and an index buffer (idx_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. | ||||
|                        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. | ||||
|                      - 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. | ||||
|  - 2015/07/02 (1.42) - renamed SetScrollPosHere() to SetScrollFromCursorPos(). Kept inline redirection function (will obsolete). | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 ocornut
					ocornut