This commit is contained in:
Astazium 2026-06-01 21:18:33 +03:00
parent 0104585e10
commit 77d9ca1d86
2 changed files with 5 additions and 2 deletions

View file

@ -54,8 +54,8 @@ GBuffer::GBuffer(uint width, uint height)
positionsBuffer {0, GL_RGBA16F, GL_RGBA, GL_FLOAT, GL_COLOR_ATTACHMENT1},
normalsBuffer {0, GL_RGBA16F, GL_RGB, GL_FLOAT, GL_COLOR_ATTACHMENT2},
emissionBuffer {0, GL_R8, GL_RED, GL_FLOAT, GL_COLOR_ATTACHMENT3},
ssaoBuffer {0, GL_R16F, GL_RED, GL_FLOAT, 0},
depthBuffer {0, 0, 0, 0, 0}
depthBuffer {0, 0, 0, 0, 0},
ssaoBuffer {0, GL_R16F, GL_RED, GL_FLOAT, 0}
{
glGenFramebuffers(1, &fbo);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);

View file

@ -62,6 +62,9 @@ static int l_get_def(lua::State* L) {
static int l_spawn(lua::State* L) {
auto level = controller->getLevel();
auto defname = lua::tostring(L, 1);
if (defname == nullptr) {
throw std::runtime_error("empty string");
}
auto& def = content->entities.require(defname);
auto pos = lua::tovec3(L, 2);
dv::value args = nullptr;