2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:29:41 -06:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "VideoBackends/OGL/GLUtil.h"
|
|
|
|
#include "VideoCommon/VideoCommon.h"
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2011-01-29 13:16:51 -07:00
|
|
|
namespace OGL
|
|
|
|
{
|
|
|
|
|
|
|
|
// Converts textures between formats using shaders
|
2008-12-07 21:46:09 -07:00
|
|
|
// TODO: support multiple texture formats
|
|
|
|
namespace TextureConverter
|
|
|
|
{
|
|
|
|
|
|
|
|
void Init();
|
|
|
|
void Shutdown();
|
|
|
|
|
2009-07-14 18:51:24 -06:00
|
|
|
void EncodeToRamYUYV(GLuint srcTexture, const TargetRectangle& sourceRc,
|
2015-07-07 07:09:25 -06:00
|
|
|
u8* destAddr, u32 dstWidth, u32 dstStride, u32 dstHeight);
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2013-08-20 07:11:03 -06:00
|
|
|
void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTexture);
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2011-12-29 17:00:34 -07:00
|
|
|
// returns size of the encoded data (in bytes)
|
2015-07-07 07:09:25 -06:00
|
|
|
int EncodeToRamFromTexture(u32 address, GLuint source_texture, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyfmt, int bScaleByHalf, const EFBRectangle& source, u32 writeStride);
|
2010-07-12 13:30:25 -06:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
}
|
|
|
|
|
2011-01-29 13:16:51 -07:00
|
|
|
} // namespace OGL
|