mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
remove Viewport class
This commit is contained in:
parent
105561ad77
commit
9843a1fc27
17 changed files with 60 additions and 115 deletions
|
|
@ -101,11 +101,9 @@ void Skybox::draw(
|
|||
float daytime,
|
||||
float fog)
|
||||
{
|
||||
const Viewport& viewport = pctx.getViewport();
|
||||
int width = viewport.getWidth();
|
||||
int height = viewport.getHeight();
|
||||
const glm::uvec2& viewport = pctx.getViewport();
|
||||
|
||||
drawBackground(camera, assets, width, height);
|
||||
drawBackground(camera, assets, viewport.x, viewport.y);
|
||||
|
||||
DrawContext ctx = pctx.sub();
|
||||
ctx.setBlendMode(BlendMode::addition);
|
||||
|
|
@ -145,7 +143,7 @@ void Skybox::refresh(const DrawContext& pctx, float t, float mie, uint quality)
|
|||
ctx.setDepthMask(false);
|
||||
ctx.setDepthTest(false);
|
||||
ctx.setFramebuffer(fbo.get());
|
||||
ctx.setViewport(Viewport(size, size));
|
||||
ctx.setViewport({size, size});
|
||||
|
||||
auto cubemap = dynamic_cast<Cubemap*>(fbo->getTexture());
|
||||
assert(cubemap != nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue