Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make immutable array const #577

Merged
merged 3 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Graphics/include/Graphics/Shader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace Graphics
{
#ifndef EMBEDDED
extern const uint32 shaderStageMap[];
#endif
/* Enum of supported shader types */
enum class ShaderType
{
Expand Down
3 changes: 0 additions & 3 deletions Graphics/src/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ namespace Graphics
{
};

// Defined in Shader.cpp
extern uint32 shaderStageMap[];

class Material_Impl : public MaterialRes
{
public:
Expand Down
6 changes: 3 additions & 3 deletions Graphics/src/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
namespace Graphics
{
#ifdef EMBEDDED
uint32 typeMap[] =
const uint32 typeMap[] =
{
GL_VERTEX_SHADER,
GL_FRAGMENT_SHADER,
};
#else
uint32 typeMap[] =
const uint32 typeMap[] =
{
GL_VERTEX_SHADER,
GL_FRAGMENT_SHADER,
GL_GEOMETRY_SHADER,
};
uint32 shaderStageMap[] =
const uint32 shaderStageMap[] =
{
GL_VERTEX_SHADER_BIT,
GL_FRAGMENT_SHADER_BIT,
Expand Down