remove unused mIsMobile attribute

This commit is contained in:
Mathias Agopian
2022-08-22 22:15:02 -07:00
committed by Mathias Agopian
parent c93b49e714
commit 9b7295fd8f
2 changed files with 11 additions and 14 deletions
+8 -6
View File
@@ -101,14 +101,16 @@ void ShaderGenerator::shutdown() {
FinalizeProcess();
}
ShaderGenerator::ShaderGenerator(std::string vertex, std::string fragment, Backend backend,
bool isMobile) noexcept : mBackend(backend), mIsMobile(isMobile) {
mVertexBlob = transpileShader(backend, isMobile, std::move(vertex), ShaderStage::VERTEX);
mFragmentBlob = transpileShader(backend, isMobile, std::move(fragment), ShaderStage::FRAGMENT);
ShaderGenerator::ShaderGenerator(std::string vertex, std::string fragment,
Backend backend, bool isMobile) noexcept
: mBackend(backend),
mVertexBlob(transpileShader(ShaderStage::VERTEX, std::move(vertex), backend, isMobile)),
mFragmentBlob(transpileShader(ShaderStage::FRAGMENT, std::move(fragment), backend,
isMobile)) {
}
ShaderGenerator::Blob ShaderGenerator::transpileShader(Backend backend, bool isMobile, std::string shader,
ShaderStage stage) noexcept {
ShaderGenerator::Blob ShaderGenerator::transpileShader(
ShaderStage stage, std::string shader, Backend backend, bool isMobile) noexcept {
TProgram program;
const EShLanguage language = stage == ShaderStage::VERTEX ? EShLangVertex : EShLangFragment;
TShader tShader(language);
+3 -8
View File
@@ -46,18 +46,13 @@ public:
filament::backend::Program getProgram(filament::backend::DriverApi&) noexcept;
private:
enum class ShaderStage {
VERTEX,
FRAGMENT
};
using ShaderStage = filament::backend::ShaderType;
using Blob = std::vector<char>;
static Blob transpileShader(Backend backend, bool isMobile, std::string shader,
ShaderStage stage) noexcept;
static Blob transpileShader(ShaderStage stage, std::string shader, Backend backend,
bool isMobile) noexcept;
Backend mBackend;
bool mIsMobile;
Blob mVertexBlob;
Blob mFragmentBlob;