<commit_before>package io.github.achtern.AchternEngine.core.rendering;

import io.github.achtern.AchternEngine.core.Window;
import io.github.achtern.AchternEngine.core.contracts.PassFilter;
import io.github.achtern.AchternEngine.core.contracts.RenderPass;
import io.github.achtern.AchternEngine.core.contracts.RenderTarget;
import io.github.achtern.AchternEngine.core.rendering.binding.DataBinder;
import io.github.achtern.AchternEngine.core.rendering.binding.LWJGLDataBinder;
import io.github.achtern.AchternEngine.core.rendering.drawing.DrawStrategy;
import io.github.achtern.AchternEngine.core.rendering.drawing.DrawStrategyFactory;
import io.github.achtern.AchternEngine.core.rendering.shadow.BasicShadowRenderer;
import io.github.achtern.AchternEngine.core.rendering.sorting.AmbientFirstSorter;
import io.github.achtern.AchternEngine.core.scenegraph.Node;
import io.github.achtern.AchternEngine.core.scenegraph.entity.Camera;
import io.github.achtern.AchternEngine.core.scenegraph.entity.renderpasses.light.AmbientLight;
import io.github.achtern.AchternEngine.core.util.CommonDataStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL32.GL_DEPTH_CLAMP;

public class LWJGLRenderEngine extends CommonDataStore implements RenderEngine {

    public static final Logger LOGGER = LoggerFactory.getLogger(RenderEngine.class);

    protected Camera mainCamera;

    protected LWJGLDataBinder dataBinder;

    protected ArrayList<RenderPass> passes;
    protected RenderPass activePass;

    protected RenderTarget target;

    protected Color clearColor;

    protected DrawStrategy drawStrategy;

    //TMP will be proteceted after testing!
    public List<PassFilter> passFilters;

    public LWJGLRenderEngine() {

        dataBinder = new LWJGLDataBinder(this);

        drawStrategy = DrawStrategyFactory.get(DrawStrategyFactory.Common.SOLID);
        clearColor = new Color(0, 0, 0, 0);

        passes = new ArrayList<RenderPass>();
        passFilters = new ArrayList<PassFilter>();

        // TODO: do not hardcode this filter!
        addPassFilter(new BasicShadowRenderer());

        setRenderTarget(Window.getTarget());


        addInteger("diffuse", 0);
        addInteger("shadowMap", 1);

        setClearColor(clearColor);<commit_msg>Removed half working shadow rendering from release<commit_after>package io.github.achtern.AchternEngine.core.rendering;

import io.github.achtern.AchternEngine.core.Window;
import io.github.achtern.AchternEngine.core.contracts.PassFilter;
import io.github.achtern.AchternEngine.core.contracts.RenderPass;
import io.github.achtern.AchternEngine.core.contracts.RenderTarget;
import io.github.achtern.AchternEngine.core.rendering.binding.DataBinder;
import io.github.achtern.AchternEngine.core.rendering.binding.LWJGLDataBinder;
import io.github.achtern.AchternEngine.core.rendering.drawing.DrawStrategy;
import io.github.achtern.AchternEngine.core.rendering.drawing.DrawStrategyFactory;
import io.github.achtern.AchternEngine.core.rendering.sorting.AmbientFirstSorter;
import io.github.achtern.AchternEngine.core.scenegraph.Node;
import io.github.achtern.AchternEngine.core.scenegraph.entity.Camera;
import io.github.achtern.AchternEngine.core.scenegraph.entity.renderpasses.light.AmbientLight;
import io.github.achtern.AchternEngine.core.util.CommonDataStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL32.GL_DEPTH_CLAMP;

public class LWJGLRenderEngine extends CommonDataStore implements RenderEngine {

    public static final Logger LOGGER = LoggerFactory.getLogger(RenderEngine.class);

    protected Camera mainCamera;

    protected LWJGLDataBinder dataBinder;

    protected ArrayList<RenderPass> passes;
    protected RenderPass activePass;

    protected RenderTarget target;

    protected Color clearColor;

    protected DrawStrategy drawStrategy;

    //TMP will be proteceted after testing!
    public List<PassFilter> passFilters;

    public LWJGLRenderEngine() {

        dataBinder = new LWJGLDataBinder(this);

        drawStrategy = DrawStrategyFactory.get(DrawStrategyFactory.Common.SOLID);
        clearColor = new Color(0, 0, 0, 0);

        passes = new ArrayList<RenderPass>();
        passFilters = new ArrayList<PassFilter>();

        // TODO: do not hardcode this filter!
//        addPassFilter(new BasicShadowRenderer());

        setRenderTarget(Window.getTarget());


        addInteger("diffuse", 0);
        addInteger("shadowMap", 1);

        setClearColor(clearColor);
{'fraction_non_alphanumeric': 0.09350866207472344, 'fraction_numerical': 0.005009392611145898, 'mean_word_length': 4.858190709046455, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3320056', 'n_tokens_mistral': 1506, 'n_tokens_neox': 1455, 'n_words': 247}