<commit_before>#include "Math.h"
#include <glm/gtc/matrix_transform.hpp>
#include "OpenGL.h"
#include "Vertex.h"
#include "Reference.h"
#include "PhysicsManager.h"
#include "ModelWorld.h"
#include "Camera.h"
#include "RenderTarget.h"
#include "Window.h" // SwapBuffers
#include "RenderManager.h"


bool InitRenderManager()
{
    EnableVertexArrays();
    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);
    //glEnable(GL_CULL_FACE);
    glDisable(GL_CULL_FACE);
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    return true;
}

void DestroyRenderManager()
{
}

void RenderScene()
{
    RenderTarget* defaultRenderTarget = GetDefaultRenderTarget();
    UpdateRenderTarget(defaultRenderTarget);

    SwapBuffers();

    /*
    // Render shadow map
    BeginRenderShadowTexture();
    glClear(GL_DEPTH_BUFFER_BIT);
    DrawGraphicsObjects();
    DrawPlayer();
    EndRenderShadowTexture();

    // Render world
    BeginRender();
    glClear(GL_DEPTH_BUFFER_BIT);
    BindProgram(GetDefaultProgram());
    SetModelViewProjectionMatrix(GetDefaultProgram(), &mvpMatrix);
    DrawGraphicsObjects();
    DrawPlayer();
    EndRender();

    // Render HUD<commit_msg>Added global 'time' uniform.<commit_after>#include "Math.h"
#include <glm/gtc/matrix_transform.hpp>
#include "OpenGL.h"
#include "Vertex.h"
#include "Reference.h"
#include "PhysicsManager.h"
#include "ModelWorld.h"
#include "Camera.h"
#include "Time.h"
#include "Shader.h"
#include "RenderTarget.h"
#include "Window.h" // SwapBuffers
#include "RenderManager.h"


bool InitRenderManager()
{
    EnableVertexArrays();
    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);
    //glEnable(GL_CULL_FACE);
    glDisable(GL_CULL_FACE);
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    return true;
}

void DestroyRenderManager()
{
}

void RenderScene()
{
    UniformValue timeValue;
    timeValue.f = GetTime();
    SetGlobalUniform("Time", FLOAT_UNIFORM, &timeValue);

    RenderTarget* defaultRenderTarget = GetDefaultRenderTarget();
    UpdateRenderTarget(defaultRenderTarget);

    SwapBuffers();

    /*
    // Render shadow map
    BeginRenderShadowTexture();
    glClear(GL_DEPTH_BUFFER_BIT);
    DrawGraphicsObjects();
    DrawPlayer();
    EndRenderShadowTexture();

    // Render world
    BeginRender();
    glClear(GL_DEPTH_BUFFER_BIT);
    BindProgram(GetDefaultProgram());
    SetModelViewProjectionMatrix(GetDefaultProgram(), &mvpMatrix);
    DrawGraphicsObjects();
    DrawPlayer();
    EndRender();

    // Render HUD
{'fraction_non_alphanumeric': 0.125390625, 'fraction_numerical': 0.0, 'mean_word_length': 4.55531453362256, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4086617', 'n_tokens_mistral': 869, 'n_tokens_neox': 852, 'n_words': 141}