<commit_before>#include "RSolid.h"

#include <iostream>

#include "../Maths/Matrix_Maths.h"

#include "../Camera.h"

#include "../World/Chunk/CSection.h"

namespace Renderer
{
    void RChunk::draw(const Chunk::Section& section)
    {
        m_chunks.push_back(&section);
    }

    void RChunk::update(const Camera& camera)
    {
        //glEnable    (GL_CULL_FACE);

        m_shader.bind();

        m_shader.setProjMatrix(camera.getProjectionMatrix());
        m_shader.setViewMatrix(camera.getViewMatrix());

        for (const auto* section : m_chunks)
        {
            prepare(*section);

            glDrawElements(GL_TRIANGLES,
                           section->getMeshes().solidMesh.getModel().getIndicesCount(),
                           GL_UNSIGNED_INT,
                           nullptr);

        }
        m_chunks.clear();
    }

    void RChunk::prepare(const Chunk::Section& section)
    {
        section.getMeshes().solidMesh.getModel().bind();
    }
}
<commit_msg>readd face cull<commit_after>#include "RSolid.h"

#include <iostream>

#include "../Maths/Matrix_Maths.h"

#include "../Camera.h"

#include "../World/Chunk/CSection.h"

namespace Renderer
{
    void RChunk::draw(const Chunk::Section& section)
    {
        m_chunks.push_back(&section);
    }

    void RChunk::update(const Camera& camera)
    {
        glEnable    (GL_CULL_FACE);

        m_shader.bind();

        m_shader.setProjMatrix(camera.getProjectionMatrix());
        m_shader.setViewMatrix(camera.getViewMatrix());

        for (const auto* section : m_chunks)
        {
            prepare(*section);

            glDrawElements(GL_TRIANGLES,
                           section->getMeshes().solidMesh.getModel().getIndicesCount(),
                           GL_UNSIGNED_INT,
                           nullptr);

        }
        m_chunks.clear();
    }

    void RChunk::prepare(const Chunk::Section& section)
    {
        section.getMeshes().solidMesh.getModel().bind();
    }
}

{'fraction_non_alphanumeric': 0.13052208835341367, 'fraction_numerical': 0.0, 'mean_word_length': 2.089922480620155, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7429598', 'n_tokens_mistral': 628, 'n_tokens_neox': 623, 'n_words': 86}