mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
rwengine: iwyu: reduce warnings in render subdirectory
This commit is contained in:
parent
d07beff43e
commit
c0a4d627af
@ -13,6 +13,7 @@
|
|||||||
{ "include": [ "@<glm/gtx/norm\\.inl>", "private", "<glm/gtx/norm.hpp>", "public"] },
|
{ "include": [ "@<glm/gtx/norm\\.inl>", "private", "<glm/gtx/norm.hpp>", "public"] },
|
||||||
{ "include": [ "@<glm/gtx/\\.\\./gtc/quaternion\\.hpp>", "public", "<glm/gtc/quaternion.hpp>", "public"] },
|
{ "include": [ "@<glm/gtx/\\.\\./gtc/quaternion\\.hpp>", "public", "<glm/gtc/quaternion.hpp>", "public"] },
|
||||||
{ "include": [ "@<glm/gtx/\\.\\./gtx/quaternion\\.hpp>", "public", "<glm/gtx/quaternion.hpp>", "public"] },
|
{ "include": [ "@<glm/gtx/\\.\\./gtx/quaternion\\.hpp>", "public", "<glm/gtx/quaternion.hpp>", "public"] },
|
||||||
|
{ "symbol": [ "glm::value_ptr", "private", "<glm/gtc/type_ptr.hpp>", "public"] },
|
||||||
# Boost filesystem:
|
# Boost filesystem:
|
||||||
{ "include": [ "@<boost/filesystem/.*>", "private", "<boost/filesystem.hpp>", "public"] },
|
{ "include": [ "@<boost/filesystem/.*>", "private", "<boost/filesystem.hpp>", "public"] },
|
||||||
# Boost iterator:
|
# Boost iterator:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
@ -5,9 +5,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#if RW_DEBUG
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <rw/filesystem.hpp>
|
#include <rw/filesystem.hpp>
|
||||||
|
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
#include "render/DebugDraw.hpp"
|
#include "render/DebugDraw.hpp"
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
|
||||||
#include <glm/gtc/matrix_transform.hpp>
|
|
||||||
#include <glm/gtc/type_ptr.hpp>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
#include <LinearMath/btVector3.h>
|
||||||
|
|
||||||
|
#include <data/Clump.hpp>
|
||||||
|
#include <gl/DrawBuffer.hpp>
|
||||||
|
#include <gl/GeometryBuffer.hpp>
|
||||||
|
#include <gl/gl_core_3_3.h>
|
||||||
|
#include <rw/defines.hpp>
|
||||||
|
|
||||||
|
#include "render/GameRenderer.hpp"
|
||||||
|
|
||||||
DebugDraw::DebugDraw() : shaderProgram(nullptr) {
|
DebugDraw::DebugDraw() : shaderProgram(nullptr) {
|
||||||
lineBuff = new GeometryBuffer;
|
lineBuff = new GeometryBuffer;
|
||||||
dbuff = new DrawBuffer;
|
dbuff = new DrawBuffer;
|
||||||
|
@ -1,8 +1,21 @@
|
|||||||
#pragma once
|
#ifndef _RWENGINE_DEBUGDRAW_HPP_
|
||||||
|
#define _RWENGINE_DEBUGDRAW_HPP_
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <LinearMath/btIDebugDraw.h>
|
#include <LinearMath/btIDebugDraw.h>
|
||||||
|
#include <LinearMath/btScalar.h>
|
||||||
|
|
||||||
#include <data/Clump.hpp>
|
#include <data/Clump.hpp>
|
||||||
#include <render/GameRenderer.hpp>
|
#include <gl/gl_core_3_3.h>
|
||||||
|
|
||||||
|
#include "render/OpenGLRenderer.hpp"
|
||||||
|
|
||||||
|
class btVector3;
|
||||||
|
class DrawBuffer;
|
||||||
|
class GameRenderer;
|
||||||
|
class GeometryBuffer;
|
||||||
|
|
||||||
class DebugDraw : public btIDebugDraw {
|
class DebugDraw : public btIDebugDraw {
|
||||||
public:
|
public:
|
||||||
@ -38,3 +51,5 @@ protected:
|
|||||||
|
|
||||||
GLuint texture;
|
GLuint texture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,31 +1,29 @@
|
|||||||
#include <data/Clump.hpp>
|
#include "render/GameRenderer.hpp"
|
||||||
#include <engine/Animator.hpp>
|
|
||||||
#include <engine/GameState.hpp>
|
|
||||||
#include <engine/GameWorld.hpp>
|
|
||||||
#include <render/GameRenderer.hpp>
|
|
||||||
|
|
||||||
#include <objects/CharacterObject.hpp>
|
#include <algorithm>
|
||||||
#include <objects/InstanceObject.hpp>
|
#include <cstdint>
|
||||||
#include <objects/PickupObject.hpp>
|
#include <cmath>
|
||||||
#include <objects/ProjectileObject.hpp>
|
#include <string>
|
||||||
#include <objects/VehicleObject.hpp>
|
#include <vector>
|
||||||
|
|
||||||
#include <ai/CharacterController.hpp>
|
|
||||||
#include <data/ModelData.hpp>
|
|
||||||
|
|
||||||
#include <data/CutsceneData.hpp>
|
|
||||||
#include <objects/CutsceneObject.hpp>
|
|
||||||
#include <render/ObjectRenderer.hpp>
|
|
||||||
|
|
||||||
#include <core/Logger.hpp>
|
|
||||||
#include <render/GameShaders.hpp>
|
|
||||||
|
|
||||||
#include <deque>
|
|
||||||
#include <glm/gtc/constants.hpp>
|
#include <glm/gtc/constants.hpp>
|
||||||
#include <glm/gtc/type_ptr.hpp>
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
#include <glm/gtx/string_cast.hpp>
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
|
#include <glm/gtc/quaternion.hpp>
|
||||||
|
|
||||||
#include <core/Profiler.hpp>
|
#include <gl/TextureData.hpp>
|
||||||
|
#include <rw/types.hpp>
|
||||||
|
|
||||||
|
#include "core/Logger.hpp"
|
||||||
|
#include "core/Profiler.hpp"
|
||||||
|
#include "engine/GameData.hpp"
|
||||||
|
#include "engine/GameState.hpp"
|
||||||
|
#include "engine/GameWorld.hpp"
|
||||||
|
#include "loaders/WeatherLoader.hpp"
|
||||||
|
#include "objects/GameObject.hpp"
|
||||||
|
#include "render/ObjectRenderer.hpp"
|
||||||
|
#include "render/GameShaders.hpp"
|
||||||
|
#include "render/VisualFX.hpp"
|
||||||
|
|
||||||
const size_t skydomeSegments = 8, skydomeRows = 10;
|
const size_t skydomeSegments = 8, skydomeRows = 10;
|
||||||
constexpr uint32_t kMissingTextureBytes[] = {
|
constexpr uint32_t kMissingTextureBytes[] = {
|
||||||
|
@ -1,39 +1,27 @@
|
|||||||
#ifndef _GAMERENDERER_HPP_
|
#ifndef _RWENGINE_GAMERENDERER_HPP_
|
||||||
#define _GAMERENDERER_HPP_
|
#define _RWENGINE_GAMERENDERER_HPP_
|
||||||
#include <rw/defines.hpp>
|
|
||||||
|
|
||||||
class Logger;
|
#include <cstddef>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
|
#include <gl/DrawBuffer.hpp>
|
||||||
|
#include <gl/GeometryBuffer.hpp>
|
||||||
#include <gl/gl_core_3_3.h>
|
#include <gl/gl_core_3_3.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <rw/forward.hpp>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <render/ViewCamera.hpp>
|
|
||||||
|
|
||||||
#include <render/OpenGLRenderer.hpp>
|
#include <render/OpenGLRenderer.hpp>
|
||||||
#include "MapRenderer.hpp"
|
#include <render/MapRenderer.hpp>
|
||||||
#include "TextRenderer.hpp"
|
#include <render/TextRenderer.hpp>
|
||||||
#include "WaterRenderer.hpp"
|
#include <render/ViewCamera.hpp>
|
||||||
|
#include <render/WaterRenderer.hpp>
|
||||||
|
|
||||||
class Clump;
|
class Logger;
|
||||||
class ModelFrame;
|
class GameData;
|
||||||
class GameWorld;
|
class GameWorld;
|
||||||
class GameObject;
|
class TextureData;
|
||||||
|
|
||||||
struct AreaIndicatorInfo;
|
|
||||||
|
|
||||||
/// @todo migrate to some other way of rendering each object type.
|
|
||||||
class CharacterObject;
|
|
||||||
class VehicleObject;
|
|
||||||
class InstanceObject;
|
|
||||||
class PickupObject;
|
|
||||||
class ProjectileObject;
|
|
||||||
class CutsceneObject;
|
|
||||||
|
|
||||||
class Animator;
|
|
||||||
|
|
||||||
class Renderer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Implements high level drawing logic and low level draw commands
|
* @brief Implements high level drawing logic and low level draw commands
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <render/GameShaders.hpp>
|
#include "render/GameShaders.hpp"
|
||||||
|
|
||||||
namespace GameShaders {
|
namespace GameShaders {
|
||||||
|
|
||||||
@ -44,17 +44,17 @@ vec3 planeIntercept( vec3 start, vec3 dir, float height )
|
|||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
TexCoords = position * vec2(0.5,0.5) + vec2(0.5);
|
TexCoords = position * vec2(0.5,0.5) + vec2(0.5);
|
||||||
|
|
||||||
mat4 vp = projection * view;
|
mat4 vp = projection * view;
|
||||||
mat4 projector = inverseVP;
|
mat4 projector = inverseVP;
|
||||||
|
|
||||||
mat3 rot = mat3(view);
|
mat3 rot = mat3(view);
|
||||||
vec3 ray = vec3(-position.x, -position.y, projection[0][0] ) * rot;
|
vec3 ray = vec3(-position.x, -position.y, projection[0][0] ) * rot;
|
||||||
|
|
||||||
float plane = texture( data, TexCoords ).r;
|
float plane = texture( data, TexCoords ).r;
|
||||||
|
|
||||||
vec3 ws = planeIntercept( campos.xyz, ray, plane );
|
vec3 ws = planeIntercept( campos.xyz, ray, plane );
|
||||||
|
|
||||||
ws.z = ws.z + (-1.0+(sin(time + (ws.x + ws.y) * waveParams.x)) * waveParams.y);
|
ws.z = ws.z + (-1.0+(sin(time + (ws.x + ws.y) * waveParams.x)) * waveParams.y);
|
||||||
TexCoords = ws.xy / 5.0;
|
TexCoords = ws.xy / 5.0;
|
||||||
gl_Position = vp * vec4(ws, 1.0);
|
gl_Position = vp * vec4(ws, 1.0);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#ifndef _RWENGINE_GAMESHADERS_HPP_
|
||||||
#ifndef _GAMESHADERS_HPP_
|
#define _RWENGINE_GAMESHADERS_HPP_
|
||||||
#define _GAMESHADERS_HPP_
|
|
||||||
|
|
||||||
#define SHADER_VF(Name) \
|
#define SHADER_VF(Name) \
|
||||||
struct Name { \
|
struct Name { \
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
#include <ai/PlayerController.hpp>
|
#include "render/MapRenderer.hpp"
|
||||||
#include <engine/GameData.hpp>
|
|
||||||
#include <engine/GameState.hpp>
|
#include <cstdint>
|
||||||
#include <engine/GameWorld.hpp>
|
#include <cmath>
|
||||||
#include <objects/CharacterObject.hpp>
|
#include <vector>
|
||||||
#include <render/GameShaders.hpp>
|
|
||||||
#include <render/MapRenderer.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
#include <glm/gtc/quaternion.hpp>
|
||||||
|
|
||||||
|
#include <gl/gl_core_3_3.h>
|
||||||
|
#include <gl/TextureData.hpp>
|
||||||
|
|
||||||
|
#include "engine/GameData.hpp"
|
||||||
|
#include "engine/GameState.hpp"
|
||||||
|
#include "engine/GameWorld.hpp"
|
||||||
|
#include "objects/GameObject.hpp"
|
||||||
|
|
||||||
const char* MapVertexShader = R"(
|
const char* MapVertexShader = R"(
|
||||||
#version 330
|
#version 330
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
#pragma once
|
#ifndef _RWENGINE_MAPRENDERER_HPP_
|
||||||
|
#define _RWENGINE_MAPRENDERER_HPP_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
|
#include <gl/DrawBuffer.hpp>
|
||||||
|
#include <gl/GeometryBuffer.hpp>
|
||||||
|
|
||||||
|
#include "render/OpenGLRenderer.hpp"
|
||||||
|
|
||||||
#include <render/OpenGLRenderer.hpp>
|
|
||||||
class GameData;
|
class GameData;
|
||||||
class GameWorld;
|
class GameWorld;
|
||||||
|
|
||||||
@ -51,3 +61,5 @@ private:
|
|||||||
void drawBlip(const glm::vec2& coord, const glm::mat4& view,
|
void drawBlip(const glm::vec2& coord, const glm::mat4& view,
|
||||||
const MapInfo& mi, glm::vec4 colour, float size);
|
const MapInfo& mi, glm::vec4 colour, float size);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,19 +1,27 @@
|
|||||||
|
#include "render/ObjectRenderer.hpp"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include <BulletDynamics/Vehicle/btRaycastVehicle.h>
|
#include <BulletDynamics/Vehicle/btRaycastVehicle.h>
|
||||||
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
|
|
||||||
#include <data/Clump.hpp>
|
#include <data/Clump.hpp>
|
||||||
#include <data/CutsceneData.hpp>
|
|
||||||
#include <engine/GameData.hpp>
|
#include "data/CutsceneData.hpp"
|
||||||
#include <engine/GameState.hpp>
|
|
||||||
#include <glm/gtc/type_ptr.hpp>
|
|
||||||
#include <render/ObjectRenderer.hpp>
|
|
||||||
#include "data/WeaponData.hpp"
|
#include "data/WeaponData.hpp"
|
||||||
|
#include "engine/GameData.hpp"
|
||||||
|
#include "engine/GameState.hpp"
|
||||||
|
#include "engine/GameWorld.hpp"
|
||||||
|
#include "render/ViewCamera.hpp"
|
||||||
|
|
||||||
// Objects that we know how to turn into renderlist entries
|
// Objects that we know how to turn into renderlist entries
|
||||||
#include <objects/CharacterObject.hpp>
|
#include "objects/CharacterObject.hpp"
|
||||||
#include <objects/CutsceneObject.hpp>
|
#include "objects/CutsceneObject.hpp"
|
||||||
#include <objects/InstanceObject.hpp>
|
#include "objects/InstanceObject.hpp"
|
||||||
#include <objects/PickupObject.hpp>
|
#include "objects/PickupObject.hpp"
|
||||||
#include <objects/ProjectileObject.hpp>
|
#include "objects/ProjectileObject.hpp"
|
||||||
#include <objects/VehicleObject.hpp>
|
#include "objects/VehicleObject.hpp"
|
||||||
|
|
||||||
#ifdef RW_WINDOWS
|
#ifdef RW_WINDOWS
|
||||||
#include <rw_mingw.hpp>
|
#include <rw_mingw.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,16 +1,30 @@
|
|||||||
#ifndef _RWENGINE_OBJECTRENDERER_HPP_
|
#ifndef _RWENGINE_OBJECTRENDERER_HPP_
|
||||||
#define _RWENGINE_OBJECTRENDERER_HPP_
|
#define _RWENGINE_OBJECTRENDERER_HPP_
|
||||||
|
|
||||||
#include <engine/GameWorld.hpp>
|
#include <cstddef>
|
||||||
#include <gl/DrawBuffer.hpp>
|
|
||||||
#include <glm/glm.hpp>
|
|
||||||
#include <objects/GameObject.hpp>
|
|
||||||
#include <render/OpenGLRenderer.hpp>
|
|
||||||
#include <render/ViewCamera.hpp>
|
|
||||||
#include <rw/types.hpp>
|
|
||||||
|
|
||||||
class ProjectileObject;
|
#include <gl/gl_core_3_3.h>
|
||||||
|
|
||||||
|
//#include <engine/GameWorld.hpp>
|
||||||
|
//#include <gl/DrawBuffer.hpp>
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
//#include <objects/GameObject.hpp>
|
||||||
|
#include <render/OpenGLRenderer.hpp>
|
||||||
|
//#include <render/ViewCamera.hpp>
|
||||||
|
//#include <rw/types.hpp>
|
||||||
|
|
||||||
|
class Atomic;
|
||||||
|
class CharacterObject;
|
||||||
|
class Clump;
|
||||||
|
class CutsceneObject;
|
||||||
|
class GameObject;
|
||||||
|
class GameWorld;
|
||||||
|
class InstanceObject;
|
||||||
class PickupObject;
|
class PickupObject;
|
||||||
|
class ProjectileObject;
|
||||||
|
class VehicleObject;
|
||||||
|
class ViewCamera;
|
||||||
|
struct Geometry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The ObjectRenderer class handles object -> renderer transformation
|
* @brief The ObjectRenderer class handles object -> renderer transformation
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
|
#include "render/OpenGLRenderer.hpp"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include <glm/gtc/matrix_transform.hpp>
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
#include <glm/gtc/type_ptr.hpp>
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
#include <render/OpenGLRenderer.hpp>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <gl/DrawBuffer.hpp>
|
||||||
#include <sstream>
|
#include <rw/defines.hpp>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
constexpr GLuint kUBOIndexScene = 1;
|
constexpr GLuint kUBOIndexScene = 1;
|
||||||
@ -19,7 +23,7 @@ GLuint compileShader(GLenum type, const char* source) {
|
|||||||
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
|
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
|
||||||
|
|
||||||
if (status != GL_TRUE) {
|
if (status != GL_TRUE) {
|
||||||
std::cerr << "[OGL] Shader Compilation Failed" << std::endl;
|
RW_ERROR("[OGL] Shader Compilation Failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
GLint len;
|
GLint len;
|
||||||
@ -33,9 +37,9 @@ GLuint compileShader(GLenum type, const char* source) {
|
|||||||
GLchar* sourceBuff = new GLchar[sourceLen];
|
GLchar* sourceBuff = new GLchar[sourceLen];
|
||||||
glGetShaderSource(shader, sourceLen, nullptr, sourceBuff);
|
glGetShaderSource(shader, sourceLen, nullptr, sourceBuff);
|
||||||
|
|
||||||
std::cerr << "[OGL] Shader InfoLog(" << shader << "):\n"
|
RW_ERROR("[OGL] Shader InfoLog(" << shader << "):\n"
|
||||||
<< buffer << "\nSource:\n"
|
<< buffer << "\nSource:\n"
|
||||||
<< sourceBuff << std::endl;
|
<< sourceBuff);
|
||||||
|
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
delete[] sourceBuff;
|
delete[] sourceBuff;
|
||||||
@ -68,7 +72,7 @@ GLuint compileProgram(const char* vertex, const char* fragment) {
|
|||||||
glGetProgramiv(prog, GL_LINK_STATUS, &status);
|
glGetProgramiv(prog, GL_LINK_STATUS, &status);
|
||||||
|
|
||||||
if (status != GL_TRUE) {
|
if (status != GL_TRUE) {
|
||||||
std::cerr << "[OGL] Program Link Failed" << std::endl;
|
RW_ERROR("[OGL] Program Link Failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
GLint len;
|
GLint len;
|
||||||
@ -77,8 +81,8 @@ GLuint compileProgram(const char* vertex, const char* fragment) {
|
|||||||
GLchar* buffer = new GLchar[len];
|
GLchar* buffer = new GLchar[len];
|
||||||
glGetProgramInfoLog(prog, len, NULL, buffer);
|
glGetProgramInfoLog(prog, len, NULL, buffer);
|
||||||
|
|
||||||
std::cerr << "[OGL] Program InfoLog(" << prog << "):\n"
|
RW_ERROR("[OGL] Program InfoLog(" << prog << "):\n"
|
||||||
<< buffer << std::endl;
|
<< buffer);
|
||||||
|
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,19 @@
|
|||||||
#pragma once
|
#ifndef _RWENGINE_OPENGLRENDERER_HPP_
|
||||||
#ifndef _OPENGLRENDERER_HPP_
|
#define _RWENGINE_OPENGLRENDERER_HPP_
|
||||||
#define _OPENGLRENDERER_HPP_
|
|
||||||
|
|
||||||
#include <gl/DrawBuffer.hpp>
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
|
#include <gl/gl_core_3_3.h>
|
||||||
#include <gl/GeometryBuffer.hpp>
|
#include <gl/GeometryBuffer.hpp>
|
||||||
#include <glm/vec2.hpp>
|
|
||||||
#include <rw/types.hpp>
|
class DrawBuffer;
|
||||||
|
|
||||||
typedef uint64_t RenderKey;
|
typedef uint64_t RenderKey;
|
||||||
|
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
#include "render/TextRenderer.hpp"
|
#include "render/TextRenderer.hpp"
|
||||||
#include <engine/GameWorld.hpp>
|
|
||||||
#include <render/GameRenderer.hpp>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <iterator>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <gl/gl_core_3_3.h>
|
||||||
|
|
||||||
|
#include "engine/GameData.hpp"
|
||||||
|
#include "render/GameRenderer.hpp"
|
||||||
|
|
||||||
int charToIndex(uint16_t g) {
|
int charToIndex(uint16_t g) {
|
||||||
// Correct for the default font maps
|
// Correct for the default font maps
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
#ifndef RWENGINE_TEXTRENDERER_HPP
|
#ifndef _RWENGINE_TEXTRENDERER_HPP_
|
||||||
#define RWENGINE_TEXTRENDERER_HPP
|
#define _RWENGINE_TEXTRENDERER_HPP_
|
||||||
#include <engine/GameData.hpp>
|
|
||||||
#include "OpenGLRenderer.hpp"
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
|
#include <gl/DrawBuffer.hpp>
|
||||||
|
#include <gl/GeometryBuffer.hpp>
|
||||||
|
|
||||||
|
#include <data/GameTexts.hpp>
|
||||||
|
#include <render/OpenGLRenderer.hpp>
|
||||||
|
|
||||||
#define GAME_FONTS 3
|
#define GAME_FONTS 3
|
||||||
#define GAME_GLYPHS 192
|
#define GAME_GLYPHS 192
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#ifndef _VIEWCAMERA_HPP_
|
#ifndef _RWENGINE_VIEWCAMERA_HPP_
|
||||||
#define _VIEWCAMERA_HPP_
|
#define _RWENGINE_VIEWCAMERA_HPP_
|
||||||
#include <glm/gtc/quaternion.hpp>
|
#include <glm/gtc/quaternion.hpp>
|
||||||
#include "ViewFrustum.hpp"
|
|
||||||
|
#include "render/ViewFrustum.hpp"
|
||||||
|
|
||||||
class ViewCamera {
|
class ViewCamera {
|
||||||
public:
|
public:
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#ifndef _VIEWFRUSTUM_HPP_
|
#ifndef _RWENGINE_VIEWFRUSTUM_HPP_
|
||||||
#define _VIEWFRUSTUM_HPP_
|
#define _RWENGINE_VIEWFRUSTUM_HPP_
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <glm/gtc/matrix_transform.hpp>
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
|
|
||||||
#ifdef RW_WINDOWS
|
#ifdef RW_WINDOWS
|
||||||
#include <rw_mingw.hpp>
|
#include <rw_mingw.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <render/VisualFX.hpp>
|
#include "render/VisualFX.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <new>
|
||||||
|
|
||||||
VisualFX::LightData::~LightData() {
|
VisualFX::LightData::~LightData() {
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#pragma once
|
#ifndef _RWENGINE_VISUALFX_HPP_
|
||||||
|
#define _RWENGINE_VISUALFX_HPP_
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
#include <gl/TextureData.hpp>
|
#include <gl/TextureData.hpp>
|
||||||
#include <glm/glm.hpp>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a scene effect: lighting, particles etc.
|
* Represents a scene effect: lighting, particles etc.
|
||||||
@ -80,3 +82,5 @@ public:
|
|||||||
private:
|
private:
|
||||||
EffectType type;
|
EffectType type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
#include <engine/GameWorld.hpp>
|
#include "render/WaterRenderer.hpp"
|
||||||
#include <render/GameRenderer.hpp>
|
|
||||||
#include <render/GameShaders.hpp>
|
#include <cmath>
|
||||||
#include <render/WaterRenderer.hpp>
|
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
|
#include <rw/defines.hpp>
|
||||||
|
#include <rw/types.hpp>
|
||||||
|
|
||||||
|
#include "engine/GameData.hpp"
|
||||||
|
#include "engine/GameWorld.hpp"
|
||||||
|
#include "render/GameRenderer.hpp"
|
||||||
|
#include "render/GameShaders.hpp"
|
||||||
|
#include "render/OpenGLRenderer.hpp"
|
||||||
|
|
||||||
WaterRenderer::WaterRenderer(GameRenderer* renderer) : waterProg(nullptr) {
|
WaterRenderer::WaterRenderer(GameRenderer* renderer) : waterProg(nullptr) {
|
||||||
maskDraw.setFaceType(GL_TRIANGLES);
|
maskDraw.setFaceType(GL_TRIANGLES);
|
||||||
gridDraw.setFaceType(GL_TRIANGLES);
|
gridDraw.setFaceType(GL_TRIANGLES);
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
#pragma once
|
#ifndef _RWENGINE_WATERRENDERER_HPP_
|
||||||
|
#define _RWENGINE_WATERRENDERER_HPP_
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <gl/DrawBuffer.hpp>
|
||||||
|
#include <gl/GeometryBuffer.hpp>
|
||||||
|
#include <gl/gl_core_3_3.h>
|
||||||
|
|
||||||
#include <render/OpenGLRenderer.hpp>
|
#include <render/OpenGLRenderer.hpp>
|
||||||
#include <rw/types.hpp>
|
|
||||||
|
|
||||||
class GameRenderer;
|
class GameRenderer;
|
||||||
class GameWorld;
|
class GameWorld;
|
||||||
@ -47,3 +55,5 @@ private:
|
|||||||
GLuint fbOutput;
|
GLuint fbOutput;
|
||||||
GLuint dataTexture;
|
GLuint dataTexture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <engine/GameState.hpp>
|
#include <engine/GameState.hpp>
|
||||||
#include <objects/CharacterObject.hpp>
|
#include <objects/CharacterObject.hpp>
|
||||||
#include <data/WeaponData.hpp>
|
#include <data/WeaponData.hpp>
|
||||||
|
#include <engine/GameData.hpp>
|
||||||
#include <render/GameRenderer.hpp>
|
#include <render/GameRenderer.hpp>
|
||||||
|
|
||||||
#include <glm/gtc/constants.hpp>
|
#include <glm/gtc/constants.hpp>
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
#include "GameBase.hpp"
|
#include "GameBase.hpp"
|
||||||
|
|
||||||
|
//#include <rw/filesystem.hpp>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
#include <rw/defines.hpp>
|
#include <rw/defines.hpp>
|
||||||
#include <rw/filesystem.hpp>
|
|
||||||
|
|
||||||
#include "GitSHA1.h"
|
#include "GitSHA1.h"
|
||||||
|
|
||||||
#include "SDL.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
// Use first 8 chars of git hash as the build string
|
// Use first 8 chars of git hash as the build string
|
||||||
|
@ -2,11 +2,14 @@
|
|||||||
#define _GAME_MENUSYSTEM_HPP_
|
#define _GAME_MENUSYSTEM_HPP_
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <glm/glm.hpp>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <render/GameRenderer.hpp>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
|
#include <render/GameRenderer.hpp>
|
||||||
|
#include <rw/defines.hpp>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default values for menus that should match the look and feel of the original
|
* Default values for menus that should match the look and feel of the original
|
||||||
*/
|
*/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
std::map<GameRenderer::SpecialModel, std::string> kSpecialModels = {
|
std::map<GameRenderer::SpecialModel, std::string> kSpecialModels = {
|
||||||
{GameRenderer::ZoneCylinderA, "zonecyla.dff"},
|
{GameRenderer::ZoneCylinderA, "zonecyla.dff"},
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#include "BenchmarkState.hpp"
|
#include "BenchmarkState.hpp"
|
||||||
#include <engine/GameState.hpp>
|
#include <engine/GameState.hpp>
|
||||||
#include <fstream>
|
|
||||||
#include "RWGame.hpp"
|
#include "RWGame.hpp"
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
BenchmarkState::BenchmarkState(RWGame* game, const std::string& benchfile)
|
BenchmarkState::BenchmarkState(RWGame* game, const std::string& benchfile)
|
||||||
: State(game), benchfile(benchfile), benchmarkTime(0.f), duration(0.f), frameCounter(0) {
|
: State(game), benchfile(benchfile), benchmarkTime(0.f), duration(0.f), frameCounter(0) {
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <objects/InstanceObject.hpp>
|
#include <objects/InstanceObject.hpp>
|
||||||
#include <objects/VehicleObject.hpp>
|
#include <objects/VehicleObject.hpp>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <iostream>
|
||||||
#include "RWGame.hpp"
|
#include "RWGame.hpp"
|
||||||
|
|
||||||
constexpr float kDebugEntryHeight = 14.f;
|
constexpr float kDebugEntryHeight = 14.f;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "StateManager.hpp"
|
#include "StateManager.hpp"
|
||||||
|
|
||||||
|
class GameObject;
|
||||||
class PlayerController;
|
class PlayerController;
|
||||||
|
|
||||||
class IngameState : public State {
|
class IngameState : public State {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "PauseState.hpp"
|
#include "PauseState.hpp"
|
||||||
#include "RWGame.hpp"
|
#include "RWGame.hpp"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
PauseState::PauseState(RWGame* game) : State(game) {
|
PauseState::PauseState(RWGame* game) : State(game) {
|
||||||
auto& t = game->getGameData().texts;
|
auto& t = game->getGameData().texts;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user