<commit_before>package org.voxeltech.graphics;

public class Renderer {

	public Renderer() {
		
	}
	
}<commit_msg>Few changed things<commit_after>package org.voxeltech.graphics;

import java.util.ArrayList;
import java.util.Arrays;
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.GLU;

public class Renderer {

	private ArrayList<Voxel> objects = new ArrayList<Voxel>();

    public Renderer(int displayWidth, int displayHeight) {
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glEnable(GL11.GL_LIGHTING);
		GL11.glViewport(0, 0, displayWidth, displayHeight);
		
		// Makes blocks "solid" looking
		GL11.glClearDepth(1.0f); // Depth Buffer Setup
		GL11.glEnable(GL11.GL_DEPTH_TEST); // Enables Depth Testing
		GL11.glDepthFunc(GL11.GL_LEQUAL); // The Type Of Depth Testing To Do
		
		GL11.glMatrixMode(GL11.GL_PROJECTION);
		GL11.glLoadIdentity();
		GLU.gluPerspective(65.0f, ((float)displayWidth/(float)displayHeight), 1.0f, 100.0f);
		GL11.glMatrixMode(GL11.GL_MODELVIEW);
		GL11.glShadeModel(GL11.GL_FLAT);
		GL11.glClearColor(1.0f, 1.0f, 1.0f, 0.0f); // Make background white
		GL11.glLoadIdentity();
	    GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);
    }

    public void addObject(Voxel obj) {
    	objects.add(obj);
    }

    public void addAllObjects(Voxel[] objs) {
    	objects.addAll(Arrays.asList(objs));
    }

    public void render() {
		for(int i = 0; i < objects.size(); i++) {
		    if(objects.get(i).shouldRender()) {
		    	objects.get(i).render();
		    }
		}
    }

}
{'fraction_non_alphanumeric': 0.13504611330698288, 'fraction_numerical': 0.045454545454545456, 'mean_word_length': 3.9158576051779934, 'pattern_counts': {'":': 0, '<': 6, '<?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': '6189099', 'n_tokens_mistral': 662, 'n_tokens_neox': 582, 'n_words': 97}