fix compilation
This commit is contained in:
parent
4496cc17af
commit
8332536399
@ -547,12 +547,13 @@ void OpenGlRenderer::setScreenSize(Vec2U screenSize) {
|
|||||||
glUniform2f(m_screenSizeUniform, m_screenSize[0], m_screenSize[1]);
|
glUniform2f(m_screenSizeUniform, m_screenSize[0], m_screenSize[1]);
|
||||||
|
|
||||||
for (auto& frameBuffer : m_frameBuffers) {
|
for (auto& frameBuffer : m_frameBuffers) {
|
||||||
|
unsigned sizeDiv = frameBuffer.second->sizeDiv;
|
||||||
if (unsigned multisample = frameBuffer.second->multisample) {
|
if (unsigned multisample = frameBuffer.second->multisample) {
|
||||||
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, frameBuffer.second->texture->glTextureId());
|
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, frameBuffer.second->texture->glTextureId());
|
||||||
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, multisample, GL_RGBA8, m_screenSize[0]/frameBuffer.second->sizeDiv, m_screenSize[1]/frameBuffer.second->sizeDiv, GL_TRUE);
|
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, multisample, GL_RGBA8, m_screenSize[0] / sizeDiv, m_screenSize[1] / sizeDiv, GL_TRUE);
|
||||||
} else {
|
} else {
|
||||||
glBindTexture(GL_TEXTURE_2D, frameBuffer.second->texture->glTextureId());
|
glBindTexture(GL_TEXTURE_2D, frameBuffer.second->texture->glTextureId());
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, m_screenSize[0]/frameBuffer.second->sizeDiv, m_screenSize[1]/frameBuffer.second->sizeDiv, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, m_screenSize[0] / sizeDiv, m_screenSize[1] / sizeDiv, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -402,7 +402,7 @@ void ClientApplication::render() {
|
|||||||
LogMap::set("client_render_world_total", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - totalStart));
|
LogMap::set("client_render_world_total", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - totalStart));
|
||||||
|
|
||||||
auto size = Vec2F(renderer->screenSize());
|
auto size = Vec2F(renderer->screenSize());
|
||||||
auto quad = renderFlatRect(RectF::withSize(size/-2, size), Vec4B(0.0f,0.0f,0.0f,0.0f), 0.0f);
|
auto quad = renderFlatRect(RectF::withSize(size / -2, size), Vec4B::filled(0), 0.0f);
|
||||||
for (auto& layer : m_postProcessLayers) {
|
for (auto& layer : m_postProcessLayers) {
|
||||||
for (unsigned i = 0; i < layer.passes; i++) {
|
for (unsigned i = 0; i < layer.passes; i++) {
|
||||||
for (auto& effect : layer.effects) {
|
for (auto& effect : layer.effects) {
|
||||||
@ -466,14 +466,12 @@ void ClientApplication::renderReload() {
|
|||||||
m_postProcessLayers.clear();
|
m_postProcessLayers.clear();
|
||||||
auto postProcessLayers = assets->json("/client.config:postProcessLayers").toArray();
|
auto postProcessLayers = assets->json("/client.config:postProcessLayers").toArray();
|
||||||
for (auto& layer : postProcessLayers) {
|
for (auto& layer : postProcessLayers) {
|
||||||
List<String> effects;
|
auto effects = jsonToStringList(layer.getArray("effects"));
|
||||||
for (auto& effect : layer.getArray("effects")) {
|
for (auto& effect : effects)
|
||||||
auto effectStr = effect.toString();
|
loadEffectConfig(effect);
|
||||||
loadEffectConfig(effectStr);
|
m_postProcessLayers.append(PostProcessLayer{ std::move(effects), (unsigned)layer.getUInt("passes", 1) });
|
||||||
effects.append(effectStr);
|
|
||||||
}
|
|
||||||
m_postProcessLayers.append(PostProcessLayer{effects,layer.getUInt("passes",1)});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadEffectConfig("interface");
|
loadEffectConfig("interface");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user