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
| #include <map> | |
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| typedef void (*FuncPtr)(string,string); | |
| typedef std::map<std::string, FuncPtr> FuncPtrMap; | |
| void abFunc(string a,string b){ |
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
| #include <map> | |
| #include <functional> | |
| #include <string> | |
| #include <iostream> | |
| using namespace std; | |
| function<void(string,string)> func; | |
| void actualABFunc(string a, string b){ |
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
| #pragma once | |
| #ifndef SHIFTERS_H | |
| #define SHIFTERS_H | |
| /** | |
| * This work is licensed under a Creative Commons, | |
| * Attribution-NonCommercial-ShareAlike 3.0 Unported License. | |
| * http://creativecommons.org/licenses/by-nc-sa/3.0/ | |
| * | |
| * You may copy, tweak, and build upon this work non-commercially | |
| * as long as 1. The author is credited and 2. You license the modified |
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
| #pragma once | |
| #ifndef SHIFTERS_H | |
| #define SHIFTERS_H | |
| /** | |
| * This work is licensed under a Creative Commons, | |
| * Attribution-NonCommercial-ShareAlike 3.0 Unported License. | |
| * http://creativecommons.org/licenses/by-nc-sa/3.0/ | |
| * | |
| * You may copy, tweak, and build upon this work non-commercially | |
| * as long as 1. The author is credited and 2. You license the modified |
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
| #include "UIWindow.h" | |
| UIWindow::UIWindow(int x, int y, int width, int height,string fontName): | |
| x(x),y(y),height(height),width(width)//,titleFontName(fontName) | |
| { | |
| this->myType = Utils::UI_WINDOW; | |
| //build window | |
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
| auto t1 = Clock::now(); | |
| app->update(0); | |
| app->display(); | |
| auto t2 = Clock::now(); | |
| auto tt = (t2-t1); | |
| elapsed = (float)tt.count()/1000000.0f; | |
| app->fpsUpdate(elapsed); |
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
| ///////////////////////////////////////////////////////////////////////////////////////// | |
| // OpenGL4 Vertex Shader | |
| #version 400 | |
| layout (location = 0) in vec3 a_pos; | |
| layout (location = 1) in vec3 a_nor; | |
| layout (location = 2) in vec3 a_uvs; | |
| layout (location = 3) in vec3 a_tan; | |
| layout (location = 4) in vec3 a_bin; | |
| uniform mat4 Projection; |
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 400 | |
| layout (location = 0) in vec3 attribPosition; | |
| layout (location = 1) in vec3 attribNormal; | |
| layout (location = 2) in vec2 attribTexCoord; | |
| layout (location = 3) in vec3 attribTangent; | |
| layout (location = 3) in vec3 attribBinormal; | |
| uniform mat4 mvp; | |
| uniform mat4 mvm; | |
| uniform mat3 nm; |
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 400 | |
| layout( location = 0 ) out vec4 frag_main; | |
| struct PointLight{ | |
| vec3 position; | |
| vec3 ambient; | |
| vec3 diffuse; | |
| vec3 specular; | |
| float shininess; | |
| float intensity; | |
| }; |
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
| struct TeapotPatch | |
| { | |
| bool mirrorZ; | |
| int indices[16]; | |
| }; | |
| // Static data array defines the bezier patches that make up the teapot. | |
| const TeapotPatch TeapotPatches[] = | |
| { |
OlderNewer