summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.mailmap3
-rw-r--r--AUTHORS.md14
-rw-r--r--DONORS.md60
-rw-r--r--scene/resources/texture.cpp9
-rw-r--r--scene/resources/texture.h1
-rw-r--r--servers/camera/camera_feed.cpp41
6 files changed, 72 insertions, 56 deletions
diff --git a/.mailmap b/.mailmap
index dd1c35ed57..28bd3c8e56 100644
--- a/.mailmap
+++ b/.mailmap
@@ -32,6 +32,7 @@ Erik Selecký <35656626+rxlecky@users.noreply.github.com> <35656626+SeleckyErik@
Fabian <supagu@gmail.com>
Ferenc Arn <tagcup@yahoo.com>
Ferenc Arn <tagcup@yahoo.com> <tagcup@users.noreply.github.com>
+foxydevloper <12120644+foxydevloper@users.noreply.github.com>
Fredia Huya-Kouadio <fhuyakou@gmail.com>
Fredia Huya-Kouadio <fhuyakou@gmail.com> <fhuya@google.com>
Geequlim <geequlim@gmail.com>
@@ -56,6 +57,7 @@ Indah Sylvia <ISylvox@yahoo.com>
J08nY <johny@neuromancer.sk> <jancar.jj@gmail.com>
J08nY <johny@neuromancer.sk> <J08nY@users.noreply.github.com>
Jakub Grzesik <kubecz3k@gmail.com>
+janglee <merupatel123@gmail.com>
Jérôme Gully <jerome.gully0@gmail.com>
JFonS <joan.fonssanchez@gmail.com>
Juan Linietsky <reduzio@gmail.com>
@@ -92,6 +94,7 @@ Michael Alexsander <michaelalexsander@protonmail.com>
Nathan Franke <natfra@pm.me> <nathanwfranke@gmail.com>
Nathan Lovato <nathan@gdquest.com>
Nathan Warden <nathan@nathanwarden.com> <nathanwardenlee@icloud.com>
+Nicholas Huelin <62965063+SirQuartz@users.noreply.github.com>
Nils ANDRÉ-CHANG <nils@nilsand.re>
Nils ANDRÉ-CHANG <nils@nilsand.re> <nils.andre.chang@gmail.com>
Nuno Donato <nunodonato@gmail.com> <n.donato@estrelasustentavel.pt>
diff --git a/AUTHORS.md b/AUTHORS.md
index c5a971b345..5147da3700 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -35,6 +35,7 @@ name is available.
Andrea Catania (AndreaCatania)
Andrii Doroshenko (Xrayez)
Andy Moss (MillionOstrich)
+ Angad Kambli (angad-k)
Anish Bhobe (KidRigger)
Anton Yabchinskiy (a12n)
Anutrix
@@ -44,6 +45,7 @@ name is available.
Ben Brookshire (sheepandshepherd)
Benjamin Larsson (Nallebeorn)
Bernard Liebl (poke1024)
+ Bhuvan Vemula (Bhu1-V)
Błażej Szczygieł (zaps166)
Bojidar Marinov (bojidar-bg)
Bruno Lourenço (MadEqua)
@@ -65,6 +67,7 @@ name is available.
Dmitry Koteroff (Krakean)
Dominik Jasiński (dreamsComeTrue)
DualMatrix
+ Ellen Poe (ellenhp)
Emmanuel Barroga (codecustard)
Emmanuel Leblond (touilleMan)
Eoin O'Neill (Eoin-ONeill-Yokai)
@@ -75,7 +78,11 @@ name is available.
est31
Fabian Mathews (supagu)
Fabio Alessandrelli (Faless)
+ fabriceci
Ferenc Arn (tagcup)
+ follower
+ foxydevloper
+ François Belair (Razoric480)
Franklin Sobrinho (TheHX)
Fredia Huya-Kouadio (m4gr3d)
Geequlim
@@ -87,8 +94,11 @@ name is available.
Hanif Bin Ariffin (hbina)
Haoyu Qiu (timothyqiu)
Hein-Pieter van Braam-Stewart (hpvb)
+ Hendrik Brucker (Geometror)
+ hilfazer
Hiroshi Ogawa (hi-ogawa)
homer666
+ hoontee
Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ian Bishop (ianb96)
@@ -108,6 +118,7 @@ name is available.
Joshua Grams (JoshuaGrams)
Juan Linietsky (reduz)
Julian Murgia (StraToN)
+ Julien Nguyen (Blackiris)
Justo Delgado (mrcdk)
Kelly Thomas (KellyThomas)
kleonc
@@ -139,6 +150,7 @@ name is available.
Matthias Hölzl (hoelzl)
Max Hilbrunner (mhilbrunner)
merumelu
+ Meru Patel (Janglee123)
Michael Alexsander (YeldhamDev)
MichiRecRoom (LikeLakers2)
mrezai
@@ -146,6 +158,7 @@ name is available.
Nathan Franke (nathanfranke)
Nathan Lovato (NathanLovato)
Nathan Warden (NathanWarden)
+ Nicholas Huelin (SirQuartz)
Nils André-Chang (NilsIrl)
Noah Beard (TwistedTwigleg)
Nuno Donato (nunodonato)
@@ -190,6 +203,7 @@ name is available.
Timo (toger5)
Tomasz Chabora (KoBeWi)
Twarit Waikar (IronicallySerious)
+ Umang Kalra (theoway)
Vinzenz Feenstra (vinzenz)
박한얼 (volzhs)
V. Vamsi Krishna (vkbsb)
diff --git a/DONORS.md b/DONORS.md
index d31b15fa5a..1a49465e83 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -46,8 +46,8 @@ generous deed immortalized in the next stable release of Godot Engine.
anti666
blurp
Christian Baune
- Christoffer Sundbom
Christopher Montesano
+ Christopher Shifflett
Daniel Edwards
Darrin Massena
David Mydlarz
@@ -59,14 +59,13 @@ generous deed immortalized in the next stable release of Godot Engine.
GameDev.net
Hein-Pieter van Braam
Jasper Brooks
- Javary Co.
Jay Sistar
Jeffery Chiu
John G Gentzel
Jonah Stich
Justin Arnold
Justo Delgado Baudí
- Kamil Brzezinski
+ Kamil Brzezinskip
Marcel Kräml
Marek Belski
Matthieu Huvé
@@ -77,8 +76,8 @@ generous deed immortalized in the next stable release of Godot Engine.
Ninja_5tyl3
Patrick Horn
Patrick Schmidt
- Péter Magyar
Rami
+ Relintai
Ronnie Cheng
Slobodan Milnovic
Stephan Lanfermann
@@ -99,9 +98,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Asher Glick
Barugon
Carlo Cabanilla
- Chris Goddard
Daniel James
David Gehrig
+ David Graham
David Snopek
Don B
Ed Morley
@@ -123,7 +122,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Mason Bially
Matthew Hillier
Michael
- m kaersten
Monster Vial
Officine Pixel S.n.c.
Petrus Prinsloo
@@ -135,7 +133,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Sarksus
Scott B
Sean
- segfault-god
Sergey
Sofox
Stephen Molyneaux
@@ -150,13 +147,13 @@ generous deed immortalized in the next stable release of Godot Engine.
Zaven Muradyan
Adam Nakonieczny
- Adrian Adamiak
Alexander J Maynard
Alex de la Mare
Alexey Dyadchenko
Alex Khayrullin
alice gambrell
Andrew Cunningham
+ Andrew Farr
Antanas Paskauskas
Antoni Batchelli
Arch Henderson III
@@ -174,11 +171,13 @@ generous deed immortalized in the next stable release of Godot Engine.
Christian Leth Jeppesen
Cow
Craig Ostrin
+ Craig Scarborough
Craig Smith
Cristopher
CzechBlueBear
D
dan didenko
+ Daniel Hernández Alcojor
Daniel Tebbutt
Darrian Little
Dennis Belfrage
@@ -219,6 +218,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Joel Fivat
Johnathan Kupferer
John Knight
+ Jonathan Turner
Jose Malheiro
Jose Manuel Muñoz Perez
Joseph Crane
@@ -244,7 +244,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Liam Smyth
LoparPanda
Luca Vazzano
- Luc-Frédéric Langis
MadScientistCarl
Marcus Dobler
Marcus Richter
@@ -263,6 +262,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Michael Policastro
MightyPossum
MikadoSC
+ Mike Barbee
minz1
MuffinManKen
nate etan
@@ -327,10 +327,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Vincent Cloutier
Vlad Ceru Opran
VoidPointer
- Vramexon
Winston
Wojciech Chojnacki
xzibiting
+ Yifan Lai
Yuancheng Zhang
Zie Weaver
Zoran Kukulj
@@ -338,9 +338,8 @@ generous deed immortalized in the next stable release of Godot Engine.
## Silver donors
1D_Inc
- Abraham Haskins
+ Aaron Oldenburg
Actual_Dio
- Adam
Adam Brunnmeier
Adam Carr
Adam Long
@@ -372,9 +371,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Allan Davis
Allen Schade
Aloehart
- Amanda
Anders Marstein Kruke
Andre Stackhouse
+ Andrew Groot
andrew james morris
Andrew Thomas
Ano Nim
@@ -388,10 +387,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Ashley Claymore
Astier Mickael
Aubrey Falconer
- Audun Borgersen
aurelien condomines
AzulCrescent
Balázs Batári
+ Baptiste Le Bourhis
Bartosz Bielecki
Benedikt
Benoit Jauvin-Girard
@@ -405,7 +404,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Blair Allen
Bobby CC Wong
Borkzilla
- Boyd Trolinger
Bram
brian
Brian Klein
@@ -419,7 +417,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Cameron Meyer
Carlos Cejudo
Carl van der Geest
- Cas Brugman
Casey
Cassidy James
Cédric Givord
@@ -440,6 +437,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Corchari
Craig Maloney
Craig Post
+ C. R. Messen
damucz
Daniel Cheney
Daniel Johnson
@@ -452,6 +450,7 @@ generous deed immortalized in the next stable release of Godot Engine.
deadwithbread
Devin Carraway
Diego Pereira
+ Dima Fedotov
Dmitry Fisher
Dmytro Korchynskyi
Dominik Wetzel
@@ -468,6 +467,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Egon Elbre
Elgenzay
Elias Nykrem
+ Emerson MX
Ephemeral
Eric Stokes
Eric Walkingshaw
@@ -479,11 +479,11 @@ generous deed immortalized in the next stable release of Godot Engine.
fby
Fekinox
Felix Bohmann
- Flaredown
Forty Doubleu
Francisco Garcia Florez
Francois Holland
Frank
+ FrostMarble
Game Endeavor
Gary Thomas
George Marques
@@ -494,7 +494,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Greyson Richey
Grid
Grominet
- Guillaume Audirac
Guillaume Pham Ngoc
Guldoman
Hal A
@@ -516,7 +515,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Jako Danar
James
James A F Manley
- James Gary
James Guardino
James Quincy
James Thomas
@@ -527,7 +525,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Jason Bolton
Jason Malcolm-Herzmark
Jason Uechi
- Jeferson R. P. Belmiro
Jeff Hungerford
Jeff Messer
Jeffrey Berube
@@ -542,6 +539,7 @@ generous deed immortalized in the next stable release of Godot Engine.
John Szevin
Jonah Branch
Jonas
+ Jonas Arndt
Jonas Bernemann
Jonas Rudlang
Jonas Yamazaki
@@ -571,6 +569,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Justin Spedding
Justin W. Flory
KaDokta
+ Karol Porzycki
Keedong Park
Keinan Powers
Keith Bradner
@@ -582,6 +581,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Kevin van Rooijen
Kiri Jolly
Kjetil Haugland
+ Kodera Software
Kolandrious
Konstantin Goncharov
kormai
@@ -594,12 +594,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Kyle Burnett
Kyle Jacobs
Kyuppin
- Lady Grach
Lasse le Dous
Laurent CHEA
Laurent Tréguier
Laxman Pradhan
- LE BOURHIS
LEMMiNO
Leonardo Dimano
Lin Chear
@@ -625,10 +623,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Matt Edwards
Matthew Booe
Matt Sylvia
+ Maverick
Max Fiedler
Maxime Blade
Maxwell
- MC
Melissa Mears
Merlyn Morgan-Graham
mewin
@@ -644,14 +642,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Mike
Mike Birkhead
Mike Copley
- Mike Cunningham
Mitchell J. Wagner
MJacred
ModularMind
Molinghu
Molly Jameson
MoltenGears
- Morwyn
MrAZIE
Mrjemandem
Nathan Fish
@@ -677,9 +673,10 @@ generous deed immortalized in the next stable release of Godot Engine.
oceoh
Okatima
Oleg Reva
- Olle Soprani
Omar Delarosa
+ Orfist
Oriol Muñoz Princep
+ oscar1000108
Oscar Domingo
Pascal
Patrick Brock
@@ -706,7 +703,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Rammeow
RAMupgrade
Remi Rampin
- Rémi Verschelde
Reneator
Riccardo Marini
Richard Hayes
@@ -716,21 +712,25 @@ generous deed immortalized in the next stable release of Godot Engine.
Robert Farr (Larington)
Rob Ruana
Rodrigo Loli
+ Roger Smith
Roland Rząsa
Roman Tinkov
Ronald Ho Hip (CrimsonZA)
Ronan
Ross Squires
+ Roy Scayged
Ryan Groom
Sam Caulfield
Sam Edson
Scott Longley
Sean Lynch
Sebastian Michailidis
+ segfault-god
SeongWan Kim
SeungJong k
Shaidak
Shane
+ Shane Sicienski
Shane Spoor
simdee
Simon Jonas Larsen
@@ -741,6 +741,7 @@ generous deed immortalized in the next stable release of Godot Engine.
smbe19
smo1704
Solene Waked
+ Spencer Everhart
Squirrel
Stéphane Roussel
Steve Cloete
@@ -757,7 +758,6 @@ generous deed immortalized in the next stable release of Godot Engine.
thomas
Thomas Bechtold
Thomas Detoy
- Thomas Horwath
Tianren Qin
Till1805
Tim Drumheller
@@ -769,6 +769,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Toadile
Tobias Bradtke
Tom Coxon
+ Tom Webster
Torgeir Lilleskog
Torsten Crass
toupeira
@@ -779,7 +780,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Troy Bonneau
Tryggve Sollid
Turgut Temucin
- Tyler Compton
Tyler Stafos
UltyX
Uther
@@ -802,7 +802,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Yan Shi
Yegor Smirnov
Zak Stephens
+ Zher Huei Lee
蕭惟允
+ 貴宏 小松
郝晨煜
## Bronze donors
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 2ea55843ad..4ad5f2a506 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -2587,7 +2587,10 @@ RID CameraTexture::get_rid() const {
if (feed.is_valid()) {
return feed->get_texture(which_feed);
} else {
- return RID();
+ if (_texture.is_null()) {
+ _texture = RenderingServer::get_singleton()->texture_2d_placeholder_create();
+ }
+ return _texture;
}
}
@@ -2643,5 +2646,7 @@ bool CameraTexture::get_camera_active() const {
CameraTexture::CameraTexture() {}
CameraTexture::~CameraTexture() {
- // nothing to do here yet
+ if (_texture.is_valid()) {
+ RenderingServer::get_singleton()->free(_texture);
+ }
}
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 98aa61138d..2e97c2deb1 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -812,6 +812,7 @@ class CameraTexture : public Texture2D {
GDCLASS(CameraTexture, Texture2D);
private:
+ mutable RID _texture;
int camera_feed_id = 0;
CameraServer::FeedImage which_feed = CameraServer::FEED_RGBA_IMAGE;
diff --git a/servers/camera/camera_feed.cpp b/servers/camera/camera_feed.cpp
index 13afc803e4..9f8e8a8106 100644
--- a/servers/camera/camera_feed.cpp
+++ b/servers/camera/camera_feed.cpp
@@ -138,11 +138,15 @@ RID CameraFeed::get_texture(CameraServer::FeedImage p_which) {
CameraFeed::CameraFeed() {
// initialize our feed
id = CameraServer::get_singleton()->get_free_id();
+ base_width = 0;
+ base_height = 0;
name = "???";
active = false;
datatype = CameraFeed::FEED_RGB;
position = CameraFeed::FEED_UNSPECIFIED;
transform = Transform2D(1.0, 0.0, 0.0, -1.0, 0.0, 1.0);
+ texture[CameraServer::FEED_Y_IMAGE] = RenderingServer::get_singleton()->texture_2d_placeholder_create();
+ texture[CameraServer::FEED_CBCR_IMAGE] = RenderingServer::get_singleton()->texture_2d_placeholder_create();
}
CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
@@ -155,16 +159,14 @@ CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
datatype = CameraFeed::FEED_NOIMAGE;
position = p_position;
transform = Transform2D(1.0, 0.0, 0.0, -1.0, 0.0, 1.0);
+ texture[CameraServer::FEED_Y_IMAGE] = RenderingServer::get_singleton()->texture_2d_placeholder_create();
+ texture[CameraServer::FEED_CBCR_IMAGE] = RenderingServer::get_singleton()->texture_2d_placeholder_create();
}
CameraFeed::~CameraFeed() {
// Free our textures
- if (texture[CameraServer::FEED_Y_IMAGE].is_valid()) {
- RenderingServer::get_singleton()->free(texture[CameraServer::FEED_Y_IMAGE]);
- }
- if (texture[CameraServer::FEED_CBCR_IMAGE].is_valid()) {
- RenderingServer::get_singleton()->free(texture[CameraServer::FEED_CBCR_IMAGE]);
- }
+ RenderingServer::get_singleton()->free(texture[CameraServer::FEED_Y_IMAGE]);
+ RenderingServer::get_singleton()->free(texture[CameraServer::FEED_CBCR_IMAGE]);
}
void CameraFeed::set_RGB_img(const Ref<Image> &p_rgb_img) {
@@ -177,12 +179,9 @@ void CameraFeed::set_RGB_img(const Ref<Image> &p_rgb_img) {
// We're assuming here that our camera image doesn't change around formats etc, allocate the whole lot...
base_width = new_width;
base_height = new_height;
- if (texture[CameraServer::FEED_RGBA_IMAGE].is_null()) {
- texture[CameraServer::FEED_RGBA_IMAGE] = RenderingServer::get_singleton()->texture_2d_create(p_rgb_img);
- } else {
- RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_rgb_img);
- RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_RGBA_IMAGE], new_texture);
- }
+
+ RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_rgb_img);
+ RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_RGBA_IMAGE], new_texture);
} else {
RenderingServer::get_singleton()->texture_2d_update(texture[CameraServer::FEED_RGBA_IMAGE], p_rgb_img);
}
@@ -201,12 +200,9 @@ void CameraFeed::set_YCbCr_img(const Ref<Image> &p_ycbcr_img) {
// We're assuming here that our camera image doesn't change around formats etc, allocate the whole lot...
base_width = new_width;
base_height = new_height;
- if (texture[CameraServer::FEED_RGBA_IMAGE].is_null()) {
- texture[CameraServer::FEED_RGBA_IMAGE] = RenderingServer::get_singleton()->texture_2d_create(p_ycbcr_img);
- } else {
- RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_ycbcr_img);
- RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_RGBA_IMAGE], new_texture);
- }
+
+ RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_ycbcr_img);
+ RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_RGBA_IMAGE], new_texture);
} else {
RenderingServer::get_singleton()->texture_2d_update(texture[CameraServer::FEED_RGBA_IMAGE], p_ycbcr_img);
}
@@ -230,16 +226,11 @@ void CameraFeed::set_YCbCr_imgs(const Ref<Image> &p_y_img, const Ref<Image> &p_c
// We're assuming here that our camera image doesn't change around formats etc, allocate the whole lot...
base_width = new_y_width;
base_height = new_y_height;
- if (texture[CameraServer::FEED_Y_IMAGE].is_null()) {
- texture[CameraServer::FEED_Y_IMAGE] = RenderingServer::get_singleton()->texture_2d_create(p_y_img);
- } else {
+ {
RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_y_img);
RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_Y_IMAGE], new_texture);
}
-
- if (texture[CameraServer::FEED_CBCR_IMAGE].is_null()) {
- texture[CameraServer::FEED_CBCR_IMAGE] = RenderingServer::get_singleton()->texture_2d_create(p_cbcr_img);
- } else {
+ {
RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_cbcr_img);
RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_CBCR_IMAGE], new_texture);
}