TextureConverter.h 817 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2008 Dolphin Emulator Project
  2. // Licensed under GPLv2+
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "VideoBackends/OGL/GLUtil.h"
  6. #include "VideoCommon/VideoCommon.h"
  7. namespace OGL
  8. {
  9. // Converts textures between formats using shaders
  10. // TODO: support multiple texture formats
  11. namespace TextureConverter
  12. {
  13. void Init();
  14. void Shutdown();
  15. void EncodeToRamYUYV(GLuint srcTexture, const TargetRectangle& sourceRc,
  16. u8* destAddr, int dstWidth, int dstHeight);
  17. void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTexture);
  18. // returns size of the encoded data (in bytes)
  19. int EncodeToRamFromTexture(u32 address, GLuint source_texture, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyfmt, int bScaleByHalf, const EFBRectangle& source);
  20. }
  21. } // namespace OGL