Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gles3 gl target #15902

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ void GLES3CommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture

void GLES3CommandBuffer::blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) {
GLES3CmdBlitTexture *cmd = _cmdAllocator->blitTextureCmdPool.alloc();
if (srcTexture) cmd->gpuTextureSrc = static_cast<GLES3Texture *>(srcTexture)->gpuTexture();
if (dstTexture) cmd->gpuTextureDst = static_cast<GLES3Texture *>(dstTexture)->gpuTexture();
if (srcTexture) cmd->gpuTextureSrcView = static_cast<GLES3Texture *>(srcTexture)->gpuTextureView();
if (dstTexture) cmd->gpuTextureDstView = static_cast<GLES3Texture *>(dstTexture)->gpuTextureView();
cmd->regions = regions;
cmd->count = count;
cmd->filter = filter;
Expand Down
101 changes: 60 additions & 41 deletions native/cocos/renderer/gfx-gles3/GLES3Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,17 @@ GLenum formatToGLType(Format format) {
}
}

GLenum getTextureTarget(TextureType type) {
switch (type) {
case TextureType::TEX2D: return GL_TEXTURE_2D;
GLenum getTextureViewTarget(GLES3GPUTextureView *view) {
switch (view->type) {
case TextureType::TEX2D_ARRAY: return GL_TEXTURE_2D_ARRAY;
case TextureType::TEX3D: return GL_TEXTURE_3D;
case TextureType::CUBE: return GL_TEXTURE_CUBE_MAP;
case TextureType::TEX2D: {
if (hasFlag(view->gpuTexture->flags, TextureFlagBit::EXTERNAL_OES)) {
return GL_TEXTURE_EXTERNAL_OES;
}
return view->gpuTexture->type == TextureType::CUBE ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + view->baseLayer : GL_TEXTURE_2D;
}
default:
CC_ABORT();
return GL_NONE;
Expand Down Expand Up @@ -819,7 +824,6 @@ static void textureStorage(GLES3Device *device, GLES3GPUTexture *gpuTexture) {
GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint];

if (gpuTexture->glTexture != glTexture) {
GL_CHECK(glBindTexture(gpuTexture->glTarget, gpuTexture->glTexture));
glTexture = gpuTexture->glTexture;
}
uint32_t w = gpuTexture->width;
Expand All @@ -829,22 +833,31 @@ static void textureStorage(GLES3Device *device, GLES3GPUTexture *gpuTexture) {
switch (gpuTexture->type) {
case TextureType::CUBE:
CC_ASSERT(gpuTexture->glSamples <= 1);
GL_CHECK(glBindTexture(GL_TEXTURE_CUBE_MAP, gpuTexture->glTexture));
GL_CHECK(glTexStorage2D(GL_TEXTURE_CUBE_MAP, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h));
break;
case TextureType::TEX2D:
if (gpuTexture->glSamples > 1 && !gpuTexture->immutable && device->constantRegistry()->glMinorVersion >= 1) {
gpuTexture->glTarget = GL_TEXTURE_2D_MULTISAMPLE;
GL_CHECK(glTexStorage2DMultisample(gpuTexture->glTarget, gpuTexture->glSamples, gpuTexture->glInternalFmt, w, h, GL_FALSE));
GL_CHECK(glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, gpuTexture->glTexture));
GL_CHECK(glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, gpuTexture->glSamples, gpuTexture->glInternalFmt, w, h, GL_FALSE));
} else {
GL_CHECK(glTexStorage2D(gpuTexture->glTarget, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h));
auto target = hasFlag(gpuTexture->flags, TextureFlagBit::EXTERNAL_OES) ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D;
GL_CHECK(glBindTexture(target, gpuTexture->glTexture));
GL_CHECK(glTexStorage2D(target, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h));
}
break;
case TextureType::TEX3D:
CC_ASSERT(gpuTexture->glSamples <= 1);
GL_CHECK(glBindTexture(GL_TEXTURE_3D, gpuTexture->glTexture));
GL_CHECK(glTexStorage3D(GL_TEXTURE_3D, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h, d));
break;
case TextureType::TEX2D_ARRAY:
if (gpuTexture->glSamples > 1 && !gpuTexture->immutable && device->constantRegistry()->glMinorVersion >= 1) {
gpuTexture->glTarget = GL_TEXTURE_2D_MULTISAMPLE_ARRAY;
GL_CHECK(glTexStorage3DMultisample(gpuTexture->glTarget, gpuTexture->glSamples, gpuTexture->glInternalFmt, w, h, d, GL_FALSE));
GL_CHECK(glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, gpuTexture->glTexture));
GL_CHECK(glTexStorage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, gpuTexture->glSamples, gpuTexture->glInternalFmt, w, h, d, GL_FALSE));
} else {
GL_CHECK(glTexStorage3D(gpuTexture->glTarget, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h, d));
GL_CHECK(glBindTexture(GL_TEXTURE_2D_ARRAY, gpuTexture->glTexture));
GL_CHECK(glTexStorage3D(GL_TEXTURE_2D_ARRAY, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h, d));
}
break;
default:
Expand All @@ -870,31 +883,19 @@ void cmdFuncGLES3CreateTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture)
// Allocate render buffer when binding a framebuffer if the MSRT extension is not present.
if (gpuTexture->useRenderBuffer &&
hasFlag(gpuTexture->flags, TextureFlagBit::LAZILY_ALLOCATED)) {
gpuTexture->glTarget = GL_RENDERBUFFER;
gpuTexture->memoryAllocated = false;
return;
}
}

if (gpuTexture->glTexture) {
if (hasFlag(gpuTexture->flags, TextureFlagBit::EXTERNAL_OES)) {
gpuTexture->glTarget = GL_TEXTURE_EXTERNAL_OES;
} else {
gpuTexture->glTarget = GL_TEXTURE_2D;
}
return;
}

if (gpuTexture->size == 0) {
if (gpuTexture->glTexture || gpuTexture->size == 0) {
return;
}

if (gpuTexture->useRenderBuffer) {
gpuTexture->glTarget = GL_RENDERBUFFER;
GL_CHECK(glGenRenderbuffers(1, &gpuTexture->glRenderbuffer));
renderBufferStorage(device, gpuTexture);
} else {
gpuTexture->glTarget = getTextureTarget(gpuTexture->type);
GL_CHECK(glGenTextures(1, &gpuTexture->glTexture));
textureStorage(device, gpuTexture);
}
Expand Down Expand Up @@ -940,6 +941,10 @@ void cmdFuncGLES3ResizeTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture)
}
}

void cmdFuncGLES3CreateTextureView(GLES3Device */*device*/, GLES3GPUTextureView *gpuTextureView) {
gpuTextureView->glTarget = getTextureViewTarget(gpuTextureView);
}

void cmdFuncGLES3PrepareSamplerInfo(GLES3Device * /*device*/, GLES3GPUSampler *gpuSampler) {
if (gpuSampler->minFilter == Filter::LINEAR || gpuSampler->minFilter == Filter::ANISOTROPIC) {
if (gpuSampler->mipFilter == Filter::LINEAR || gpuSampler->mipFilter == Filter::ANISOTROPIC) {
Expand Down Expand Up @@ -2269,7 +2274,7 @@ void cmdFuncGLES3BindState(GLES3Device *device, GLES3GPUPipelineState *gpuPipeli
GL_CHECK(glActiveTexture(GL_TEXTURE0 + unit));
cache->texUint = unit;
}
GL_CHECK(glBindTexture(gpuTexture->glTarget, glTexture));
GL_CHECK(glBindTexture(gpuTextureView->glTarget, glTexture));
cache->glTextures[unit] = glTexture;
}

Expand Down Expand Up @@ -2649,7 +2654,6 @@ void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device, const uint8_t *const

GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint];
if (glTexture != gpuTexture->glTexture) {
GL_CHECK(glBindTexture(gpuTexture->glTarget, gpuTexture->glTexture));
glTexture = gpuTexture->glTexture;
}

Expand All @@ -2661,11 +2665,15 @@ void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device, const uint8_t *const
uint32_t destWidth = 0;
uint32_t destHeight = 0;

switch (gpuTexture->glTarget) {
case GL_TEXTURE_2D: {
auto target = GL_NONE;
switch (gpuTexture->type) {
case TextureType::TEX2D: {
Extent extent{};
Offset offset{};
Extent stride{};

target = GL_TEXTURE_2D;
GL_CHECK(glBindTexture(GL_TEXTURE_2D, gpuTexture->glTexture));
for (size_t i = 0; i < count; ++i) {
const BufferTextureCopy &region = regions[i];
uint32_t mipLevel = region.texSubres.mipLevel;
Expand Down Expand Up @@ -2708,10 +2716,13 @@ void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device, const uint8_t *const
}
break;
}
case GL_TEXTURE_2D_ARRAY: {
case TextureType::TEX2D_ARRAY: {
Extent extent{};
Offset offset{};
Extent stride{};

target = GL_TEXTURE_2D_ARRAY;
GL_CHECK(glBindTexture(GL_TEXTURE_2D_ARRAY, gpuTexture->glTexture));
for (size_t i = 0; i < count; ++i) {
const BufferTextureCopy &region = regions[i];
uint32_t d = region.texSubres.layerCount;
Expand Down Expand Up @@ -2761,11 +2772,13 @@ void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device, const uint8_t *const
}
break;
}
case GL_TEXTURE_3D: {
case TextureType::TEX3D: {
Extent extent{};
Offset offset{};
Extent stride{};

target = GL_TEXTURE_3D;
GL_CHECK(glBindTexture(GL_TEXTURE_3D, gpuTexture->glTexture));
for (size_t i = 0; i < count; ++i) {
const BufferTextureCopy &region = regions[i];
uint32_t mipLevel = region.texSubres.mipLevel;
Expand Down Expand Up @@ -2810,10 +2823,13 @@ void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device, const uint8_t *const
}
break;
}
case GL_TEXTURE_CUBE_MAP: {
case TextureType::CUBE: {
Extent extent{};
Offset offset{};
Extent stride{};

target = GL_TEXTURE_CUBE_MAP;
GL_CHECK(glBindTexture(GL_TEXTURE_CUBE_MAP, gpuTexture->glTexture));
for (size_t i = 0; i < count; ++i) {
const BufferTextureCopy &region = regions[i];
uint32_t mipLevel = region.texSubres.mipLevel;
Expand Down Expand Up @@ -2867,20 +2883,21 @@ void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device, const uint8_t *const
break;
}

if (!isCompressed && hasFlag(gpuTexture->flags, TextureFlagBit::GEN_MIPMAP)) {
GL_CHECK(glBindTexture(gpuTexture->glTarget, gpuTexture->glTexture));
GL_CHECK(glGenerateMipmap(gpuTexture->glTarget));
if (!isCompressed && hasFlag(gpuTexture->flags, TextureFlagBit::GEN_MIPMAP) && target != GL_NONE) {
GL_CHECK(glBindTexture(target, gpuTexture->glTexture));
GL_CHECK(glGenerateMipmap(target));
}
}

void cmdFuncGLES3CopyTextureToBuffers(GLES3Device *device, GLES3GPUTexture *gpuTexture, uint8_t *const *buffers, const BufferTextureCopy *regions, uint32_t count) {
void cmdFuncGLES3CopyTextureToBuffers(GLES3Device *device, GLES3GPUTextureView *gpuTextureView, uint8_t *const *buffers, const BufferTextureCopy *regions, uint32_t count) {
const auto *gpuTexture = gpuTextureView->gpuTexture;
auto glFormat = gpuTexture->glFormat;
auto glType = gpuTexture->glType;

for (uint32_t i = 0; i < count; ++i) {
auto region = regions[i];
uint8_t *copyDst = buffers[i];
auto framebuffer = device->framebufferCacheMap()->getFramebufferFromTexture(gpuTexture, region.texSubres);
auto framebuffer = device->framebufferCacheMap()->getFramebufferFromTexture(gpuTextureView, region.texSubres);
if (device->stateCache()->glReadFramebuffer != framebuffer) {
GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, framebuffer));
device->stateCache()->glReadFramebuffer = framebuffer;
Expand All @@ -2889,9 +2906,11 @@ void cmdFuncGLES3CopyTextureToBuffers(GLES3Device *device, GLES3GPUTexture *gpuT
}
}

void cmdFuncGLES3BlitTexture(GLES3Device *device, GLES3GPUTexture *gpuTextureSrc, GLES3GPUTexture *gpuTextureDst,
void cmdFuncGLES3BlitTexture(GLES3Device *device, GLES3GPUTextureView *gpuTextureSrcView, GLES3GPUTextureView *gpuTextureDstView,
const TextureBlit *regions, uint32_t count, Filter filter) {
GLES3GPUStateCache *cache = device->stateCache();
const auto *gpuTextureSrc = gpuTextureSrcView->gpuTexture;
const auto *gpuTextureDst = gpuTextureDstView->gpuTexture;

GLbitfield mask = getColorBufferMask(gpuTextureSrc->format);
for (uint32_t i = 0U; i < count; ++i) {
Expand All @@ -2903,7 +2922,7 @@ void cmdFuncGLES3BlitTexture(GLES3Device *device, GLES3GPUTexture *gpuTextureSrc
if (gpuTextureSrc->swapchain) {
srcFramebuffer = gpuTextureSrc->swapchain->glFramebuffer;
} else {
srcFramebuffer = device->framebufferCacheMap()->getFramebufferFromTexture(gpuTextureSrc, region.srcSubres);
srcFramebuffer = device->framebufferCacheMap()->getFramebufferFromTexture(gpuTextureSrcView, region.srcSubres);
}
if (cache->glReadFramebuffer != srcFramebuffer) {
GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, srcFramebuffer));
Expand All @@ -2914,7 +2933,7 @@ void cmdFuncGLES3BlitTexture(GLES3Device *device, GLES3GPUTexture *gpuTextureSrc
if (gpuTextureDst->swapchain) {
dstFramebuffer = gpuTextureDst->swapchain->glFramebuffer;
} else {
dstFramebuffer = device->framebufferCacheMap()->getFramebufferFromTexture(gpuTextureDst, region.dstSubres);
dstFramebuffer = device->framebufferCacheMap()->getFramebufferFromTexture(gpuTextureDstView, region.dstSubres);
}
if (cache->glDrawFramebuffer != dstFramebuffer) {
GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, dstFramebuffer));
Expand Down Expand Up @@ -2989,7 +3008,7 @@ void cmdFuncGLES3ExecuteCmds(GLES3Device *device, GLES3CmdPackage *cmdPackage) {
}
case GLESCmdType::BLIT_TEXTURE: {
GLES3CmdBlitTexture *cmd = cmdPackage->blitTextureCmds[cmdIdx];
cmdFuncGLES3BlitTexture(device, cmd->gpuTextureSrc, cmd->gpuTextureDst, cmd->regions, cmd->count, cmd->filter);
cmdFuncGLES3BlitTexture(device, cmd->gpuTextureSrcView, cmd->gpuTextureDstView, cmd->regions, cmd->count, cmd->filter);
break;
}
case GLESCmdType::QUERY: {
Expand Down Expand Up @@ -3115,9 +3134,9 @@ void GLES3GPUFramebufferObject::finalize(GLES3GPUStateCache *cache) {
GL_CHECK(glGenRenderbuffers(1, &view->gpuTexture->glRenderbuffer));
renderBufferStorage(GLES3Device::getInstance(), texture);
}
GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, attachment, texture->glTarget, texture->glRenderbuffer));
GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, attachment, GL_RENDERBUFFER, texture->glRenderbuffer));
} else {
GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, attachment, texture->glTarget, texture->glTexture, view->baseLevel));
GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, attachment, view->glTarget, texture->glTexture, view->baseLevel));
}
};

Expand Down
15 changes: 8 additions & 7 deletions native/cocos/renderer/gfx-gles3/GLES3Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ class GLES3CmdCopyBufferToTexture final : public GLESCmd {

class GLES3CmdBlitTexture final : public GLESCmd {
public:
GLES3GPUTexture *gpuTextureSrc = nullptr;
GLES3GPUTexture *gpuTextureDst = nullptr;
GLES3GPUTextureView *gpuTextureSrcView = nullptr;
GLES3GPUTextureView *gpuTextureDstView = nullptr;
const TextureBlit *regions = nullptr;
uint32_t count = 0U;
Filter filter = Filter::POINT;

GLES3CmdBlitTexture() : GLESCmd(GLESCmdType::BLIT_TEXTURE) {}

void clear() override {
gpuTextureSrc = nullptr;
gpuTextureDst = nullptr;
gpuTextureSrcView = nullptr;
gpuTextureDstView = nullptr;
regions = nullptr;
count = 0U;
}
Expand Down Expand Up @@ -246,6 +246,7 @@ void cmdFuncGLES3ResizeBuffer(GLES3Device *device, GLES3GPUBuffer *gpuBuffer);
void cmdFuncGLES3CreateTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture);
void cmdFuncGLES3DestroyTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture);
void cmdFuncGLES3ResizeTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture);
void cmdFuncGLES3CreateTextureView(GLES3Device *device, GLES3GPUTextureView *gpuTextureView);
void cmdFuncGLES3CreateShader(GLES3Device *device, GLES3GPUShader *gpuShader, GLES3GPUPipelineLayout *pipelineLayout);
void cmdFuncGLES3DestroyShader(GLES3Device *device, GLES3GPUShader *gpuShader);
void cmdFuncGLES3CreateRenderPass(GLES3Device *device, GLES3GPURenderPass *gpuRenderPass);
Expand Down Expand Up @@ -294,14 +295,14 @@ void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device,
const BufferTextureCopy *regions,
uint32_t count);
void cmdFuncGLES3CopyTextureToBuffers(GLES3Device *device,
GLES3GPUTexture *gpuTexture,
GLES3GPUTextureView *gpuTextureView,
uint8_t *const *buffers,
const BufferTextureCopy *regions,
uint32_t count);

void cmdFuncGLES3BlitTexture(GLES3Device *device,
GLES3GPUTexture *gpuTextureSrc,
GLES3GPUTexture *gpuTextureDst,
GLES3GPUTextureView *gpuTextureSrcView,
GLES3GPUTextureView *gpuTextureDstView,
const TextureBlit *regions,
uint32_t count,
Filter filter);
Expand Down
2 changes: 1 addition & 1 deletion native/cocos/renderer/gfx-gles3/GLES3Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ void GLES3Device::copyBuffersToTexture(const uint8_t *const *buffers, Texture *d

void GLES3Device::copyTextureToBuffers(Texture *srcTexture, uint8_t *const *buffers, const BufferTextureCopy *regions, uint32_t count) {
CC_PROFILE(GLES3DeviceCopyTextureToBuffers);
cmdFuncGLES3CopyTextureToBuffers(this, static_cast<GLES3Texture *>(srcTexture)->gpuTexture(), buffers, regions, count);
cmdFuncGLES3CopyTextureToBuffers(this, static_cast<GLES3Texture *>(srcTexture)->gpuTextureView(), buffers, regions, count);
}

void GLES3Device::getQueryPoolResults(QueryPool *queryPool) {
Expand Down
11 changes: 7 additions & 4 deletions native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ struct GLES3GPUTexture {
bool isPowerOf2{false};
bool useRenderBuffer{false};
bool memoryAllocated{true}; // false if swapchain image or implicit ms render buffer.
GLenum glTarget{0};
GLenum glInternalFmt{0};
GLenum glFormat{0};
GLenum glType{0};
Expand All @@ -156,8 +155,11 @@ struct GLES3GPUTextureView {
Format format = Format::UNKNOWN;
uint32_t baseLevel = 0U;
uint32_t levelCount = 1U;
uint32_t baseLayer = 0U;
uint32_t layerCount = 1U;
uint32_t basePlane = 0U;
uint32_t planeCount = 0U;
GLenum glTarget{0};
};

using GLES3GPUTextureViewList = ccstd::vector<GLES3GPUTextureView *>;
Expand Down Expand Up @@ -574,7 +576,8 @@ class GLES3GPUFramebufferCacheMap final {
}
}

GLuint getFramebufferFromTexture(const GLES3GPUTexture *gpuTexture, const TextureSubresLayers &subres) {
GLuint getFramebufferFromTexture(const GLES3GPUTextureView *gpuTextureView, const TextureSubresLayers &subres) {
const auto *gpuTexture = gpuTextureView->gpuTexture;
bool isTexture = gpuTexture->glTexture;
GLuint glResource = isTexture ? gpuTexture->glTexture : gpuTexture->glRenderbuffer;
auto &cacheMap = isTexture ? _textureMap : _renderbufferMap;
Expand All @@ -601,9 +604,9 @@ class GLES3GPUFramebufferCacheMap final {
attachment = GL_DEPTH_ATTACHMENT;
}
if (isTexture) {
GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, attachment, gpuTexture->glTarget, glResource, mipLevel));
GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, attachment, gpuTextureView->glTarget, glResource, mipLevel));
} else {
GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, attachment, gpuTexture->glTarget, glResource));
GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, attachment, GL_RENDERBUFFER, glResource));
}

GLenum status;
Expand Down
Loading
Loading