Merge branch 'master' into vegetation

Conflicts:
	src/definition/definition.pro
	src/render/software/software.pro
This commit is contained in:
Michaël Lemaire 2015-10-19 17:40:17 +02:00
commit 030be52f6f
14 changed files with 59 additions and 362 deletions

View file

@ -13,62 +13,8 @@ DEFINES += BASICS_LIBRARY
include(../common.pri) include(../common.pri)
SOURCES += \ SOURCES += $$files(*.cpp)
NoiseGenerator.cpp \ HEADERS += $$files(*.h)
NoiseFunctionPerlin.cpp \
NoiseFunctionSimplex.cpp \
Interpolation.cpp \
Vector3.cpp \
Vector3.inline.cpp \
SpaceSegment.cpp \
Color.cpp \
Color.inline.cpp \
ColorHSL.cpp \
BoundingBox.cpp \
Matrix4.cpp \
Curve.cpp \
ColorProfile.cpp \
Geometry.cpp \
Texture2D.cpp \
Texture3D.cpp \
Texture4D.cpp \
NoiseState.cpp \
FractalNoise.cpp \
CappedCylinder.cpp \
InfiniteCylinder.cpp \
InfiniteRay.cpp \
Sphere.cpp \
InfinitePlane.cpp \
Disk.cpp \
SpaceGridIterator.cpp
HEADERS +=\
basics_global.h \
NoiseGenerator.h \
NoiseFunctionPerlin.h \
NoiseFunctionSimplex.h \
Interpolation.h \
Vector3.h \
SpaceSegment.h \
Color.h \
ColorHSL.h \
BoundingBox.h \
Matrix4.h \
Curve.h \
ColorProfile.h \
Geometry.h \
Texture2D.h \
Texture3D.h \
Texture4D.h \
NoiseState.h \
FractalNoise.h \
CappedCylinder.h \
InfiniteCylinder.h \
InfiniteRay.h \
Sphere.h \
InfinitePlane.h \
Disk.h \
SpaceGridIterator.h
unix:!symbian { unix:!symbian {
maemo5 { maemo5 {

View file

@ -13,74 +13,8 @@ DEFINES += DEFINITION_LIBRARY
include(../common.pri) include(../common.pri)
SOURCES += \ SOURCES += $$files(*.cpp)
Layers.cpp \ HEADERS += $$files(*.h)
WaterDefinition.cpp \
SurfaceMaterial.cpp \
CameraDefinition.cpp \
CloudsDefinition.cpp \
CloudLayerDefinition.cpp \
AtmosphereDefinition.cpp \
TexturesDefinition.cpp \
TextureLayerDefinition.cpp \
Zone.cpp \
TerrainDefinition.cpp \
TerrainHeightMap.cpp \
Scenery.cpp \
VegetationLayerDefinition.cpp \
VegetationDefinition.cpp \
VegetationModelDefinition.cpp \
VegetationInstance.cpp \
PaintedGrid.cpp \
PaintedGridBrush.cpp \
PaintedGridData.cpp \
DefinitionNode.cpp \
FloatNode.cpp \
DefinitionDiff.cpp \
FloatDiff.cpp \
DiffManager.cpp \
DefinitionWatcher.cpp \
IntNode.cpp \
IntDiff.cpp \
NoiseNode.cpp \
GodRaysDefinition.cpp \
TimeManager.cpp \
VegetationPresenceDefinition.cpp
HEADERS +=\
definition_global.h \
Layers.h \
WaterDefinition.h \
SurfaceMaterial.h \
CameraDefinition.h \
CloudsDefinition.h \
CloudLayerDefinition.h \
AtmosphereDefinition.h \
TexturesDefinition.h \
TextureLayerDefinition.h \
Zone.h \
TerrainDefinition.h \
TerrainHeightMap.h \
Scenery.h \
VegetationLayerDefinition.h \
VegetationDefinition.h \
VegetationModelDefinition.h \
VegetationInstance.h \
PaintedGrid.h \
PaintedGridBrush.h \
PaintedGridData.h \
DefinitionNode.h \
FloatNode.h \
DefinitionDiff.h \
FloatDiff.h \
DiffManager.h \
DefinitionWatcher.h \
IntNode.h \
IntDiff.h \
NoiseNode.h \
GodRaysDefinition.h \
TimeManager.h \
VegetationPresenceDefinition.h
unix:!symbian { unix:!symbian {
maemo5 { maemo5 {

View file

@ -6,10 +6,8 @@ TARGET = paysages-cli
include(../../common.pri) include(../../common.pri)
SOURCES += \ SOURCES += $$files(*.cpp)
main.cpp \ #HEADERS += $$files(*.h)
tests.cpp \
render.cpp
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../system/release/ -lpaysages_system win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../system/release/ -lpaysages_system
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../system/debug/ -lpaysages_system else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../system/debug/ -lpaysages_system

View file

@ -6,14 +6,8 @@ CONFIG += qt plugin
TARGET = $$qtLibraryTarget($$TARGET) TARGET = $$qtLibraryTarget($$TARGET)
uri = Paysages uri = Paysages
# Input SOURCES += $$files(*.cpp)
SOURCES += \ HEADERS += $$files(*.h)
extension_plugin.cpp \
paysages.cpp
HEADERS += \
extension_plugin.h \
paysages.h
OTHER_FILES = qmldir OTHER_FILES = qmldir

View file

@ -4,16 +4,8 @@ QT += qml quick widgets
include(../../../common.pri) include(../../../common.pri)
SOURCES += main.cpp \ SOURCES += $$files(*.cpp)
OpenGLView.cpp \ HEADERS += $$files(*.h)
MainModelerWindow.cpp \
WaterModeler.cpp \
AtmosphereModeler.cpp \
RenderPreviewProvider.cpp \
RenderProcess.cpp \
ModelerCameras.cpp \
FloatPropertyBind.cpp \
IntPropertyBind.cpp
RESOURCES += \ RESOURCES += \
qml/app.qrc qml/app.qrc
@ -26,18 +18,6 @@ QML_IMPORT_PATH = ../extension
# Default rules for deployment. # Default rules for deployment.
include(deployment.pri) include(deployment.pri)
HEADERS += \
OpenGLView.h \
modeler_global.h \
MainModelerWindow.h \
WaterModeler.h \
AtmosphereModeler.h \
RenderPreviewProvider.h \
RenderProcess.h \
ModelerCameras.h \
FloatPropertyBind.h \
IntPropertyBind.h
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../../system/release/ -lpaysages_system win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../../system/release/ -lpaysages_system
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../../system/debug/ -lpaysages_system else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../../system/debug/ -lpaysages_system
else:unix: LIBS += -L$$OUT_PWD/../../../system/ -lpaysages_system else:unix: LIBS += -L$$OUT_PWD/../../../system/ -lpaysages_system

View file

@ -13,29 +13,8 @@ DEFINES += OPENGL_LIBRARY
include(../../common.pri) include(../../common.pri)
SOURCES += \ SOURCES += $$files(*.cpp)
OpenGLRenderer.cpp \ HEADERS += $$files(*.h)
ExplorerChunkTerrain.cpp \
OpenGLShaderProgram.cpp \
OpenGLPart.cpp \
OpenGLSkybox.cpp \
OpenGLWater.cpp \
OpenGLSharedState.cpp \
OpenGLVariable.cpp \
OpenGLTerrain.cpp
HEADERS +=\
opengl_global.h \
OpenGLRenderer.h \
ExplorerChunkTerrain.h \
OpenGLShaderProgram.h \
OpenGLPart.h \
OpenGLSkybox.h \
OpenGLWater.h \
OpenGLSharedState.h \
OpenGLVariable.h \
OpenGLTerrain.h \
VertexArray.h
unix:!symbian { unix:!symbian {
maemo5 { maemo5 {

View file

@ -1147,11 +1147,15 @@ int brunetonInit()
return 1; return 1;
} }
static const int _init = brunetonInit(); static int _inited;
AtmosphereModelBruneton::AtmosphereModelBruneton(SoftwareRenderer *parent): AtmosphereModelBruneton::AtmosphereModelBruneton(SoftwareRenderer *parent):
parent(parent) parent(parent)
{ {
if (not _inited)
{
_inited = brunetonInit();
}
} }
AtmosphereModelBruneton::~AtmosphereModelBruneton() AtmosphereModelBruneton::~AtmosphereModelBruneton()

View file

@ -13,102 +13,11 @@ DEFINES += SOFTWARE_LIBRARY
include(../../common.pri) include(../../common.pri)
SOURCES += SoftwareRenderer.cpp \ SOURCES += $$files(*.cpp)
FluidMediumInterface.cpp \ HEADERS += $$files(*.h)
FluidMediumManager.cpp \
AtmosphereRenderer.cpp \
CloudsRenderer.cpp \
BaseCloudLayerRenderer.cpp \
SkyRasterizer.cpp \
CloudBasicLayerRenderer.cpp \
clouds/BaseCloudsModel.cpp \
clouds/CloudModelStratoCumulus.cpp \
TerrainRasterizer.cpp \
WaterRasterizer.cpp \
LightingManager.cpp \
LightStatus.cpp \
LightFilter.cpp \
LightComponent.cpp \
AtmosphereResult.cpp \
AtmosphereModelBruneton.cpp \
TerrainRenderer.cpp \
TexturesRenderer.cpp \
WaterRenderer.cpp \
RayCastingManager.cpp \
NightSky.cpp \
TerrainRayWalker.cpp \
VegetationModelRenderer.cpp \
Canvas.cpp \
CanvasPortion.cpp \
CanvasPixel.cpp \
CanvasFragment.cpp \
SoftwareCanvasRenderer.cpp \
Rasterizer.cpp \
CanvasLiveClient.cpp \
CanvasPreview.cpp \
RenderConfig.cpp \
CanvasPixelShader.cpp \
CanvasPictureWriter.cpp \
clouds/CloudModelAltoCumulus.cpp \
clouds/CloudModelCirrus.cpp \
clouds/CloudModelCumuloNimbus.cpp \
RenderProgress.cpp \
LightSource.cpp \
RayCastingResult.cpp \
GodRaysSampler.cpp \
GodRaysResult.cpp \
VegetationRasterizer.cpp \
VegetationRenderer.cpp \
VegetationResult.cpp
HEADERS += SoftwareRenderer.h\ SOURCES += $$files(clouds/*.cpp)
software_global.h \ HEADERS += $$files(clouds/*.h)
FluidMediumInterface.h \
FluidMediumManager.h \
AtmosphereRenderer.h \
CloudsRenderer.h \
BaseCloudLayerRenderer.h \
SkyRasterizer.h \
CloudBasicLayerRenderer.h \
clouds/BaseCloudsModel.h \
clouds/CloudModelStratoCumulus.h \
TerrainRasterizer.h \
WaterRasterizer.h \
LightingManager.h \
LightStatus.h \
LightFilter.h \
LightComponent.h \
AtmosphereResult.h \
AtmosphereModelBruneton.h \
TerrainRenderer.h \
TexturesRenderer.h \
WaterRenderer.h \
RayCastingManager.h \
NightSky.h \
TerrainRayWalker.h \
VegetationModelRenderer.h \
Canvas.h \
CanvasPortion.h \
CanvasPixel.h \
CanvasFragment.h \
SoftwareCanvasRenderer.h \
Rasterizer.h \
CanvasLiveClient.h \
CanvasPreview.h \
RenderConfig.h \
CanvasPixelShader.h \
CanvasPictureWriter.h \
clouds/CloudModelAltoCumulus.h \
clouds/CloudModelCirrus.h \
clouds/CloudModelCumuloNimbus.h \
RenderProgress.h \
LightSource.h \
RayCastingResult.h \
GodRaysSampler.h \
GodRaysResult.h \
VegetationRasterizer.h \
VegetationRenderer.h \
VegetationResult.h
unix:!symbian { unix:!symbian {
maemo5 { maemo5 {

View file

@ -5,6 +5,11 @@
std::string DataFile::findFile(const std::string &relpath) std::string DataFile::findFile(const std::string &relpath)
{ {
if (dataDir.empty())
{
dataDir = initDataDir();
}
QDir dir(QString::fromStdString(dataDir)); QDir dir(QString::fromStdString(dataDir));
if (dir.exists(QString::fromStdString(relpath))) if (dir.exists(QString::fromStdString(relpath)))
{ {
@ -69,4 +74,4 @@ std::string DataFile::initDataDir()
} }
} }
std::string DataFile::dataDir = DataFile::initDataDir(); std::string DataFile::dataDir;

View file

@ -2,7 +2,33 @@
#include "Time.h" #include "Time.h"
static std::ostream NULL_STREAM(0); #include <streambuf>
#include <ostream>
template <class cT, class traits = std::char_traits<cT> >
class basic_nullbuf: public std::basic_streambuf<cT, traits> {
typename traits::int_type overflow(typename traits::int_type c)
{
return traits::not_eof(c); // indicate success
}
};
template <class cT, class traits = std::char_traits<cT> >
class basic_onullstream: public std::basic_ostream<cT, traits> {
public:
basic_onullstream():
std::basic_ios<cT, traits>(&m_sbuf),
std::basic_ostream<cT, traits>(&m_sbuf)
{
this->init(&m_sbuf);
}
private:
basic_nullbuf<cT, traits> m_sbuf;
};
typedef basic_onullstream<char> onullstream;
static onullstream NULL_STREAM;
static bool enabled = true; static bool enabled = true;
std::ostream &Logs::debug() std::ostream &Logs::debug()

View file

@ -13,42 +13,8 @@ DEFINES += SYSTEM_LIBRARY
include(../common.pri) include(../common.pri)
SOURCES += \ SOURCES += $$files(*.cpp)
Thread.cpp \ HEADERS += $$files(*.h)
Mutex.cpp \
System.cpp \
PackStream.cpp \
RandomGenerator.cpp \
Memory.cpp \
ParallelWork.cpp \
CacheFile.cpp \
PictureWriter.cpp \
Logs.cpp \
ParallelPool.cpp \
ParallelWorker.cpp \
Semaphore.cpp \
FileSystem.cpp \
DataFile.cpp \
Time.cpp
HEADERS += \
system_global.h \
Thread.h \
Mutex.h \
System.h \
PackStream.h \
RandomGenerator.h \
Memory.h \
ParallelWork.h \
CacheFile.h \
PictureWriter.h \
Logs.h \
ParallelPool.h \
ParallelWorker.h \
Semaphore.h \
FileSystem.h \
DataFile.h \
Time.h
unix:!symbian { unix:!symbian {
maemo5 { maemo5 {

View file

@ -1,5 +0,0 @@
#include "BaseTestCase.h"
BaseTestCase::BaseTestCase()
{
}

View file

@ -15,10 +15,7 @@ QMAKE_CXXFLAGS += -pthread -Wno-missing-field-initializers
INCLUDEPATH += ./sources ./sources/include INCLUDEPATH += ./sources ./sources/include
SOURCES += \ SOURCES += sources/src/gtest-all.cc
sources/src/gtest-all.cc
HEADERS +=
unix:!symbian { unix:!symbian {
maemo5 { maemo5 {

View file

@ -6,44 +6,8 @@ TARGET = paysages-tests
include(../common.pri) include(../common.pri)
SOURCES += main.cpp \ SOURCES += $$files(*.cpp)
Layers_Test.cpp \ HEADERS += $$files(*.h)
PackStream_Test.cpp \
NoiseGenerator_Test.cpp \
TerrainPainting_Test.cpp \
Zone_Test.cpp \
Euclid_Test.cpp \
Camera_Test.cpp \
Clouds_Test.cpp \
FluidMediumManager_Test.cpp \
VertexArray_Test.cpp \
FractalNoise_Test.cpp \
SpaceSegment_Test.cpp \
Canvas_Test.cpp \
CanvasPortion_Test.cpp \
CanvasPixel_Test.cpp \
CanvasPreview_Test.cpp \
AtmosphereDefinition_Test.cpp \
Scenery_Test.cpp \
DefinitionNode_Test.cpp \
FloatNode_Test.cpp \
DiffManager_Test.cpp \
ColorHSL_Test.cpp \
RenderProgress_Test.cpp \
IntNode_Test.cpp \
LightingManager_Test.cpp \
GodRaysSampler_Test.cpp \
Interpolation_Test.cpp \
Rasterizer_Test.cpp \
CappedCylinder_Test.cpp \
InfiniteCylinder_Test.cpp \
Sphere_Test.cpp \
InfinitePlane_Test.cpp \
Disk_Test.cpp \
Vector3_Test.cpp
HEADERS += \
BaseTestCase.h
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/googletest/release/ -lgoogletest win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/googletest/release/ -lgoogletest
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/googletest/debug/ -lgoogletest else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/googletest/debug/ -lgoogletest