Skip to content

Commit 29454c7

Browse files
committed
fix compilation with glsdk 0.5.2 and g++4.8
1 parent cf6b86c commit 29454c7

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

Tut 18 Bumpy Textures/Bumpy Square.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <string>
22
#include <vector>
33
#include <exception>
4+
#include <stdexcept>
45
#include <memory>
56
#include <stdio.h>
67
#include <glload/gl_3_3.h>

framework/Interpolators.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
#include <algorithm>
88
#include <iterator>
99

10+
// forward declare some functions needed by instantiations
11+
// FIXME this is certainly the wrong place for them
12+
typedef std::pair<float, float> MaxIntensityData;
13+
typedef std::vector<MaxIntensityData> MaxIntensityVector;
14+
typedef std::pair<glm::vec4, float> LightVectorData;
15+
typedef std::vector<LightVectorData> LightVector;
16+
float distance(const glm::vec3 &lhs, const glm::vec3 &rhs);
17+
glm::vec4 GetValue(const LightVectorData &data);
18+
float GetTime(const LightVectorData &data);
19+
float GetValue(const MaxIntensityData &data);
20+
float GetTime(const MaxIntensityData &data);
21+
1022
namespace Framework
1123
{
1224
template<typename ValueType>

framework/Mesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <algorithm>
1111
#include <iostream>
1212
#include <glload/gl_3_2_comp.h>
13-
#include <glload/gll.h>
13+
#include <glload/gl_load.h>
1414
#include <GL/freeglut.h>
1515
#include "framework.h"
1616
#include "Mesh.h"

framework/framework.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <stdexcept>
99
#include <string.h>
1010
#include <glload/gl_3_3.h>
11-
#include <glload/gll.hpp>
11+
#include <glload/gl_load.hpp>
1212
#include <glutil/Shader.h>
1313
#include <GL/freeglut.h>
1414
#include "framework.h"
@@ -87,7 +87,7 @@ void keyboard(unsigned char key, int x, int y);
8787
unsigned int defaults(unsigned int displayMode, int &width, int &height);
8888

8989
void APIENTRY DebugFunc(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
90-
const GLchar* message, GLvoid* userParam)
90+
const GLchar* message, const GLvoid* userParam)
9191
{
9292
std::string srcName;
9393
switch(source)

framework/framework.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function SetupProject(projName, ...)
8282
links {"glu32", "opengl32", "gdi32", "winmm", "user32"}
8383

8484
configuration "linux"
85-
links {"GL", "GLU", "X11"}
85+
links {"GL", "GLU", "X11", "pthread"}
8686

8787
SetupFrameworkProj()
8888

0 commit comments

Comments
 (0)