This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 | |
layout (location = 0) in vec4 vertexPosition; | |
layout (location = 1) in vec4 vertexColor; | |
smooth out vec4 outputVertexColor; | |
out float heightOutputPosition; | |
uniform float heightPosition; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef CAMERA_HPP | |
#define CAMERA_HPP | |
class Camera { | |
public: | |
Camera() : | |
zNear(0.0f), zFar(0.0f), fov(0.0f), | |
x(0.0f), y(0.0f), z(0.0f) { } | |
float zNear, zFar, fov; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 | |
layout(location = 0) in vec4 position; /// assigns a attribute index for the vertex shader | |
layout(location = 1) in vec4 color; | |
smooth out vec4 theColor; /// this varible is used by the next stage of the pipeline | |
uniform mat4 perspectiveMatrix; /// uniform variable of type mat4 | |
uniform vec2 offset; /// uniform variable of type vec2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 | |
layout(location = 0) in vec4 position; | |
layout(location = 1) in vec4 color; | |
smooth out vec4 theColor; | |
uniform float frustumScale; /// how big is the field of view | |
uniform float zNear; /// how near is the view from the eye | |
uniform float zFar; /// how far that this camera can view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SHADER_HEADER | |
#define SHADER_HEADER | |
#include <GL/glew.h> | |
#include <GL/freeglut.h> | |
#include <initializer_list> | |
#include <string> | |
#include <memory> | |
#include <iostream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLEW_STATIC | |
#include <GL/glew.h> | |
#include <GL/freeglut.h> | |
#include <iostream> | |
#include <cstdlib> | |
#include "main.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLEW_STATIC | |
#include <GL/glew.h> | |
#include <GL/freeglut.h> | |
#include <iostream> | |
#include <string> | |
#include <stdlib.h> | |
#include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLEW_STATIC /// needs to define because of glew32s.lib | |
#include <GL/glew.h> /// includes open gl functionality | |
#include <GL/freeglut.h> /// includes window functions | |
#include <cstdlib> /// EXIT_SUCESS, exit (); | |
#include <iostream> /// std::cerr | |
#include "main.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 | |
out vec4 outputColor; | |
void main () | |
{ | |
outputColor = vec4(1.0f, 0.50f, 0.50f, 0.0f); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def minMonthPayment (minMonthRate, Balance): | |
return minMonthRate * Balance | |
def interestPaid (AnnualRate, Balance): | |
return AnnualRate / 12.0 * Balance | |
def principalPaid (minMonthPay, interestPaid): | |
return minMonthPay - interestPaid | |
def remainingBalance (Balance, principalPaid): |