Massive changes to the organisation of PolyVoxCore and PolyVoxYtil.
Also added start of logging capability.
This commit is contained in:
@ -33,7 +33,7 @@ SET(CMAKE_DEBUG_POSTFIX "_d")
|
||||
#"Sources" and "Headers" are the group names in Visual Studio.
|
||||
#They may have other uses too...
|
||||
SOURCE_GROUP("Sources" FILES ${SRC_FILES})
|
||||
#SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
||||
SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
||||
|
||||
FIND_PACKAGE(Qt4)
|
||||
SET(QT_USE_QTGUI 1)
|
||||
@ -48,8 +48,9 @@ FIND_PACKAGE(OpenGL REQUIRED)
|
||||
#Also, glut32.dll goes in C:\Windows\System. Using C:\Windows\System32 doesn't seem to work
|
||||
|
||||
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
|
||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} "../../library/include")
|
||||
LINK_DIRECTORIES("../../library")
|
||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} "../../library/PolyVoxCore/include")
|
||||
#There has to be a better way!
|
||||
LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../library/PolyVoxCore/debug ${CMAKE_CURRENT_BINARY_DIR}/../../library/PolyVoxCore/release)
|
||||
|
||||
#Build
|
||||
ADD_EXECUTABLE(OpenGLExample ${SRC_FILES})
|
||||
@ -57,8 +58,8 @@ TARGET_LINK_LIBRARIES(OpenGLExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} debug P
|
||||
|
||||
#Install
|
||||
INSTALL(TARGETS OpenGLExample
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION Examples/OpenGL/bin
|
||||
LIBRARY DESTINATION Examples/OpenGL/lib
|
||||
ARCHIVE DESTINATION Examples/OpenGL/lib
|
||||
COMPONENT example
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "OpenGLImmediateModeSupport.h"
|
||||
#include "OpenGLSupport.h"
|
||||
|
||||
#include "PolyVoxCore/IndexedSurfacePatch.h"
|
||||
#include "IndexedSurfacePatch.h"
|
||||
|
||||
using namespace PolyVox;
|
||||
using namespace std;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __OpenGLExample_OpenGLImmediateModeSupport_H__
|
||||
#define __OpenGLExample_OpenGLImmediateModeSupport_H__
|
||||
|
||||
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
|
||||
#include "PolyVoxForwardDeclarations.h"
|
||||
|
||||
#include "glew/glew.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __OpenGLExample_OpenGLSupport_H__
|
||||
#define __OpenGLExample_OpenGLSupport_H__
|
||||
|
||||
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
|
||||
#include "PolyVoxForwardDeclarations.h"
|
||||
|
||||
#include "glew/glew.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "OpenGLSupport.h"
|
||||
#include "OpenGLVertexBufferObjectSupport.h"
|
||||
|
||||
#include "PolyVoxCore/IndexedSurfacePatch.h"
|
||||
#include "IndexedSurfacePatch.h"
|
||||
|
||||
using namespace PolyVox;
|
||||
using namespace std;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __OpenGLExample_OpenGLVertexBufferObjectSupport_H__
|
||||
#define __OpenGLExample_OpenGLVertexBufferObjectSupport_H__
|
||||
|
||||
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
|
||||
#include "PolyVoxForwardDeclarations.h"
|
||||
|
||||
#include "glew/glew.h"
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
#include <QGLWidget>
|
||||
|
||||
#include "PolyVoxCore/Volume.h"
|
||||
#include "PolyVoxCore/IndexedSurfacePatch.h"
|
||||
#include "PolyVoxCore/SurfaceExtractors.h"
|
||||
#include "PolyVoxCore/PolyVoxImpl/Utility.h"
|
||||
#include "Volume.h"
|
||||
#include "IndexedSurfacePatch.h"
|
||||
#include "SurfaceExtractors.h"
|
||||
#include "PolyVoxImpl/Utility.h"
|
||||
|
||||
#include "OpenGLImmediateModeSupport.h"
|
||||
#include "OpenGLVertexBufferObjectSupport.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __OpenGLExample_Shapes_H__
|
||||
#define __OpenGLExample_Shapes_H__
|
||||
|
||||
#include "PolyVoxCore/Volume.h"
|
||||
#include "Volume.h"
|
||||
|
||||
void createSphereInVolume(PolyVox::Volume<PolyVox::uint8_t>& volData, float fRadius, PolyVox::uint8_t uValue);
|
||||
void createCubeInVolume(PolyVox::Volume<PolyVox::uint8_t>& volData, PolyVox::Vector3DUint16 lowerCorner, PolyVox::Vector3DUint16 upperCorner, PolyVox::uint8_t uValue);
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "PolyVoxCore/Volume.h"
|
||||
#include "PolyVoxCore/IndexedSurfacePatch.h"
|
||||
#include "PolyVoxCore/SurfaceExtractors.h"
|
||||
#include "PolyVoxCore/PolyVoxImpl/Utility.h"
|
||||
#include "Log.h"
|
||||
#include "Volume.h"
|
||||
#include "IndexedSurfacePatch.h"
|
||||
#include "SurfaceExtractors.h"
|
||||
#include "PolyVoxImpl/Utility.h"
|
||||
|
||||
#include "OpenGLImmediateModeSupport.h"
|
||||
#include "OpenGLVertexBufferObjectSupport.h"
|
||||
@ -20,8 +21,14 @@ using namespace std;
|
||||
using namespace PolyVox;
|
||||
using namespace std;
|
||||
|
||||
void exampleLog(string message)
|
||||
{
|
||||
cout << message << endl;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
logImpl = &exampleLog;
|
||||
Volume<PolyVox::uint8_t> volData(g_uVolumeSideLength);
|
||||
|
||||
//Make our volume contain a sphere in the center.
|
||||
|
Reference in New Issue
Block a user