diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-08 16:02:56 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-08 16:02:56 +0000 |
| commit | 00fc3cb9b2c06026fab0e4760609fe02e027b6df (patch) | |
| tree | b84b527824ac1d5c999fc4a974fcf2c356b422ab /test/testRenderOutput.cpp | |
| parent | Replace gl_traits glTexParameter with glTexture::parameter DSA wrapper (diff) | |
| download | ilt-00fc3cb9b2c06026fab0e4760609fe02e027b6df.tar.bz2 ilt-00fc3cb9b2c06026fab0e4760609fe02e027b6df.tar.xz ilt-00fc3cb9b2c06026fab0e4760609fe02e027b6df.zip | |
Move all low level texture operations to DSA helpers in glTexture
Diffstat (limited to 'test/testRenderOutput.cpp')
| -rw-r--r-- | test/testRenderOutput.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/testRenderOutput.cpp b/test/testRenderOutput.cpp index 7243032..b86469a 100644 --- a/test/testRenderOutput.cpp +++ b/test/testRenderOutput.cpp @@ -5,15 +5,13 @@ TestRenderOutput::TestRenderOutput(TextureAbsCoord outputSize) : size {outputSize} { glBindFramebuffer(GL_FRAMEBUFFER, output); - const auto configuregdata - = [this](glTexture & 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); - data.parameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST); - data.parameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, data, 0); - }; - configuregdata(outImage, GL_RGBA, GL_UNSIGNED_BYTE, GL_COLOR_ATTACHMENT0); + const auto configuregdata = [this](glTexture<GL_TEXTURE_2D> & data, const GLenum format, const GLenum attachment) { + data.storage(1, format, size); + data.parameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST); + data.parameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, data, 0); + }; + configuregdata(outImage, GL_RGBA8, GL_COLOR_ATTACHMENT0); glDrawBuffer(GL_COLOR_ATTACHMENT0); glBindRenderbuffer(GL_RENDERBUFFER, depth); |
