mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-21 10:37:05 +00:00
Add all the files
This commit is contained in:
parent
e3db07a16a
commit
d60742f52b
1445 changed files with 430238 additions and 0 deletions
42
src/Cafe/HW/Latte/Renderer/OpenGL/RendererShaderGL.h
Normal file
42
src/Cafe/HW/Latte/Renderer/OpenGL/RendererShaderGL.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#pragma once
|
||||
|
||||
#include "Cafe/HW/Latte/Renderer/RendererShader.h"
|
||||
#include "Common\GLInclude\GLInclude.h"
|
||||
|
||||
class RendererShaderGL : public RendererShader
|
||||
{
|
||||
public:
|
||||
RendererShaderGL(ShaderType type, uint64 baseHash, uint64 auxHash, bool isGameShader, bool isGfxPackShader, const std::string& glslSource);
|
||||
|
||||
virtual ~RendererShaderGL();
|
||||
|
||||
void PreponeCompilation(bool isRenderThread) override;
|
||||
bool IsCompiled() override;
|
||||
bool WaitForCompiled() override;
|
||||
|
||||
GLuint GetProgram() const { cemu_assert_debug(m_isCompiled); return m_program; }
|
||||
GLuint GetShaderObject() const { cemu_assert_debug(m_isCompiled); return m_shader_object; }
|
||||
|
||||
sint32 GetUniformLocation(const char* name) override;
|
||||
void SetUniform1iv(sint32 location, void* data, sint32 count) override;
|
||||
void SetUniform2fv(sint32 location, void* data, sint32 count) override;
|
||||
void SetUniform4iv(sint32 location, void* data, sint32 count) override;
|
||||
|
||||
static void ShaderCacheLoading_begin(uint64 cacheTitleId);
|
||||
static void ShaderCacheLoading_end();
|
||||
|
||||
private:
|
||||
GLuint m_program;
|
||||
GLuint m_shader_object;
|
||||
|
||||
bool loadBinary();
|
||||
void storeBinary();
|
||||
|
||||
std::string m_glslSource;
|
||||
|
||||
bool m_shader_attached{ false };
|
||||
bool m_isCompiled{ false };
|
||||
|
||||
static class FileCache* g_programBinaryCache;
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue