mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 13:05:45 -04:00
GPU/HW: Split shadergen to seperate class
This commit is contained in:
34
src/core/gpu_hw_shadergen.h
Normal file
34
src/core/gpu_hw_shadergen.h
Normal file
@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include "gpu_hw.h"
|
||||
|
||||
class GPU_HW_ShaderGen
|
||||
{
|
||||
public:
|
||||
enum class Backend
|
||||
{
|
||||
OpenGL
|
||||
};
|
||||
|
||||
public:
|
||||
GPU_HW_ShaderGen(Backend backend, u32 resolution_scale, bool true_color);
|
||||
~GPU_HW_ShaderGen();
|
||||
|
||||
void Init(Backend backend, u32 resolution_scale, bool true_color);
|
||||
|
||||
std::string GenerateBatchVertexShader(bool textured);
|
||||
std::string GenerateBatchFragmentShader(GPU_HW::BatchRenderMode transparency, GPU::TextureMode texture_mode, bool dithering);
|
||||
std::string GenerateScreenQuadVertexShader();
|
||||
std::string GenerateFillFragmentShader();
|
||||
std::string GenerateDisplayFragmentShader(bool depth_24bit, bool interlaced);
|
||||
std::string GenerateVRAMWriteFragmentShader();
|
||||
|
||||
Backend m_backend;
|
||||
u32 m_resolution_scale;
|
||||
bool m_true_color;
|
||||
|
||||
private:
|
||||
void GenerateShaderHeader(std::stringstream& ss);
|
||||
void GenerateBatchUniformBuffer(std::stringstream& ss);
|
||||
};
|
Reference in New Issue
Block a user