Merge pull request #52243 from Pineapple/fix-light-internal

Fix Light2D UBO initialization
This commit is contained in:
Rémi Verschelde 2021-09-14 14:21:22 +02:00 committed by GitHub
commit 8a211219c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ RID RasterizerCanvasBaseGLES3::light_internal_create() {
glGenBuffers(1, &li->ubo); glGenBuffers(1, &li->ubo);
glBindBuffer(GL_UNIFORM_BUFFER, li->ubo); glBindBuffer(GL_UNIFORM_BUFFER, li->ubo);
glBufferData(GL_UNIFORM_BUFFER, sizeof(LightInternal::UBOData), &state.canvas_item_ubo_data, GL_DYNAMIC_DRAW); glBufferData(GL_UNIFORM_BUFFER, sizeof(LightInternal::UBOData), nullptr, GL_DYNAMIC_DRAW);
glBindBuffer(GL_UNIFORM_BUFFER, 0); glBindBuffer(GL_UNIFORM_BUFFER, 0);
return light_internal_owner.make_rid(li); return light_internal_owner.make_rid(li);