mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
FREESCAPE: renamed shaders filenames and added them into shader.dat
This commit is contained in:
parent
1af55ed1dc
commit
4f29dd4299
@ -522,6 +522,9 @@ endif
|
||||
ifdef ENABLE_HPL1
|
||||
DIST_FILES_SHADERS+=$(wildcard $(srcdir)/engines/hpl1/engine/impl/shaders/*)
|
||||
endif
|
||||
ifdef ENABLE_FREESCAPE
|
||||
DIST_FILES_SHADERS+=$(wildcard $(srcdir)/engines/freescape/shaders/*)
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: all clean distclean plugins dist-src clean-toplevel manual
|
||||
|
@ -1083,6 +1083,12 @@ XcodeProvider::ValueList& XcodeProvider::getResourceFiles(const BuildSetup &setu
|
||||
files.push_back("engines/wintermute/base/gfx/opengl/shaders/wme_sprite.fragment");
|
||||
files.push_back("engines/wintermute/base/gfx/opengl/shaders/wme_sprite.vertex");
|
||||
}
|
||||
if (CONTAINS_DEFINE(setup.defines, "ENABLE_FREESCAPE")) {
|
||||
files.push_back("engines/freescape/shaders/freescape_bitmap.fragment");
|
||||
files.push_back("engines/freescape/shaders/freescape_bitmap.vertex");
|
||||
files.push_back("engines/freescape/shaders/freescape_triangle.fragment");
|
||||
files.push_back("engines/freescape/shaders/freescape_triange.vertex");
|
||||
}
|
||||
files.push_back("icons/scummvm.icns");
|
||||
files.push_back("AUTHORS");
|
||||
files.push_back("COPYING");
|
||||
|
@ -281,6 +281,12 @@ shaders/hpl1_refract_special.fragment FILE "engines/hpl1/engi
|
||||
shaders/hpl1_refract_water.fragment FILE "engines/hpl1/engine/impl/shaders/hpl1_refract_water.fragment"
|
||||
shaders/hpl1_refract_water.vertex FILE "engines/hpl1/engine/impl/shaders/hpl1_refract_water.vertex"
|
||||
#endif
|
||||
#if PLUGIN_ENABLED_STATIC(FREESCAPE)
|
||||
shaders/freescape_bitmap.fragment FILE "engines/freescape/shaders/freescape_bitmap.fragment"
|
||||
shaders/freescape_bitmap.vertex FILE "engines/freescape/shaders/freescape_bitmap.vertex"
|
||||
shaders/freescape_triangle.fragment FILE "engines/freescape/shaders/freescape_cube.fragment"
|
||||
shaders/freescape_triangle.vertex FILE "engines/freescape/shaders/freescape_cube.vertex"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -75,13 +75,13 @@ void OpenGLShaderRenderer::init() {
|
||||
_verts = (Vertex *)malloc(sizeof(Vertex) * kVertexArraySize);
|
||||
|
||||
static const char *triangleAttributes[] = { "position", nullptr };
|
||||
_triangleShader = OpenGL::Shader::fromFiles("triangle", triangleAttributes);
|
||||
_triangleShader = OpenGL::Shader::fromFiles("freescape_triangle", triangleAttributes);
|
||||
_triangleVBO = OpenGL::Shader::createBuffer(GL_ARRAY_BUFFER, sizeof(Vertex) * kVertexArraySize, _verts, GL_DYNAMIC_DRAW);
|
||||
// TODO: Check if 3 * sizeof(float) == sizeof(Vertex)
|
||||
_triangleShader->enableVertexAttribute("position", _triangleVBO, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), 0);
|
||||
|
||||
static const char *bitmapAttributes[] = { "position", "texcoord", nullptr };
|
||||
_bitmapShader = OpenGL::Shader::fromFiles("bitmap", bitmapAttributes);
|
||||
_bitmapShader = OpenGL::Shader::fromFiles("freescape_bitmap", bitmapAttributes);
|
||||
_bitmapVBO = OpenGL::Shader::createBuffer(GL_ARRAY_BUFFER, sizeof(bitmapVertices), bitmapVertices);
|
||||
_bitmapShader->enableVertexAttribute("position", _bitmapVBO, 2, GL_FLOAT, GL_TRUE, 2 * sizeof(float), 0);
|
||||
_bitmapShader->enableVertexAttribute("texcoord", _bitmapVBO, 2, GL_FLOAT, GL_TRUE, 2 * sizeof(float), 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user