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