mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat: include for glsl (#24)
* refactor(gameplay): remove unused includes and members, clear vertex data after upload * feat(shader-tools): add recursive #include support for shader sources * refactor(shaders): extract noise and sky color functions into shared GLSL includes
This commit is contained in:
@@ -7,11 +7,7 @@ namespace Cubed {
|
||||
RiverWorm::RiverWorm() {}
|
||||
RiverWorm::~RiverWorm() {}
|
||||
|
||||
void RiverWorm::init(unsigned world_seed) {
|
||||
m_world_seed = world_seed;
|
||||
|
||||
m_random.init(m_world_seed);
|
||||
}
|
||||
void RiverWorm::init(unsigned world_seed) { m_world_seed = world_seed; }
|
||||
|
||||
void RiverWorm::reload(unsigned world_seed) {
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@ void VertexData::upload() {
|
||||
glEnableVertexAttribArray(5);
|
||||
glBindVertexArray(0);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
// Release memory
|
||||
m_vertices.clear();
|
||||
}
|
||||
void VertexData::update_sum() { m_sum = m_vertices.size(); }
|
||||
} // namespace Cubed
|
||||
Reference in New Issue
Block a user