Merge pull request #1 from AndrewMeadows/californium

compile on linux with GLEW
This commit is contained in:
samcake 2015-07-28 17:58:55 -07:00
commit 8e73df119b
25 changed files with 109 additions and 94 deletions

View file

@ -38,5 +38,19 @@ if (WIN32)
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_INCLUDE_DIRS GLEW_LIBRARIES GLEW_DLL_PATH) find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_INCLUDE_DIRS GLEW_LIBRARIES GLEW_DLL_PATH)
add_paths_to_fixup_libs(${GLEW_DLL_PATH}) add_paths_to_fixup_libs(${GLEW_DLL_PATH})
elseif (APPLE)
else ()
find_path(GLEW_INCLUDE_DIR GL/glew.h)
find_library(GLEW_LIBRARY NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64)
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
set(GLEW_LIBRARIES ${GLEW_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLEW
REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY)
mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY)
endif () endif ()

View file

@ -245,6 +245,12 @@ else (APPLE)
endif () endif ()
endif() endif()
else (WIN32)
find_package(GLEW REQUIRED)
target_include_directories(${TARGET_NAME} PRIVATE ${GLEW_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${GLEW_LIBRARIES})
message(STATUS ${GLEW_LIBRARY})
endif() endif()
endif (APPLE) endif (APPLE)

View file

@ -14,8 +14,6 @@
#include <mutex> #include <mutex>
#include <QElapsedTimer> #include <QElapsedTimer>
#include <gpu/GPUConfig.h>
#include <gpu/Batch.h>
#include <gpu/Context.h> #include <gpu/Context.h>
#include <NumericalConstants.h> #include <NumericalConstants.h>
#include <DependencyManager.h> #include <DependencyManager.h>
@ -207,7 +205,7 @@ void Stars::render(RenderArgs* renderArgs, float alpha) {
batch._glUniform1f(_timeSlot, secs); batch._glUniform1f(_timeSlot, secs);
geometryCache->renderUnitCube(batch); geometryCache->renderUnitCube(batch);
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); //glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
static const size_t VERTEX_STRIDE = sizeof(StarVertex); static const size_t VERTEX_STRIDE = sizeof(StarVertex);
size_t offset = offsetof(StarVertex, position); size_t offset = offsetof(StarVertex, position);
@ -217,9 +215,9 @@ void Stars::render(RenderArgs* renderArgs, float alpha) {
// Render the stars // Render the stars
batch.setPipeline(_starsPipeline); batch.setPipeline(_starsPipeline);
batch._glEnable(GL_PROGRAM_POINT_SIZE_EXT); //batch._glEnable(GL_PROGRAM_POINT_SIZE_EXT);
batch._glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); //batch._glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
batch._glEnable(GL_POINT_SMOOTH); //batch._glEnable(GL_POINT_SMOOTH);
batch.setInputFormat(streamFormat); batch.setInputFormat(streamFormat);
batch.setInputBuffer(VERTICES_SLOT, posView); batch.setInputBuffer(VERTICES_SLOT, posView);

View file

@ -11,16 +11,16 @@
// //
#include "OculusManager.h" #include "OculusManager.h"
#include <gpu/GPUConfig.h>
#include <glm/glm.hpp>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QGuiApplication> #include <QGuiApplication>
#include <gpu/GPUConfig.h>
#include <QScreen> #include <QScreen>
#include <CursorManager.h>
#include <QOpenGLTimerQuery> #include <QOpenGLTimerQuery>
#include <QGLWidget> #include <QGLWidget>
#include <CursorManager.h>
#include <glm/glm.hpp>
#include <avatar/AvatarManager.h> #include <avatar/AvatarManager.h>
#include <avatar/MyAvatar.h> #include <avatar/MyAvatar.h>

View file

@ -9,13 +9,14 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#include "TV3DManager.h"
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
#include "gpu/GLBackend.h" #include <RenderArgs.h>
#include "Application.h"
#include "TV3DManager.h" #include "Application.h"
#include "Menu.h" #include "Menu.h"
int TV3DManager::_screenWidth = 1; int TV3DManager::_screenWidth = 1;
@ -63,6 +64,7 @@ void TV3DManager::setFrustum(Camera& whichCamera) {
} }
void TV3DManager::configureCamera(Camera& whichCamera, int screenWidth, int screenHeight) { void TV3DManager::configureCamera(Camera& whichCamera, int screenWidth, int screenHeight) {
#ifdef THIS_CURRENTLY_BROKEN_WAITING_FOR_DISPLAY_PLUGINS
if (screenHeight == 0) { if (screenHeight == 0) {
screenHeight = 1; // prevent divide by 0 screenHeight = 1; // prevent divide by 0
} }
@ -72,6 +74,7 @@ void TV3DManager::configureCamera(Camera& whichCamera, int screenWidth, int scre
setFrustum(whichCamera); setFrustum(whichCamera);
glViewport (0, 0, _screenWidth, _screenHeight); // sets drawing viewport glViewport (0, 0, _screenWidth, _screenHeight); // sets drawing viewport
#endif
} }
void TV3DManager::display(RenderArgs* renderArgs, Camera& whichCamera) { void TV3DManager::display(RenderArgs* renderArgs, Camera& whichCamera) {

View file

@ -17,6 +17,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
class Camera; class Camera;
class RenderArgs;
struct eyeFrustum { struct eyeFrustum {
double left; double left;

View file

@ -35,7 +35,7 @@
#include <PolyVoxCore/Material.h> #include <PolyVoxCore/Material.h>
#include "model/Geometry.h" #include "model/Geometry.h"
#include "gpu/GLBackend.h" #include "gpu/Context.h"
#include "EntityTreeRenderer.h" #include "EntityTreeRenderer.h"
#include "RenderablePolyVoxEntityItem.h" #include "RenderablePolyVoxEntityItem.h"

View file

@ -8,7 +8,6 @@
#include "RenderableWebEntityItem.h" #include "RenderableWebEntityItem.h"
#include <gpu/GPUConfig.h>
#include <QMouseEvent> #include <QMouseEvent>
#include <QQuickItem> #include <QQuickItem>
#include <QQuickWindow> #include <QQuickWindow>
@ -24,7 +23,7 @@
#include <GLMHelpers.h> #include <GLMHelpers.h>
#include <PathUtils.h> #include <PathUtils.h>
#include <TextureCache.h> #include <TextureCache.h>
#include <gpu/GLBackend.h> #include <gpu/Context.h>
#include "EntityTreeRenderer.h" #include "EntityTreeRenderer.h"

View file

@ -31,13 +31,16 @@ elseif (WIN32)
elseif (ANDROID) elseif (ANDROID)
target_link_libraries(${TARGET_NAME} "-lGLESv3" "-lEGL") target_link_libraries(${TARGET_NAME} "-lGLESv3" "-lEGL")
else () else ()
find_package(GLEW REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLEW_INCLUDE_DIRS})
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
if (${OPENGL_INCLUDE_DIR}) if (${OPENGL_INCLUDE_DIR})
include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}") include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}")
endif () endif ()
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}") target_link_libraries(${TARGET_NAME} "${GLEW_LIBRARIES}" "${OPENGL_LIBRARY}")
target_include_directories(${TARGET_NAME} PUBLIC ${OPENGL_INCLUDE_DIR}) # target_include_directories(${TARGET_NAME} PUBLIC ${OPENGL_INCLUDE_DIR})
endif (APPLE) endif (APPLE)

View file

@ -9,11 +9,11 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#include "Batch.h" #include "Batch.h"
#include "GPUConfig.h"
#include <QDebug>
#include <GLMHelpers.h> #include <GLMHelpers.h>
#include <QDebug>
#include "GPUConfig.h"
#if defined(NSIGHT_FOUND) #if defined(NSIGHT_FOUND)

View file

@ -8,9 +8,10 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#include "GLBackendShared.h"
#include <mutex> #include <mutex>
#include "GPULogging.h" #include "GPULogging.h"
#include "GLBackendShared.h"
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
using namespace gpu; using namespace gpu;

View file

@ -8,7 +8,6 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#include "GPULogging.h"
#include "GLBackendShared.h" #include "GLBackendShared.h"

View file

@ -8,7 +8,6 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#include "GPULogging.h"
#include "GLBackendShared.h" #include "GLBackendShared.h"
#include "Format.h" #include "Format.h"

View file

@ -11,10 +11,11 @@
#ifndef hifi_gpu_GLBackend_Shared_h #ifndef hifi_gpu_GLBackend_Shared_h
#define hifi_gpu_GLBackend_Shared_h #define hifi_gpu_GLBackend_Shared_h
#include "GLBackend.h"
#include <QDebug> #include <QDebug>
#include "GPULogging.h"
#include "GLBackend.h"
#include "Batch.h" #include "Batch.h"
static const GLenum _primitiveToGLmode[gpu::NUM_PRIMITIVES] = { static const GLenum _primitiveToGLmode[gpu::NUM_PRIMITIVES] = {

View file

@ -36,7 +36,7 @@
#else #else
#include <GL/glew.h> #include <GL/glew.h>
#include <GL/xglew.h> //#include <GL/glxew.h>
//#include <GL/gl.h> //#include <GL/gl.h>
//#include <GL/glext.h> //#include <GL/glext.h>

View file

@ -13,13 +13,13 @@
#include <bitset> #include <bitset>
#include <map> #include <map>
#include <qurl.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "gpu/Resource.h" #include "gpu/Resource.h"
#include "gpu/Texture.h" #include "gpu/Texture.h"
#include <qurl.h>
namespace model { namespace model {

View file

@ -9,15 +9,12 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
// include this before QOpenGLFramebufferObject, which includes an earlier version of OpenGL
#include <gpu/GPUConfig.h>
#include <gpu/GLBackend.h>
#include <glm/gtc/random.hpp> #include <glm/gtc/random.hpp>
#include <PathUtils.h> #include <PathUtils.h>
#include <SharedUtil.h> #include <SharedUtil.h>
#include <gpu/Context.h>
#include "gpu/StandardShaderLib.h" #include "gpu/StandardShaderLib.h"
#include "AmbientOcclusionEffect.h" #include "AmbientOcclusionEffect.h"
@ -176,7 +173,6 @@ void AmbientOcclusion::run(const render::SceneContextPointer& sceneContext, cons
assert(renderContext->args); assert(renderContext->args);
assert(renderContext->args->_viewFrustum); assert(renderContext->args->_viewFrustum);
RenderArgs* args = renderContext->args; RenderArgs* args = renderContext->args;
auto& scene = sceneContext->_scene;
gpu::Batch batch; gpu::Batch batch;

View file

@ -12,12 +12,12 @@
#include "DeferredLightingEffect.h" #include "DeferredLightingEffect.h"
#include <GLMHelpers.h> #include <GLMHelpers.h>
#include <gpu/GPUConfig.h> #include <PathUtils.h>
#include <ViewFrustum.h>
#include <gpu/Batch.h> #include <gpu/Batch.h>
#include <gpu/Context.h> #include <gpu/Context.h>
#include <gpu/StandardShaderLib.h> #include <gpu/StandardShaderLib.h>
#include <PathUtils.h>
#include <ViewFrustum.h>
#include "AbstractViewStateInterface.h" #include "AbstractViewStateInterface.h"
#include "GeometryCache.h" #include "GeometryCache.h"
@ -291,7 +291,7 @@ void DeferredLightingEffect::render(RenderArgs* args) {
locations = &_directionalAmbientSphereLightCascadedShadowMapLocations; locations = &_directionalAmbientSphereLightCascadedShadowMapLocations;
} }
batch.setPipeline(program); batch.setPipeline(program);
batch._glUniform3fv(locations->shadowDistances, 1, (const GLfloat*) &_viewState->getShadowDistances()); batch._glUniform3fv(locations->shadowDistances, 1, (const float*) &_viewState->getShadowDistances());
} else { } else {
if (useSkyboxCubemap) { if (useSkyboxCubemap) {
@ -325,7 +325,7 @@ void DeferredLightingEffect::render(RenderArgs* args) {
sh = (*_skybox->getCubemap()->getIrradiance()); sh = (*_skybox->getCubemap()->getIrradiance());
} }
for (int i =0; i <gpu::SphericalHarmonics::NUM_COEFFICIENTS; i++) { for (int i =0; i <gpu::SphericalHarmonics::NUM_COEFFICIENTS; i++) {
batch._glUniform4fv(locations->ambientSphere + i, 1, (const GLfloat*) (&sh) + i * 4); batch._glUniform4fv(locations->ambientSphere + i, 1, (const float*) (&sh) + i * 4);
} }
} }
@ -340,7 +340,7 @@ void DeferredLightingEffect::render(RenderArgs* args) {
if (_atmosphere && (locations->atmosphereBufferUnit >= 0)) { if (_atmosphere && (locations->atmosphereBufferUnit >= 0)) {
batch.setUniformBuffer(locations->atmosphereBufferUnit, _atmosphere->getDataBuffer()); batch.setUniformBuffer(locations->atmosphereBufferUnit, _atmosphere->getDataBuffer());
} }
batch._glUniformMatrix4fv(locations->invViewMat, 1, false, reinterpret_cast< const GLfloat* >(&invViewMat)); batch._glUniformMatrix4fv(locations->invViewMat, 1, false, reinterpret_cast< const float* >(&invViewMat));
} }
float left, right, bottom, top, nearVal, farVal; float left, right, bottom, top, nearVal, farVal;
@ -419,9 +419,9 @@ void DeferredLightingEffect::render(RenderArgs* args) {
batch._glUniform2f(_pointLightLocations.depthTexCoordOffset, depthTexCoordOffsetS, depthTexCoordOffsetT); batch._glUniform2f(_pointLightLocations.depthTexCoordOffset, depthTexCoordOffsetS, depthTexCoordOffsetT);
batch._glUniform2f(_pointLightLocations.depthTexCoordScale, depthTexCoordScaleS, depthTexCoordScaleT); batch._glUniform2f(_pointLightLocations.depthTexCoordScale, depthTexCoordScaleS, depthTexCoordScaleT);
batch._glUniformMatrix4fv(_pointLightLocations.invViewMat, 1, false, reinterpret_cast< const GLfloat* >(&invViewMat)); batch._glUniformMatrix4fv(_pointLightLocations.invViewMat, 1, false, reinterpret_cast< const float* >(&invViewMat));
batch._glUniformMatrix4fv(_pointLightLocations.texcoordMat, 1, false, reinterpret_cast< const GLfloat* >(&texcoordMat)); batch._glUniformMatrix4fv(_pointLightLocations.texcoordMat, 1, false, reinterpret_cast< const float* >(&texcoordMat));
for (auto lightID : _pointLights) { for (auto lightID : _pointLights) {
auto& light = _allocatedLights[lightID]; auto& light = _allocatedLights[lightID];
@ -467,9 +467,9 @@ void DeferredLightingEffect::render(RenderArgs* args) {
batch._glUniform2f(_spotLightLocations.depthTexCoordOffset, depthTexCoordOffsetS, depthTexCoordOffsetT); batch._glUniform2f(_spotLightLocations.depthTexCoordOffset, depthTexCoordOffsetS, depthTexCoordOffsetT);
batch._glUniform2f(_spotLightLocations.depthTexCoordScale, depthTexCoordScaleS, depthTexCoordScaleT); batch._glUniform2f(_spotLightLocations.depthTexCoordScale, depthTexCoordScaleS, depthTexCoordScaleT);
batch._glUniformMatrix4fv(_spotLightLocations.invViewMat, 1, false, reinterpret_cast< const GLfloat* >(&invViewMat)); batch._glUniformMatrix4fv(_spotLightLocations.invViewMat, 1, false, reinterpret_cast< const float* >(&invViewMat));
batch._glUniformMatrix4fv(_spotLightLocations.texcoordMat, 1, false, reinterpret_cast< const GLfloat* >(&texcoordMat)); batch._glUniformMatrix4fv(_spotLightLocations.texcoordMat, 1, false, reinterpret_cast< const float* >(&texcoordMat));
for (auto lightID : _spotLights) { for (auto lightID : _spotLights) {
auto light = _allocatedLights[lightID]; auto light = _allocatedLights[lightID];
@ -489,7 +489,7 @@ void DeferredLightingEffect::render(RenderArgs* args) {
if ((eyeHalfPlaneDistance > -nearRadius) && if ((eyeHalfPlaneDistance > -nearRadius) &&
(glm::distance(eyePoint, glm::vec3(light->getPosition())) < expandedRadius + nearRadius)) { (glm::distance(eyePoint, glm::vec3(light->getPosition())) < expandedRadius + nearRadius)) {
coneParam.w = 0.0f; coneParam.w = 0.0f;
batch._glUniform4fv(_spotLightLocations.coneParam, 1, reinterpret_cast< const GLfloat* >(&coneParam)); batch._glUniform4fv(_spotLightLocations.coneParam, 1, reinterpret_cast< const float* >(&coneParam));
Transform model; Transform model;
model.setTranslation(glm::vec3(0.0f, 0.0f, -1.0f)); model.setTranslation(glm::vec3(0.0f, 0.0f, -1.0f));
@ -509,7 +509,7 @@ void DeferredLightingEffect::render(RenderArgs* args) {
batch.setViewTransform(viewMat); batch.setViewTransform(viewMat);
} else { } else {
coneParam.w = 1.0f; coneParam.w = 1.0f;
batch._glUniform4fv(_spotLightLocations.coneParam, 1, reinterpret_cast< const GLfloat* >(&coneParam)); batch._glUniform4fv(_spotLightLocations.coneParam, 1, reinterpret_cast< const float* >(&coneParam));
Transform model; Transform model;
model.setTranslation(light->getPosition()); model.setTranslation(light->getPosition());
@ -595,9 +595,9 @@ void DeferredLightingEffect::loadLightProgram(const char* vertSource, const char
slotBindings.insert(gpu::Shader::Binding(std::string("depthMap"), 3)); slotBindings.insert(gpu::Shader::Binding(std::string("depthMap"), 3));
slotBindings.insert(gpu::Shader::Binding(std::string("shadowMap"), 4)); slotBindings.insert(gpu::Shader::Binding(std::string("shadowMap"), 4));
slotBindings.insert(gpu::Shader::Binding(std::string("skyboxMap"), 5)); slotBindings.insert(gpu::Shader::Binding(std::string("skyboxMap"), 5));
const GLint LIGHT_GPU_SLOT = 3; const int LIGHT_GPU_SLOT = 3;
slotBindings.insert(gpu::Shader::Binding(std::string("lightBuffer"), LIGHT_GPU_SLOT)); slotBindings.insert(gpu::Shader::Binding(std::string("lightBuffer"), LIGHT_GPU_SLOT));
const GLint ATMOSPHERE_GPU_SLOT = 4; const int ATMOSPHERE_GPU_SLOT = 4;
slotBindings.insert(gpu::Shader::Binding(std::string("atmosphereBufferUnit"), ATMOSPHERE_GPU_SLOT)); slotBindings.insert(gpu::Shader::Binding(std::string("atmosphereBufferUnit"), ATMOSPHERE_GPU_SLOT));
gpu::Shader::makeProgram(*program, slotBindings); gpu::Shader::makeProgram(*program, slotBindings);
@ -677,10 +677,10 @@ model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
int ringFloatOffset = slices * 3; int ringFloatOffset = slices * 3;
GLfloat* vertexData = new GLfloat[verticesSize]; float* vertexData = new float[verticesSize];
GLfloat* vertexRing0 = vertexData; float* vertexRing0 = vertexData;
GLfloat* vertexRing1 = vertexRing0 + ringFloatOffset; float* vertexRing1 = vertexRing0 + ringFloatOffset;
GLfloat* vertexRing2 = vertexRing1 + ringFloatOffset; float* vertexRing2 = vertexRing1 + ringFloatOffset;
for (int i = 0; i < slices; i++) { for (int i = 0; i < slices; i++) {
float theta = TWO_PI * i / slices; float theta = TWO_PI * i / slices;
@ -746,7 +746,7 @@ model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
*(index++) = capVertex; *(index++) = capVertex;
} }
_spotLightMesh->setIndexBuffer(gpu::BufferView(new gpu::Buffer(sizeof(GLushort) * indices, (gpu::Byte*) indexData), gpu::Element::INDEX_UINT16)); _spotLightMesh->setIndexBuffer(gpu::BufferView(new gpu::Buffer(sizeof(unsigned short) * indices, (gpu::Byte*) indexData), gpu::Element::INDEX_UINT16));
delete[] indexData; delete[] indexData;
model::Mesh::Part part(0, indices, 0, model::Mesh::TRIANGLES); model::Mesh::Part part(0, indices, 0, model::Mesh::TRIANGLES);

View file

@ -9,22 +9,22 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
// include this before QOpenGLBuffer, which includes an earlier version of OpenGL #include "GeometryCache.h"
#include <cmath> #include <cmath>
#include <QNetworkReply> #include <QNetworkReply>
#include <QRunnable> #include <QRunnable>
#include <QThreadPool> #include <QThreadPool>
#include <gpu/Batch.h>
#include <gpu/GLBackend.h>
#include <FSTReader.h> #include <FSTReader.h>
#include <NumericalConstants.h> #include <NumericalConstants.h>
#include <gpu/Batch.h>
#include <gpu/GLBackend.h>
#include "TextureCache.h" #include "TextureCache.h"
#include "RenderUtilsLogging.h" #include "RenderUtilsLogging.h"
#include "GeometryCache.h"
#include "standardTransformPNTC_vert.h" #include "standardTransformPNTC_vert.h"
#include "standardDrawTexture_frag.h" #include "standardDrawTexture_frag.h"

View file

@ -18,20 +18,18 @@
#include <CapsuleShape.h> #include <CapsuleShape.h>
#include <GeometryUtil.h> #include <GeometryUtil.h>
#include <gpu/Batch.h>
#include <gpu/GLBackend.h>
#include <PathUtils.h> #include <PathUtils.h>
#include <PerfStat.h> #include <PerfStat.h>
#include "PhysicsEntity.h"
#include <ShapeCollider.h> #include <ShapeCollider.h>
#include <SphereShape.h> #include <SphereShape.h>
#include <ViewFrustum.h> #include <ViewFrustum.h>
#include <render/Scene.h>
#include <gpu/Batch.h>
#include "AbstractViewStateInterface.h" #include "AbstractViewStateInterface.h"
#include "AnimationHandle.h" #include "AnimationHandle.h"
#include "DeferredLightingEffect.h" #include "DeferredLightingEffect.h"
#include "Model.h" #include "Model.h"
#include "RenderUtilsLogging.h"
#include "model_vert.h" #include "model_vert.h"
#include "model_shadow_vert.h" #include "model_shadow_vert.h"
@ -96,7 +94,7 @@ Model::~Model() {
} }
Model::RenderPipelineLib Model::_renderPipelineLib; Model::RenderPipelineLib Model::_renderPipelineLib;
const GLint MATERIAL_GPU_SLOT = 3; const int MATERIAL_GPU_SLOT = 3;
void Model::RenderPipelineLib::addRenderPipeline(Model::RenderKey key, void Model::RenderPipelineLib::addRenderPipeline(Model::RenderKey key,
gpu::ShaderPointer& vertexShader, gpu::ShaderPointer& vertexShader,

View file

@ -10,12 +10,10 @@
// //
#include "RenderDeferredTask.h" #include "RenderDeferredTask.h"
#include <gpu/GPUConfig.h>
#include <gpu/Batch.h>
#include <gpu/Context.h>
#include <PerfStat.h> #include <PerfStat.h>
#include <RenderArgs.h> #include <RenderArgs.h>
#include <ViewFrustum.h> #include <ViewFrustum.h>
#include <gpu/Context.h>
#include "FramebufferCache.h" #include "FramebufferCache.h"
#include "DeferredLightingEffect.h" #include "DeferredLightingEffect.h"

View file

@ -16,16 +16,15 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/random.hpp> #include <glm/gtc/random.hpp>
#include <gpu/Batch.h>
#include <gpu/GLBackend.h>
#include <gpu/GPUConfig.h>
#include <QNetworkReply> #include <QNetworkReply>
#include <QPainter> #include <QPainter>
#include <QRunnable> #include <QRunnable>
#include <QThreadPool> #include <QThreadPool>
#include <qimagereader.h> #include <qimagereader.h>
#include <gpu/Batch.h>
#include "RenderUtilsLogging.h" #include "RenderUtilsLogging.h"

View file

@ -15,15 +15,14 @@
#include <assert.h> #include <assert.h>
#include <PerfStat.h> #include <PerfStat.h>
#include <ViewFrustum.h>
#include <RenderArgs.h>
#include <gpu/Batch.h> #include <gpu/Batch.h>
#include <gpu/Context.h> #include <gpu/Context.h>
#include <gpu/GPUConfig.h> #include <gpu/GPUConfig.h>
#include <gpu/GPULogging.h> #include <gpu/GPULogging.h>
#include <ViewFrustum.h>
#include <RenderArgs.h>
#include "drawItemBounds_vert.h" #include "drawItemBounds_vert.h"
#include "drawItemBounds_frag.h" #include "drawItemBounds_frag.h"
#include "drawItemStatus_vert.h" #include "drawItemStatus_vert.h"

View file

@ -14,12 +14,12 @@
#include <algorithm> #include <algorithm>
#include <assert.h> #include <assert.h>
#include <gpu/Batch.h>
#include <gpu/Context.h>
#include <gpu/GPUConfig.h>
#include <PerfStat.h> #include <PerfStat.h>
#include <RenderArgs.h> #include <RenderArgs.h>
#include <ViewFrustum.h> #include <ViewFrustum.h>
#include <gpu/Batch.h>
#include <gpu/Context.h>
#include <gpu/GPUConfig.h>
using namespace render; using namespace render;

View file

@ -8,30 +8,31 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
#include <gpu/GPUConfig.h>
#include <QWindow>
#include <QFile>
#include <QTime>
#include <QImage>
#include <QTimer>
#include <QElapsedTimer>
#include <QOpenGLContext>
#include <QOpenGLBuffer>
#include <QOpenGLShaderProgram>
#include <QResizeEvent>
#include <QLoggingCategory>
#include <QOpenGLTexture>
#include <QOpenGLVertexArrayObject>
#include <QApplication>
#include <QOpenGLDebugLogger>
#include <unordered_map> #include <unordered_map>
#include <memory> #include <memory>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <PathUtils.h> #include <QApplication>
#include <QDir> #include <QDir>
#include <QElapsedTimer>
#include <QFile>
#include <QImage>
#include <QLoggingCategory>
#include <QOpenGLBuffer>
#include <QOpenGLContext>
#include <QOpenGLDebugLogger>
#include <QOpenGLShaderProgram>
#include <QOpenGLTexture>
#include <QOpenGLVertexArrayObject>
#include <QResizeEvent>
#include <QTime>
#include <QTimer>
#include <QWindow>
#include <gpu/Context.h>
#include <PathUtils.h>
class RateCounter { class RateCounter {
std::vector<float> times; std::vector<float> times;