Skip to content

Commit

Permalink
Replace 'Pumbra' with 'Penumbra'.
Browse files Browse the repository at this point in the history
  • Loading branch information
nealkruis committed Aug 31, 2023
1 parent 581db6c commit f2084e8
Show file tree
Hide file tree
Showing 19 changed files with 100 additions and 100 deletions.
20 changes: 10 additions & 10 deletions examples/awning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
// Penumbra
#include <penumbra/penumbra.h>

class AwningLogger : public Pumbra::PenumbraLogger {
class AwningLogger : public Penumbra::PenumbraLogger {
void info(const std::string_view message) override {
write_message("Info", message);
}
};

int main() {

Pumbra::Surface wall({0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 1.f, 0.f, 1.f, 0.f, 0.f, 1.f}, "Wall");
Penumbra::Surface wall({0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 1.f, 0.f, 1.f, 0.f, 0.f, 1.f}, "Wall");

Pumbra::Polygon window_vertices = {0.25f, 0.f, 0.25f, 0.75f, 0.f, 0.25f,
0.75f, 0.f, 0.5f, 0.25f, 0.f, 0.5f};
Pumbra::Surface window(window_vertices, "Window");
Penumbra::Polygon window_vertices = {0.25f, 0.f, 0.25f, 0.75f, 0.f, 0.25f,
0.75f, 0.f, 0.5f, 0.25f, 0.f, 0.5f};
Penumbra::Surface window(window_vertices, "Window");
wall.add_hole(window_vertices);

Pumbra::Surface awning(
Penumbra::Surface awning(
{0.25f, 0.f, 0.5f, 0.75f, 0.f, 0.5f, 0.75f, -0.5f, 0.5f, 0.25f, -0.5f, 0.5f}, "Awning");

Pumbra::Penumbra::is_valid_context();
Penumbra::Penumbra::is_valid_context();

std::shared_ptr<Pumbra::PenumbraLogger> logger = std::make_shared<Pumbra::PenumbraLogger>();
Pumbra::Penumbra penumbra(512u, logger);
std::shared_ptr<Penumbra::PenumbraLogger> logger = std::make_shared<Penumbra::PenumbraLogger>();
Penumbra::Penumbra penumbra(512u, logger);

unsigned wall_id = penumbra.add_surface(wall);
unsigned window_id = penumbra.add_surface(window);
Expand All @@ -47,7 +47,7 @@ int main() {

penumbra.clear_model();

Pumbra::Surface fin(
Penumbra::Surface fin(
{0.75f, -0.25f, 0.5f, 0.75f, -0.25f, 0.25f, 0.75f, 0.0f, 0.25f, 0.75f, 0.0f, 0.5f}, "Fin");

window_id = penumbra.add_surface(window);
Expand Down
4 changes: 2 additions & 2 deletions include/penumbra/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <courierr/courierr.h>

namespace Pumbra {
namespace Penumbra {

class PenumbraLogger : public Courierr::Courierr {
public:
Expand Down Expand Up @@ -40,6 +40,6 @@ class PenumbraException : public Courierr::CourierrException {
explicit PenumbraException(const std::string &message, Courierr::Courierr &logger)
: CourierrException(message, logger) {}
};
} // namespace Pumbra
} // namespace Penumbra

#endif // define PENUMBRA_LOGGING_H_
4 changes: 2 additions & 2 deletions include/penumbra/penumbra.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <penumbra/surface.h>
#include <penumbra/logging.h>

namespace Pumbra {
namespace Penumbra {

enum class VendorType { unknown, nvidia, amd, intel, vmware, mesa };

Expand Down Expand Up @@ -64,6 +64,6 @@ class Penumbra {
std::unique_ptr<PenumbraImplementation> penumbra;
};

} // namespace Pumbra
} // namespace Penumbra

#endif /* PENUMBRA_H_ */
4 changes: 2 additions & 2 deletions include/penumbra/surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <memory>
#include <string>

namespace Pumbra {
namespace Penumbra {

typedef std::vector<float> Polygon; // Implicit list of 3D coordinates

Expand All @@ -30,5 +30,5 @@ class Surface {
std::shared_ptr<SurfaceImplementation> surface;
};

} // namespace Pumbra
} // namespace Penumbra
#endif // SURFACE_H_
4 changes: 2 additions & 2 deletions src/gl/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <penumbra/logging.h>
#include "context.h"

namespace Pumbra {
namespace Penumbra {

const char *Context::render_vertex_shader_source =
R"src(
Expand Down Expand Up @@ -705,4 +705,4 @@ void Context::initialize_render_mode() {
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
}

} // namespace Pumbra
} // namespace Penumbra
4 changes: 2 additions & 2 deletions src/gl/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#define MAX_FLOAT std::numeric_limits<float>::max()

namespace Pumbra {
namespace Penumbra {

class Context {

Expand Down Expand Up @@ -90,6 +90,6 @@ class Context {
void initialize_render_mode();
};

} // namespace Pumbra
} // namespace Penumbra

#endif // CONTEXT_H_
4 changes: 2 additions & 2 deletions src/gl/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define glDeleteVertexArraysX glDeleteVertexArrays
#endif

namespace Pumbra {
namespace Penumbra {

SurfaceBuffer::SurfaceBuffer(GLuint begin, GLuint count, GLint index)
: begin(begin), count(count), index(index) {}
Expand Down Expand Up @@ -104,4 +104,4 @@ void GLModel::draw_except(std::vector<SurfaceBuffer> hidden_surfaces) const {
}
}

} // namespace Pumbra
} // namespace Penumbra
4 changes: 2 additions & 2 deletions src/gl/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Standard
#include <vector>

namespace Pumbra {
namespace Penumbra {

class SurfaceBuffer {
public:
Expand Down Expand Up @@ -40,6 +40,6 @@ class GLModel {
bool objects_set{false};
};

} // namespace Pumbra
} // namespace Penumbra

#endif // MODEL_H_
4 changes: 2 additions & 2 deletions src/gl/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <gl/program.h>
#include <gl/shader.h>

namespace Pumbra {
namespace Penumbra {

GLProgram::GLProgram(const char *vertex_source, const char *fragment_source,
Courierr::Courierr *logger) {
Expand All @@ -25,4 +25,4 @@ GLuint GLProgram::get() const {
return program;
}

} // namespace Pumbra
} // namespace Penumbra
4 changes: 2 additions & 2 deletions src/gl/program.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <GLFW/glfw3.h>
#include <courierr/courierr.h>

namespace Pumbra {
namespace Penumbra {

class GLProgram {
public:
Expand All @@ -21,6 +21,6 @@ class GLProgram {
GLuint program;
};

} // namespace Pumbra
} // namespace Penumbra

#endif // PROGRAM_H_
4 changes: 2 additions & 2 deletions src/gl/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <penumbra/logging.h>
#include "shader.h"

namespace Pumbra {
namespace Penumbra {
GLShader::GLShader(GLenum type, const char *source, Courierr::Courierr *logger_in)
: logger(logger_in) {
GLint shader_ok;
Expand Down Expand Up @@ -36,4 +36,4 @@ GLuint GLShader::get() const {
return shader;
}

} // namespace Pumbra
} // namespace Penumbra
4 changes: 2 additions & 2 deletions src/gl/shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <GLFW/glfw3.h>
#include <courierr/courierr.h>

namespace Pumbra {
namespace Penumbra {

class GLShader {
public:
Expand All @@ -22,6 +22,6 @@ class GLShader {
Courierr::Courierr *logger;
};

} // namespace Pumbra
} // namespace Penumbra

#endif // SHADER_H_
4 changes: 2 additions & 2 deletions src/penumbra-implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <surface-implementation.h>
#include <gl/context.h>

namespace Pumbra {
namespace Penumbra {

class PenumbraImplementation {

Expand All @@ -34,5 +34,5 @@ class PenumbraImplementation {
[[nodiscard]] bool check_surface(unsigned index) const;
};

} // namespace Pumbra
} // namespace Penumbra
#endif // PENUMBRA_IMPLEMENTATION_H_
4 changes: 2 additions & 2 deletions src/penumbra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <penumbra/penumbra.h>
#include <penumbra-implementation.h>

namespace Pumbra {
namespace Penumbra {

Penumbra::Penumbra(unsigned int size, const std::shared_ptr<Courierr::Courierr> &logger)
: penumbra(std::make_unique<PenumbraImplementation>(static_cast<int>(size), logger)) {}
Expand Down Expand Up @@ -294,4 +294,4 @@ bool PenumbraImplementation::check_surface(const unsigned index) const {
return index < surfaces.size();
}

} // namespace Pumbra
} // namespace Penumbra
4 changes: 2 additions & 2 deletions src/sun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Penumbra
#include <sun.h>

namespace Pumbra {
namespace Penumbra {

Sun::Sun() : azimuth(0.f), altitude(0.f) {}

Expand Down Expand Up @@ -44,4 +44,4 @@ float Sun::get_azimuth() const {
float Sun::get_altitude() const {
return altitude;
}
} // namespace Pumbra
} // namespace Penumbra
4 changes: 2 additions & 2 deletions src/sun.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Vendor
#include <courierr/courierr.h>

namespace Pumbra {
namespace Penumbra {

typedef float (*mat4x4_ptr)[4];

Expand All @@ -38,6 +38,6 @@ class Sun {
float azimuth, altitude;
};

} // namespace Pumbra
} // namespace Penumbra

#endif // SUN_H_
4 changes: 2 additions & 2 deletions src/surface-implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <vector>
#include <array>

namespace Pumbra {
namespace Penumbra {

struct TessData {
TessData(const float *array, unsigned number_of_vertices);
Expand All @@ -33,5 +33,5 @@ class SurfaceImplementation {
std::string name;
};

} // namespace Pumbra
} // namespace Penumbra
#endif // SURFACE_IMPLEMENTATION_H_
4 changes: 2 additions & 2 deletions src/surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <surface-implementation.h>
#include <penumbra/logging.h>

namespace Pumbra {
namespace Penumbra {

/*
void* stdAlloc(void* userData, unsigned size)
Expand Down Expand Up @@ -97,4 +97,4 @@ TessData SurfaceImplementation::tessellate() {
return data;
}

} // namespace Pumbra
} // namespace Penumbra
Loading

0 comments on commit f2084e8

Please sign in to comment.