Util_GL_Blitter.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /************************************************************************************
  2. Filename : Util_GL_Blitter.h
  3. Content : GL implementation for blitting, supporting scaling & rotation
  4. Created : February 24, 2015
  5. Authors : Reza Nourai
  6. Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
  7. Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
  8. you may not use the Oculus VR Rift SDK except in compliance with the License,
  9. which is provided at the time of installation or download, or which
  10. otherwise accompanies this software in either electronic or hard copy form.
  11. You may obtain a copy of the License at
  12. http://www.oculusvr.com/licenses/LICENSE-3.2
  13. Unless required by applicable law or agreed to in writing, the Oculus VR SDK
  14. distributed under the License is distributed on an "AS IS" BASIS,
  15. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. See the License for the specific language governing permissions and
  17. limitations under the License.
  18. ************************************************************************************/
  19. #ifndef OVR_Util_GL_Blitter_h
  20. #define OVR_Util_GL_Blitter_h
  21. #include "Kernel/OVR_RefCount.h"
  22. #include "GL/CAPI_GLE.h"
  23. #if defined(OVR_OS_WIN32)
  24. #include <Windows.h>
  25. #include <gl/GL.h>
  26. #elif defined(__APPLE__)
  27. #include <OpenGL/gl.h>
  28. #else
  29. #include <GL/gl.h>
  30. #endif
  31. namespace OVR { namespace GLUtil {
  32. //-------------------------------------------------------------------------------------
  33. // ***** CAPI::Blitter
  34. // D3D11 implementation of blitter
  35. class Blitter : public RefCountBase<Blitter>
  36. {
  37. public:
  38. Blitter();
  39. ~Blitter();
  40. bool Initialize();
  41. // Blit sourceTexture to the active frame buffer
  42. bool Blt(GLuint sourceTexId);
  43. private:
  44. GLuint ReadFBO;
  45. };
  46. }} // namespace OVR::GLUtil
  47. #endif // OVR_Util_GL_Blitter_h