mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
fix
This commit is contained in:
parent
0104585e10
commit
77d9ca1d86
2 changed files with 5 additions and 2 deletions
|
|
@ -54,8 +54,8 @@ GBuffer::GBuffer(uint width, uint height)
|
||||||
positionsBuffer {0, GL_RGBA16F, GL_RGBA, GL_FLOAT, GL_COLOR_ATTACHMENT1},
|
positionsBuffer {0, GL_RGBA16F, GL_RGBA, GL_FLOAT, GL_COLOR_ATTACHMENT1},
|
||||||
normalsBuffer {0, GL_RGBA16F, GL_RGB, GL_FLOAT, GL_COLOR_ATTACHMENT2},
|
normalsBuffer {0, GL_RGBA16F, GL_RGB, GL_FLOAT, GL_COLOR_ATTACHMENT2},
|
||||||
emissionBuffer {0, GL_R8, GL_RED, GL_FLOAT, GL_COLOR_ATTACHMENT3},
|
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);
|
glGenFramebuffers(1, &fbo);
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,9 @@ static int l_get_def(lua::State* L) {
|
||||||
static int l_spawn(lua::State* L) {
|
static int l_spawn(lua::State* L) {
|
||||||
auto level = controller->getLevel();
|
auto level = controller->getLevel();
|
||||||
auto defname = lua::tostring(L, 1);
|
auto defname = lua::tostring(L, 1);
|
||||||
|
if (defname == nullptr) {
|
||||||
|
throw std::runtime_error("empty string");
|
||||||
|
}
|
||||||
auto& def = content->entities.require(defname);
|
auto& def = content->entities.require(defname);
|
||||||
auto pos = lua::tovec3(L, 2);
|
auto pos = lua::tovec3(L, 2);
|
||||||
dv::value args = nullptr;
|
dv::value args = nullptr;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue