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