Rename internal enum

This commit is contained in:
Alex Szpakowski
2021-04-07 20:43:22 -03:00
parent 9b4aea8f17
commit 14cda7818f
10 changed files with 71 additions and 71 deletions
+3 -3
View File
@@ -150,7 +150,7 @@ love::graphics::Texture *Graphics::newTexture(const Texture::Settings &settings,
return new Texture(settings, data);
}
love::graphics::ShaderStage *Graphics::newShaderStageInternal(ShaderStage::StageType stage, const std::string &cachekey, const std::string &source, bool gles)
love::graphics::ShaderStage *Graphics::newShaderStageInternal(ShaderStageType stage, const std::string &cachekey, const std::string &source, bool gles)
{
return new ShaderStage(this, stage, source, gles, cachekey);
}
@@ -401,8 +401,8 @@ bool Graphics::setMode(int width, int height, int pixelwidth, int pixelheight, b
if (!Shader::standardShaders[i])
{
std::vector<std::string> stages;
stages.push_back(Shader::getDefaultCode(stype, ShaderStage::STAGE_VERTEX));
stages.push_back(Shader::getDefaultCode(stype, ShaderStage::STAGE_PIXEL));
stages.push_back(Shader::getDefaultCode(stype, SHADERSTAGE_VERTEX));
stages.push_back(Shader::getDefaultCode(stype, SHADERSTAGE_PIXEL));
Shader::standardShaders[i] = newShader(stages);
}
}
+1 -1
View File
@@ -136,7 +136,7 @@ private:
}
};
love::graphics::ShaderStage *newShaderStageInternal(ShaderStage::StageType stage, const std::string &cachekey, const std::string &source, bool gles) override;
love::graphics::ShaderStage *newShaderStageInternal(ShaderStageType stage, const std::string &cachekey, const std::string &source, bool gles) override;
love::graphics::Shader *newShaderInternal(love::graphics::ShaderStage *vertex, love::graphics::ShaderStage *pixel) override;
love::graphics::StreamBuffer *newStreamBuffer(BufferUsage type, size_t size) override;
void setRenderTargetsInternal(const RenderTargets &rts, int w, int h, int pixelw, int pixelh, bool hasSRGBtexture) override;
+4 -4
View File
@@ -27,7 +27,7 @@ namespace graphics
namespace opengl
{
ShaderStage::ShaderStage(love::graphics::Graphics *gfx, StageType stage, const std::string &source, bool gles, const std::string &cachekey)
ShaderStage::ShaderStage(love::graphics::Graphics *gfx, ShaderStageType stage, const std::string &source, bool gles, const std::string &cachekey)
: love::graphics::ShaderStage(gfx, stage, source, gles, cachekey)
, glShader(0)
{
@@ -44,14 +44,14 @@ bool ShaderStage::loadVolatile()
if (glShader != 0)
return true;
StageType stage = getStageType();
ShaderStageType stage = getStageType();
const char *typestr = "unknown";
getConstant(stage, typestr);
GLenum glstage = 0;
if (stage == STAGE_VERTEX)
if (stage == SHADERSTAGE_VERTEX)
glstage = GL_VERTEX_SHADER;
else if (stage == STAGE_PIXEL)
else if (stage == SHADERSTAGE_PIXEL)
glstage = GL_FRAGMENT_SHADER;
else
throw love::Exception("%s shader stage is not handled in OpenGL backend code.", typestr);
+1 -1
View File
@@ -35,7 +35,7 @@ class ShaderStage final : public love::graphics::ShaderStage
{
public:
ShaderStage(love::graphics::Graphics *gfx, StageType stage, const std::string &source, bool gles, const std::string &cachekey);
ShaderStage(love::graphics::Graphics *gfx, ShaderStageType stage, const std::string &source, bool gles, const std::string &cachekey);
virtual ~ShaderStage();
ptrdiff_t getHandle() const override { return glShader; }