<commit_before>/*
 * main.cpp
 *
 * main file for derelict app
 *
 * starts GLUT and runs callbacks
 */

#include <iostream>
#include <GL/glfw.h>

#include "Key.h"
#include "Cam.h"

void Init() {
	glClearColor(1, 1, 1, 0);
}

void Display() {
	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

	glColor3f(0, 0, 0);
	
	glBegin(GL_TRIANGLE_STRIP);
		glVertex2f( 0,  0);
		glVertex2f(1,  0);
		glVertex2f( 0, 1);
	glEnd();
}

void Update() {
	if(Key::I().Pressed('D')) {
		Vector pos = Cam::I().GetPos();
		pos.i += 0.1;
		Cam::I().SetPos(pos);
	} else if(Key::I().Pressed('A')) {
		Vector pos = Cam::I().GetPos();
		pos.i -= 0.1;
		Cam::I().SetPos(pos);
	}
}

int main(int argc, char ** argv) {
	glfwInit();

	glfwOpenWindow(800, 600, 0, 0, 0, 0, 16, 0, GLFW_WINDOW);

	Init();<commit_msg>Added more triangles, to show off depth effect<commit_after>/*
 * main.cpp
 *
 * main file for derelict app
 *
 * starts GLUT and runs callbacks
 */

#include <iostream>
#include <GL/glfw.h>

#include "Key.h"
#include "Cam.h"

void Init() {
	glClearColor(1, 1, 1, 0);
}

void Display() {
	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

	glColor3f(0, 0, 0);
	
	glBegin(GL_TRIANGLE_STRIP);
		glVertex2f( 0,  0);
		glVertex2f(1,  0);
		glVertex2f( 0, 1);
	glEnd();

	glColor3f(1, 0, 0);

	glBegin(GL_TRIANGLE_STRIP);
		glVertex3f( 0, 0, 1);
		glVertex3f( 1, 0, 1);
		glVertex3f( 0, 1, 1);
	glEnd();

	glColor3f(0, 1, 0);

	glBegin(GL_TRIANGLE_STRIP);
		glVertex3f( 0, 0, 2);
		glVertex3f( 1, 0, 2);
		glVertex3f( 0, 1, 2);
	glEnd();
}

void Update() {
	if(Key::I().Pressed('D')) {
		Vector pos = Cam::I().GetPos();
		pos.i += 0.1;
		Cam::I().SetPos(pos);
	} else if(Key::I().Pressed('A')) {
		Vector pos = Cam::I().GetPos();
		pos.i -= 0.1;
		Cam::I().SetPos(pos);
	}
}

int main(int argc, char ** argv) {
	glfwInit();

	glfwOpenWindow(800, 600, 0, 0, 0, 0, 16, 0, GLFW_WINDOW);

	glEnable(GL_DEPTH_TEST);
	glDepthFunc(GL_LESS);

	Init();
{'fraction_non_alphanumeric': 0.20394395433316034, 'fraction_numerical': 0.05189413596263622, 'mean_word_length': 3.905852417302799, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4572817', 'n_tokens_mistral': 991, 'n_tokens_neox': 879, 'n_words': 192}