| 71 | } |
| 72 | |
| 73 | void CompositorGL::RenderMirrorTexture(ovrMirrorTexture mirrorTexture) |
| 74 | { |
| 75 | /*GLint drawFboId = 0, readFboId = 0, texId = 0; |
| 76 | glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFboId); |
| 77 | glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &readFboId); |
| 78 | glGetIntegerv(GL_TEXTURE_BINDING_2D, &texId); |
| 79 | |
| 80 | TextureGL* texture = (TextureGL*)mirrorTexture->Texture.get(); |
| 81 | glBindFramebuffer(GL_DRAW_FRAMEBUFFER, texture->Framebuffer); |
| 82 | |
| 83 | for (int i = 0; i < ovrEye_Count; i++) |
| 84 | { |
| 85 | vr::VRCompositor()->LockGLSharedTextureForAccess(m_mirror[i].second); |
| 86 | |
| 87 | GLint width, height; |
| 88 | glBindTexture(GL_TEXTURE_2D, m_mirror[i].first); |
| 89 | glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); |
| 90 | glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height); |
| 91 | |
| 92 | // Bind the buffer to copy from the compositor to the mirror texture |
| 93 | glBindFramebuffer(GL_READ_FRAMEBUFFER, m_mirrorFB[i]); |
| 94 | GLint offset = (mirrorTexture->Desc.Width / 2) * i; |
| 95 | glBlitFramebuffer(0, 0, width, height, offset, 0, offset + mirrorTexture->Desc.Width / 2, mirrorTexture->Desc.Height, GL_COLOR_BUFFER_BIT, GL_LINEAR); |
| 96 | |
| 97 | vr::VRCompositor()->UnlockGLSharedTextureForAccess(m_mirror[i].second); |
| 98 | } |
| 99 | |
| 100 | glBindTexture(GL_TEXTURE_2D, texId); |
| 101 | glBindFramebuffer(GL_DRAW_FRAMEBUFFER, drawFboId); |
| 102 | glBindFramebuffer(GL_READ_FRAMEBUFFER, readFboId);*/ |
| 103 | } |
| 104 | |
| 105 | void CompositorGL::RenderTextureSwapChain(vr::EVREye eye, TextureBase* src, TextureBase* dst, ovrRecti viewport, vr::VRTextureBounds_t bounds, vr::HmdVector4_t quad) |
| 106 | { |
nothing calls this directly
no outgoing calls
no test coverage detected