diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/test-ui.cpp | 2 | ||||
| -rw-r--r-- | test/testRenderOutput.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/test-ui.cpp b/test/test-ui.cpp index 40c041a..c648c2c 100644 --- a/test/test-ui.cpp +++ b/test/test-ui.cpp @@ -15,7 +15,7 @@ BOOST_GLOBAL_FIXTURE(TestMainWindowAppBase); BOOST_AUTO_TEST_CASE(LoadFromFile) { SvgIcon svg(ImageDimensions {RENDER_SIZE}, Resource::mapPath("ui/icon/rails.svg")); - const auto size = Texture::getSize(svg.texture); + const auto size = svg.texture.getSize(); BOOST_CHECK_EQUAL(size, TextureDimensions(RENDER_SIZE, RENDER_SIZE, 1)); Texture::save(svg.texture, (ANALYSIS_DIRECTORY / "rails.tga").c_str()); } diff --git a/test/testRenderOutput.cpp b/test/testRenderOutput.cpp index 2c74ceb..ae2e60d 100644 --- a/test/testRenderOutput.cpp +++ b/test/testRenderOutput.cpp @@ -6,8 +6,8 @@ TestRenderOutput::TestRenderOutput(TextureAbsCoord outputSize) : size {outputSiz { glBindFramebuffer(GL_FRAMEBUFFER, output); const auto configuregdata - = [this](const GLuint data, const GLint format, const GLenum type, const GLenum attachment) { - glBindTexture(GL_TEXTURE_2D, data); + = [this](const auto & data, const GLint format, const GLenum type, const GLenum attachment) { + data.bind(); glTexImage2D(GL_TEXTURE_2D, 0, format, size.x, size.y, 0, GL_RGBA, type, nullptr); glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); |
