Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed Apr 11, 2024
1 parent 703e4a6 commit f06289c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/libs/geo/providers/DebugMapsProvider.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace threepp {
renderer->getClearColor(oldColor);
renderer->setClearColor(Color(Color::green).lerpHSL(Color::red, static_cast<float>(zoom - minZoom) / static_cast<float>(maxZoom - minZoom)));

auto oldSize = renderer->getSize();
auto oldSize = renderer->size();
renderer->setSize({resolution, resolution});

std::vector<unsigned char> data(resolution * resolution * 4);
Expand All @@ -56,7 +56,7 @@ namespace threepp {
hud.needsUpdate(*text2);

hud.apply(*renderer);
renderer->readPixels({}, renderer->getSize(), Format::RGBA, data.data());
renderer->readPixels({}, renderer->size(), Format::RGBA, data.data());
renderer->setSize(oldSize);
renderer->setClearColor(oldColor);
renderer->clear();
Expand Down
2 changes: 1 addition & 1 deletion include/threepp/renderers/GLRenderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace threepp {

void setPixelRatio(int value);

[[nodiscard]] WindowSize getSize() const;
[[nodiscard]] WindowSize size() const;

void setSize(WindowSize size);

Expand Down
2 changes: 1 addition & 1 deletion src/threepp/renderers/GLRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ void GLRenderer::setPixelRatio(int value) {
this->setSize({pimpl_->_size.width, pimpl_->_size.height});
}

WindowSize GLRenderer::getSize() const {
WindowSize GLRenderer::size() const {

return pimpl_->_size;
}
Expand Down

0 comments on commit f06289c

Please sign in to comment.