need some help on bgfx::blit #2624
Answered
by
bkaradzic
WKJingtian
asked this question in
Q&A
Replies: 1 comment 14 replies
-
|
Beta Was this translation helpful? Give feedback.
14 replies
Answer selected by
WKJingtian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this is a code snippet where I used bgfx::blit:
textureHandle tex = createTexture2D(width, height, false, 1, bgfx::TextureFormat::RGBA8,BGFX_TEXTURE_READ_BACK | BGFX_TEXTURE_BLIT_DST);
bgfx::touch(A_VIEW_NEVER_USED);
bgfx::blit(A_VIEW_NEVER_USED, tex , 0, 0, bgfx::getTexture(A_FRAMEBUFFER), 0, 0, width, height);
the texture I obtained from this process was pure black (if read it, it's just 0x00), which was not how the frame buffer looked like.
Did I miss anything?
Beta Was this translation helpful? Give feedback.
All reactions