This commit is contained in:
yvt 2017-01-11 22:18:14 +09:00
parent 2c10bd3d24
commit 83f584b607
2 changed files with 8 additions and 1 deletions

View File

@ -333,9 +333,14 @@ namespace spades {
SPLog("Mirror Framebuffer Created");
} // (int)r_water >= 2
renderFramebufferWithoutDepth = dev->GenFramebuffer();
dev->BindFramebuffer(IGLDevice::Framebuffer, renderFramebufferWithoutDepth);
dev->FramebufferTexture2D(IGLDevice::Framebuffer, IGLDevice::ColorAttachment0,
IGLDevice::Texture2D, renderColorTexture, 0);
// add render buffer as a registered buffer
Buffer buf;
buf.framebuffer = renderFramebuffer;
buf.framebuffer = renderFramebufferWithoutDepth;
buf.texture = renderColorTexture;
buf.refCount = 0;
buf.w = device->ScreenWidth();

View File

@ -82,6 +82,8 @@ namespace spades {
IGLDevice::UInteger renderColorTexture;
IGLDevice::UInteger renderDepthTexture;
IGLDevice::UInteger renderFramebufferWithoutDepth;
IGLDevice::Enum fbInternalFormat;
IGLDevice::UInteger mirrorFramebuffer;