From 49f3d10f475df03739cf98e9a79c6eadbc66fc3c Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 18:45:10 -0400 Subject: [PATCH 01/13] Add files via upload --- addons/godot-next/icons/icon_back_buffer.png | Bin 0 -> 186 bytes .../icons/icon_back_buffer.png.import | 34 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 addons/godot-next/icons/icon_back_buffer.png create mode 100644 addons/godot-next/icons/icon_back_buffer.png.import diff --git a/addons/godot-next/icons/icon_back_buffer.png b/addons/godot-next/icons/icon_back_buffer.png new file mode 100644 index 0000000000000000000000000000000000000000..3ce9e1e3361693df400bca4ce3c5c33763f5cbb6 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}E0G|-orSI1OnU4ME6@e5}NswRge}<>q4ZMIn&H|6fVg?4j!ywFfJby(B zP*C5~#W6%9I61+E*@2Nw0$7V WV3_#m_}gtjtqh*7elF{r5}E)F4=-{6 literal 0 HcmV?d00001 diff --git a/addons/godot-next/icons/icon_back_buffer.png.import b/addons/godot-next/icons/icon_back_buffer.png.import new file mode 100644 index 0000000..b7a3752 --- /dev/null +++ b/addons/godot-next/icons/icon_back_buffer.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon_back_buffer.png-c20901d71b7cc8e79e1ef6b48c0ff4df.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/godot-next/icons/icon_back_buffer.png" +dest_files=[ "res://.import/icon_back_buffer.png-c20901d71b7cc8e79e1ef6b48c0ff4df.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 From 248e03228d3b04b94c4f7904f3e17f369f887e1e Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 18:46:05 -0400 Subject: [PATCH 02/13] Added back buffer panel --- addons/godot-next/gui/back_buffer_panel.gd | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 addons/godot-next/gui/back_buffer_panel.gd diff --git a/addons/godot-next/gui/back_buffer_panel.gd b/addons/godot-next/gui/back_buffer_panel.gd new file mode 100644 index 0000000..dad87e7 --- /dev/null +++ b/addons/godot-next/gui/back_buffer_panel.gd @@ -0,0 +1,13 @@ +tool +extends Control +class_name BackBufferPanel, "res://addons/godot-next/icons/icon_back_buffer.png" + +onready var rid = get_canvas_item() + +func _ready(): + update() + +func _draw(): + var rect: Rect2 = get_global_rect() + rect.position.y = get_viewport_rect().size.y - rect.position.y - rect.size.y + VisualServer.canvas_item_set_copy_to_backbuffer(rid,visible,rect) From f6b4e77c4db5b4333668c2924be38efcb6767bf5 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 18:48:12 -0400 Subject: [PATCH 03/13] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7ec61a5..22cfd9b 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ That's it! I hope you've got ideas of what you'd like to share with others. |-|-|-| |[Array2D](addons/godot-next/references/array_2d.gd)|A 2D Array class.|GDScript |[ArrayMap](addons/godot-next/resources/array_map.gd)|A Resource that maps String keys to Variants in an Array for fast iteration. Serializes all data as individual properties to avoid storage bugs in Godot 3.x.|GDScript +|[NackBufferPanel](addons/godot-next/gui/back_buffer_panel.gd)|A Control that copies its region to the backbuffer.|GDScript |[BitFlag](addons/godot-next/references/bit_flag.gd)|A class that allows abstracts away the complexity of handling bit flag enum types.|GDScript |[Bitset](addons/godot-next/references/bitset.gd)|A class that allows for easily manipulated bitmasks of any size.|GDScript |[Behavior](addons/godot-next/resources/behavior.gd)|A Resource type that automatically calls Node-like notification methods when paired with the CallbackDelegator class.|GDScript From b4b4c028eee4685eb447437923a29b392b4265c2 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 18:48:34 -0400 Subject: [PATCH 04/13] fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22cfd9b..e53168c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ That's it! I hope you've got ideas of what you'd like to share with others. |-|-|-| |[Array2D](addons/godot-next/references/array_2d.gd)|A 2D Array class.|GDScript |[ArrayMap](addons/godot-next/resources/array_map.gd)|A Resource that maps String keys to Variants in an Array for fast iteration. Serializes all data as individual properties to avoid storage bugs in Godot 3.x.|GDScript -|[NackBufferPanel](addons/godot-next/gui/back_buffer_panel.gd)|A Control that copies its region to the backbuffer.|GDScript +|[BackBufferPanel](addons/godot-next/gui/back_buffer_panel.gd)|A Control that copies its region to the backbuffer.|GDScript |[BitFlag](addons/godot-next/references/bit_flag.gd)|A class that allows abstracts away the complexity of handling bit flag enum types.|GDScript |[Bitset](addons/godot-next/references/bitset.gd)|A class that allows for easily manipulated bitmasks of any size.|GDScript |[Behavior](addons/godot-next/resources/behavior.gd)|A Resource type that automatically calls Node-like notification methods when paired with the CallbackDelegator class.|GDScript From 872fd24b83f66c347650373d52faa35f3657a374 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 18:53:16 -0400 Subject: [PATCH 05/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e53168c..bb3cebc 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ That's it! I hope you've got ideas of what you'd like to share with others. |-|-|-| |[Array2D](addons/godot-next/references/array_2d.gd)|A 2D Array class.|GDScript |[ArrayMap](addons/godot-next/resources/array_map.gd)|A Resource that maps String keys to Variants in an Array for fast iteration. Serializes all data as individual properties to avoid storage bugs in Godot 3.x.|GDScript -|[BackBufferPanel](addons/godot-next/gui/back_buffer_panel.gd)|A Control that copies its region to the backbuffer.|GDScript +|[BackBufferPanel](addons/godot-next/gui/back_buffer_panel.gd)|A Control that copies its region to the render buffer so it can be used in screen-reading shaders.|GDScript |[BitFlag](addons/godot-next/references/bit_flag.gd)|A class that allows abstracts away the complexity of handling bit flag enum types.|GDScript |[Bitset](addons/godot-next/references/bitset.gd)|A class that allows for easily manipulated bitmasks of any size.|GDScript |[Behavior](addons/godot-next/resources/behavior.gd)|A Resource type that automatically calls Node-like notification methods when paired with the CallbackDelegator class.|GDScript From c4c8e2afcbf1d8f352922750ced0d0b59b5c4e15 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 18:56:43 -0400 Subject: [PATCH 06/13] Add files via upload --- addons/godot-next/gui/back_buffer_panel.gd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/godot-next/gui/back_buffer_panel.gd b/addons/godot-next/gui/back_buffer_panel.gd index dad87e7..22c660c 100644 --- a/addons/godot-next/gui/back_buffer_panel.gd +++ b/addons/godot-next/gui/back_buffer_panel.gd @@ -1,13 +1,16 @@ tool extends Control class_name BackBufferPanel, "res://addons/godot-next/icons/icon_back_buffer.png" +# author: Tlitookilakin +# Description: Copies its render region to the render buffer for shader purposes -onready var rid = get_canvas_item() +onready var rid = get_canvas_item() # get RID func _ready(): - update() + update() #first-time update func _draw(): var rect: Rect2 = get_global_rect() + # screen-space coordinates are y-flipped rect.position.y = get_viewport_rect().size.y - rect.position.y - rect.size.y VisualServer.canvas_item_set_copy_to_backbuffer(rid,visible,rect) From cd499ac755a4b671836a4e16f6580b74f1016364 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 19:25:04 -0400 Subject: [PATCH 07/13] Add files via upload --- addons/godot-next/gui/back_buffer_panel.gd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/godot-next/gui/back_buffer_panel.gd b/addons/godot-next/gui/back_buffer_panel.gd index 22c660c..775201c 100644 --- a/addons/godot-next/gui/back_buffer_panel.gd +++ b/addons/godot-next/gui/back_buffer_panel.gd @@ -1,4 +1,3 @@ -tool extends Control class_name BackBufferPanel, "res://addons/godot-next/icons/icon_back_buffer.png" # author: Tlitookilakin @@ -6,10 +5,9 @@ class_name BackBufferPanel, "res://addons/godot-next/icons/icon_back_buffer.png" onready var rid = get_canvas_item() # get RID -func _ready(): - update() #first-time update - func _draw(): + if rid == null: + rid = get_canvas_item() var rect: Rect2 = get_global_rect() # screen-space coordinates are y-flipped rect.position.y = get_viewport_rect().size.y - rect.position.y - rect.size.y From f87f55e787a125525ce469fd068a6f24a7397610 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 19:38:44 -0400 Subject: [PATCH 08/13] Delete icon_back_buffer.png --- addons/godot-next/icons/icon_back_buffer.png | Bin 186 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 addons/godot-next/icons/icon_back_buffer.png diff --git a/addons/godot-next/icons/icon_back_buffer.png b/addons/godot-next/icons/icon_back_buffer.png deleted file mode 100644 index 3ce9e1e3361693df400bca4ce3c5c33763f5cbb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}E0G|-orSI1OnU4ME6@e5}NswRge}<>q4ZMIn&H|6fVg?4j!ywFfJby(B zP*C5~#W6%9I61+E*@2Nw0$7V WV3_#m_}gtjtqh*7elF{r5}E)F4=-{6 From e2f2f1a539649c6da9d71ad3fe35088fcfc93ce9 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 19:39:01 -0400 Subject: [PATCH 09/13] Delete icon_back_buffer.png.import --- .../icons/icon_back_buffer.png.import | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 addons/godot-next/icons/icon_back_buffer.png.import diff --git a/addons/godot-next/icons/icon_back_buffer.png.import b/addons/godot-next/icons/icon_back_buffer.png.import deleted file mode 100644 index b7a3752..0000000 --- a/addons/godot-next/icons/icon_back_buffer.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/icon_back_buffer.png-c20901d71b7cc8e79e1ef6b48c0ff4df.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/godot-next/icons/icon_back_buffer.png" -dest_files=[ "res://.import/icon_back_buffer.png-c20901d71b7cc8e79e1ef6b48c0ff4df.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 From da9b679145c14e262b49640ab6c8ac71185eeb51 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 19:39:22 -0400 Subject: [PATCH 10/13] Add files via upload --- .../icons/icon_back_buffer_panel.svg | 1 + .../icons/icon_back_buffer_panel.svg.import | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 addons/godot-next/icons/icon_back_buffer_panel.svg create mode 100644 addons/godot-next/icons/icon_back_buffer_panel.svg.import diff --git a/addons/godot-next/icons/icon_back_buffer_panel.svg b/addons/godot-next/icons/icon_back_buffer_panel.svg new file mode 100644 index 0000000..8f206e1 --- /dev/null +++ b/addons/godot-next/icons/icon_back_buffer_panel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/godot-next/icons/icon_back_buffer_panel.svg.import b/addons/godot-next/icons/icon_back_buffer_panel.svg.import new file mode 100644 index 0000000..ef437be --- /dev/null +++ b/addons/godot-next/icons/icon_back_buffer_panel.svg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon_back_buffer_panel.svg-7f395dceae456e98151a69912335fa8a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/godot-next/icons/icon_back_buffer_panel.svg" +dest_files=[ "res://.import/icon_back_buffer_panel.svg-7f395dceae456e98151a69912335fa8a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 From 2d34ecc88ac257113213e30fe5aab4be969e16c6 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 19:39:41 -0400 Subject: [PATCH 11/13] Add files via upload --- addons/godot-next/gui/back_buffer_panel.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/godot-next/gui/back_buffer_panel.gd b/addons/godot-next/gui/back_buffer_panel.gd index 775201c..7782a28 100644 --- a/addons/godot-next/gui/back_buffer_panel.gd +++ b/addons/godot-next/gui/back_buffer_panel.gd @@ -1,5 +1,5 @@ extends Control -class_name BackBufferPanel, "res://addons/godot-next/icons/icon_back_buffer.png" +class_name BackBufferPanel, "../icons/icon_back_buffer_panel.svg" # author: Tlitookilakin # Description: Copies its render region to the render buffer for shader purposes From 7c29b5830f32774af00427a0364b3cdb9ad8bfc3 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 31 Aug 2021 19:44:04 -0400 Subject: [PATCH 12/13] added tool keyword --- addons/godot-next/gui/back_buffer_panel.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/godot-next/gui/back_buffer_panel.gd b/addons/godot-next/gui/back_buffer_panel.gd index 7782a28..0eaabbd 100644 --- a/addons/godot-next/gui/back_buffer_panel.gd +++ b/addons/godot-next/gui/back_buffer_panel.gd @@ -1,3 +1,4 @@ +tool extends Control class_name BackBufferPanel, "../icons/icon_back_buffer_panel.svg" # author: Tlitookilakin From 722d7811c6429c7cf5216eb10bde7835069cd211 Mon Sep 17 00:00:00 2001 From: Wren Date: Thu, 16 Sep 2021 18:59:30 -0400 Subject: [PATCH 13/13] added note for maintainers --- addons/godot-next/gui/back_buffer_panel.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/godot-next/gui/back_buffer_panel.gd b/addons/godot-next/gui/back_buffer_panel.gd index 0eaabbd..7af15be 100644 --- a/addons/godot-next/gui/back_buffer_panel.gd +++ b/addons/godot-next/gui/back_buffer_panel.gd @@ -10,6 +10,6 @@ func _draw(): if rid == null: rid = get_canvas_item() var rect: Rect2 = get_global_rect() - # screen-space coordinates are y-flipped + # screen-space coordinates are y-flipped. Remove in Godot 4.0. rect.position.y = get_viewport_rect().size.y - rect.position.y - rect.size.y VisualServer.canvas_item_set_copy_to_backbuffer(rid,visible,rect)