Moving GL backend to new shader translator.

This seems to make a lot of things better, but may also break things.
Cleanup to follow.
This commit is contained in:
Ben Vanik
2015-12-06 00:48:41 -08:00
parent 295c62c7a4
commit 51a8002629
22 changed files with 453 additions and 4295 deletions

View File

@@ -13,14 +13,13 @@
#include <string>
#include "xenia/gpu/shader.h"
#include "xenia/gpu/shader_translator.h"
#include "xenia/ui/gl/gl_context.h"
namespace xe {
namespace gpu {
namespace gl4 {
class GL4ShaderTranslator;
class GL4Shader : public Shader {
public:
GL4Shader(ShaderType shader_type, uint64_t data_hash,
@@ -30,14 +29,11 @@ class GL4Shader : public Shader {
GLuint program() const { return program_; }
GLuint vao() const { return vao_; }
bool PrepareVertexShader(GL4ShaderTranslator* shader_translator);
bool PreparePixelShader(GL4ShaderTranslator* shader_translator);
bool Prepare(ShaderTranslator* shader_translator);
protected:
std::string GetHeader();
std::string GetFooter();
bool PrepareVertexArrayObject();
bool CompileProgram(std::string source);
bool CompileProgram();
GLuint program_;
GLuint vao_;