26 TextureRenderTarget() {
29 void bindAsTexture(
int index) {
33 void attach(Framebuffer& to, GLenum attachmentType)
override {
36 onFramebufferResize(to.size());
37 glFramebufferTexture2D(GL_FRAMEBUFFER, attachmentType, GL_TEXTURE_2D, mTexture.getHandle(), 0);
38 if (glGetError() != GL_NO_ERROR) {
39 throw AException(
"unable to create texture target");
48 void onFramebufferResize(glm::u32vec2 size)
override {
49 mTexture.framebufferTex2D(size, type);
Definition Texture2D.h:20