Skip to content

Commit 7bfa1b6

Browse files
committed
Remove *New versions of methods, since now is possible to change the pointer explicitly
1 parent 60cb864 commit 7bfa1b6

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

imgui-binding/src/main/java/imgui/ImGui.java

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -477,24 +477,12 @@ public static boolean begin(String title, ImBoolean pOpen, int imGuiWindowFlags)
477477

478478
/**
479479
* Get draw list associated to the current window, to append your own drawing primitives
480-
* <p>
481-
* BINDING NOTICE: to minimize overhead, method ALWAYS returns the same object, but changes its underlying pointer.
482-
* If you need to get an object with constant pointer (which will point to the same window all the time) use {@link #getWindowDrawListNew()}.
483480
*/
484481
public static ImDrawList getWindowDrawList() {
485482
WINDOW_DRAW_LIST.ptr = nGetWindowDrawList();
486483
return WINDOW_DRAW_LIST;
487484
}
488485

489-
/**
490-
* Get draw list associated to the current window, to append your own drawing primitives
491-
* <p>
492-
* BINDING NOTICE: returns {@link ImDrawList} for current window with constant pointer to it. Prefer to use {@link #getWindowDrawList()}.
493-
*/
494-
public static ImDrawList getWindowDrawListNew() {
495-
return new ImDrawList(nGetWindowDrawList());
496-
}
497-
498486
private static native long nGetWindowDrawList(); /*
499487
return (intptr_t)ImGui::GetWindowDrawList();
500488
*/
@@ -4907,51 +4895,25 @@ public static Object getDragDropPayloadObject() {
49074895
/**
49084896
* Get background draw list for the viewport associated to the current window.
49094897
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
4910-
* <p>
4911-
* BINDING NOTICE: to minimize overhead, method ALWAYS returns the same object, but changes its underlying pointer.
4912-
* If you need to get an object with constant pointer (which will point to the same background all the time) use {@link #getBackgroundDrawListNew()}.
49134898
*/
49144899
public static ImDrawList getBackgroundDrawList() {
49154900
BACKGROUND_DRAW_LIST.ptr = nGetBackgroundDrawList();
49164901
return BACKGROUND_DRAW_LIST;
49174902
}
49184903

4919-
/**
4920-
* Get background draw list for the viewport associated to the current window.
4921-
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
4922-
* <p>
4923-
* BINDING NOTICE: returns {@link ImDrawList} for current background with constant pointer to it. Prefer to use {@link #getBackgroundDrawList()}.
4924-
*/
4925-
public static ImDrawList getBackgroundDrawListNew() {
4926-
return new ImDrawList(nGetBackgroundDrawList());
4927-
}
4928-
49294904
private static native long nGetBackgroundDrawList(); /*
49304905
return (intptr_t)ImGui::GetBackgroundDrawList();
49314906
*/
49324907

49334908
/**
49344909
* Get foreground draw list for the viewport associated to the current window.
49354910
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
4936-
* <p>
4937-
* BINDING NOTICE: to minimize overhead, method ALWAYS returns the same object, but changes its underlying pointer.
4938-
* If you need to get an object with constant pointer (which will point to the same foreground all the time) use {@link #getForegroundDrawListNew()}.
49394911
*/
49404912
public static ImDrawList getForegroundDrawList() {
49414913
FOREGROUND_DRAW_LIST.ptr = nGetForegroundDrawList();
49424914
return FOREGROUND_DRAW_LIST;
49434915
}
49444916

4945-
/**
4946-
* Get foreground draw list for the viewport associated to the current window.
4947-
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
4948-
* <p>
4949-
* BINDING NOTICE: returns {@link ImDrawList} for current foreground with constant pointer to it. Prefer to use {@link #getForegroundDrawList()}.
4950-
*/
4951-
public static ImDrawList getForegroundDrawListNew() {
4952-
return new ImDrawList(nGetForegroundDrawList());
4953-
}
4954-
49554917
private static native long nGetForegroundDrawList(); /*
49564918
return (intptr_t)ImGui::GetForegroundDrawList();
49574919
*/
@@ -4976,22 +4938,11 @@ public static void setStateStorage(final ImGuiStorage storage) {
49764938
ImGui::SetStateStorage((ImGuiStorage*)imGuiStoragePtr);
49774939
*/
49784940

4979-
/**
4980-
* BINDING NOTICE: to minimize overhead, method ALWAYS returns the same object, but changes its underlying pointer.
4981-
* If you need to get an object with constant pointer (which will point to the same window all the time) use {@link #getStateStorageNew()}.
4982-
*/
49834941
public static ImGuiStorage getStateStorage() {
49844942
IMGUI_STORAGE.ptr = nGetStateStorage();
49854943
return IMGUI_STORAGE;
49864944
}
49874945

4988-
/**
4989-
* BINDING NOTICE: returns {@link ImGuiStorage} for current window with constant pointer to it. Prefer to use {@link #getStateStorage()}.
4990-
*/
4991-
public static ImGuiStorage getStateStorageNew() {
4992-
return new ImGuiStorage(nGetStateStorage());
4993-
}
4994-
49954946
private static native long nGetStateStorage(); /*
49964947
return (intptr_t)ImGui::GetStateStorage();
49974948
*/

0 commit comments

Comments
 (0)