2015-05-24 07:55:12 +03:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-18 02:08:10 +03:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 06:29:41 +03:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 06:46:09 +02:00
|
|
|
|
2014-02-10 20:54:46 +02:00
|
|
|
#pragma once
|
2008-12-08 06:46:09 +02:00
|
|
|
|
2017-02-01 06:29:29 +02:00
|
|
|
#include "Common/CommonTypes.h"
|
2015-09-18 19:40:00 +03:00
|
|
|
#include "Common/GL/GLUtil.h"
|
|
|
|
|
2014-02-17 12:18:15 +02:00
|
|
|
#include "VideoCommon/VideoCommon.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();
|
|
|
|
|
2016-06-24 11:43:46 +03:00
|
|
|
void EncodeToRamYUYV(GLuint srcTexture, const TargetRectangle& sourceRc, u8* destAddr, u32 dstWidth,
|
|
|
|
u32 dstStride, u32 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)
|
2016-06-24 11:43:46 +03:00
|
|
|
void EncodeToRamFromTexture(u8* dest_ptr, u32 format, u32 native_width, u32 bytes_per_row,
|
2016-12-26 21:54:37 +02:00
|
|
|
u32 num_blocks_y, u32 memory_stride, bool is_depth_copy,
|
2016-06-24 11:43:46 +03:00
|
|
|
bool bIsIntensityFmt, int bScaleByHalf, const EFBRectangle& source);
|
2008-12-08 06:46:09 +02:00
|
|
|
}
|
|
|
|
|
2011-01-29 22:16:51 +02:00
|
|
|
} // namespace OGL
|