123 Commits

Author SHA1 Message Date
David Williams
db2e62d2a8 Replaced LargeVolume and SimpleVolume with PagedVolume in tests and examples. 2014-09-21 17:57:42 +02:00
David Williams
2b7ef5b966 Reverted some changes which were just for testing the new normal encoding. 2014-07-24 22:21:53 +02:00
David Williams
bfa14a32df Split 'decode()' function into several variants so it's not so heavily overloaded. 2014-07-24 16:55:11 +02:00
David Williams
4a42535f13 Added functions to perform 'octahedral' encoding and decoding of normals.
See http://jcgt.org/published/0003/02/01/paper-lowres.pdf
2014-07-23 23:35:46 +02:00
David Williams
e9ba998f2f Changes to the folder organization of some files in Visual Studio (via CMake's source_group). 2014-05-28 14:03:26 +02:00
Matt Williams
c26686476d Use Qt's resource system to store the shader source
The shader source is included inside each comipled binary file. The
OpenGL example also provides its own shader files which overrides
the default. Common shader code is in the 'common' directory and
each example's custom shader is alongside the example's C++ code.
2014-05-28 10:29:05 +01:00
David Williams
37ba9ab338 CubicVertex now uses a more memory efficient representation which can be decoded on the CPU or GPU. 2014-05-27 23:01:38 +02:00
Matt Williams
140cbc0fc7 Move shader code to external files rather than embedded
A bit of CMake code in each example copies the files to the
correct location and Qt loads them from the application's binary
directory.
2014-05-27 15:08:20 +01:00
David Williams
d34fd6b3c8 Moved OpenGLWidget into common folder so it can be used by other examples. 2014-05-23 22:11:47 +02:00
David Williams
4f7e1e6846 Each mesh now has it's own transform matrix applied, so that our example framework can support breaking a volume into regions. 2014-05-23 22:03:57 +02:00
David Williams
9f5b2e1659 Better templatization of addMesh. 2014-05-23 17:02:46 +02:00
David Williams
37bdf8e3ac Templatised code for example mesh conversion. 2014-05-23 16:26:56 +02:00
David Williams
79acf814db Revert "Compile fixes for VS2012"
This reverts commit e8313a683bd748ab36b2aff42ebdd16d28bd5320.
2014-05-23 16:11:53 +02:00
David Williams
e8313a683b Compile fixes for VS2012 2014-05-23 15:32:28 +02:00
David Williams
4aae00e4a8 Renamed SurfaceMesh to just Mesh 2014-05-23 15:17:07 +02:00
David Williams
da8f294847 Comments 2014-05-23 14:37:35 +02:00
David Williams
4cec89de38 Added ability to specify the visible region so that the example framework can support different volume sizes. 2014-05-23 14:32:46 +02:00
David Williams
ab741583e4 Renamed extractXxxSurface() to extractXxxMesh() 2014-05-22 23:26:40 +02:00
David Williams
f8ce3a5f3d Tidying camera code. 2014-05-22 17:03:06 +02:00
David Williams
16cbb94d90 Rotation is now applied by moving the camera rather than the meshes. 2014-05-22 16:51:41 +02:00
David Williams
7d55e00f76 More work adding support for multiple meshes. 2014-05-22 16:38:02 +02:00
David Williams
51e93fdabc Modifying the OpenGLWidget so that it can render multiple meshes. 2014-05-22 16:25:36 +02:00
David Williams
f2ba500c4c Merge branch 'develop' into feature/vertex-refactor
Conflicts:
	examples/Basic/main.cpp
	examples/Paging/main.cpp
	examples/SmoothLOD/main.cpp
	library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.h
	tests/TestCubicSurfaceExtractor.cpp
	tests/TestSurfaceExtractor.cpp
	tests/TestVolumeSubclass.cpp
2014-05-12 23:04:19 +02:00
David Williams
a51eaa4a02 Merge branch 'develop' of https://bitbucket.org/volumesoffun/polyvox into feature/extractor-refactor
Conflicts:
	examples/Basic/main.cpp
2014-05-11 16:21:37 +02:00
David Williams
573c36db87 Renamed vertex classes to the far more meaningful 'CubicVertex' and 'MarchingCubesVertex'. The old names didn't make much sense, even less so now they are templatized. 2014-05-11 15:17:59 +02:00
David Williams
b0a8ca8a64 This commit templatizes the vertex classes on voxel types. This was the main change which was made for Cubiquity and it's very messy at the moment. However, this will improve when we make more use of 'auto' to hide the template madness. 2014-05-07 23:47:18 +02:00
David Williams
5dfa7e2562 The CubicSurfaceExtractor now generates vertices of type PositionMaterialNormal rather than PositionMaterial. The normal property is just a dummy and is not filled in, though conceptually we could put something in there in the future (average normal of surrounding faces?)
The point of this change is to move towards having a single vertex class with known properties (including normal). This makes it simpler to write code which uses the vertices because we always know which properties are present. This will probably be useful when working with vertex buffer objects.
2014-05-05 20:53:47 +02:00
David Williams
2da902d5f9 This change reverts PolyVox back to using Qt 4.8. This is expected to be a temporary change, required because moving to Qt 5 caused various complications on Windows which we are not yet ready to address.
For more details see here: https://bitbucket.org/volumesoffun/polyvox/issue/41/upgrade-to-qt-5
2014-05-05 20:29:52 +02:00
Matt Williams
464d713c2a Remove usage of QOpenGLFunctions and use GLEW instead.
Qt's OpenGL interface was causing problems on Windows since it doesn't mix
well with ANGLE.

Relates to issue #50.
2014-03-23 12:16:02 +00:00
Matt Williams
ac16dfd325 Update the BasicExample to use OpenGL 3
The example now uses OpenGL 3 features like Vertex Array Objects and uses
no immediate mode stuff. Qt5 is used for some features like matrices and
shaders.

There is now no dependency on GLEW either.
2014-03-19 21:26:04 +00:00
Matt Williams
868fbb84a0 Update to use Qt5
The examples and tests now use Qt5. This allows some nice tidying of the
CMake files, some of which will come in future.

Closes issue #41
2014-03-09 18:02:24 +00:00
David Williams
acbfb184b8 Wrapped MarchingCubesSurfaceExtractor with functions (part of unclassing). 2014-03-05 16:30:54 +01:00
David Williams
529e97f71e Added use of auto for determining mesh type. 2014-03-05 15:58:33 +01:00
David Williams
0755961750 Added support for default parameters. 2014-03-05 15:50:17 +01:00
David Williams
67ec0d2db8 Initial function wrapper around CubicSurfaceExtractorWithNormals. 2014-03-05 15:41:16 +01:00
David Williams
248a5c3e29 Removed old logging system. 2014-01-30 22:10:52 +01:00
David Williams
9ad4c3fcf7 Initial checkin of Timer class. 2013-08-07 23:07:26 +02:00
Daviw Williams
f3ec94dd75 Reverted changes made for testing. 2013-06-27 16:43:49 +02:00
David Williams
938eea7c8e Work on tidying LargeVolume... 2013-06-26 22:01:44 +02:00
Daviw Williams
44d525f591 Tidying up and refactoring LargeVolume. 2013-06-26 17:02:06 +02:00
David Williams
8ab6d73f0a Work on LargeVolume refactoring - getting FilePager working. 2013-06-25 23:34:58 +02:00
David Williams
59505d47e9 Tidying up Block and FilePager. 2013-06-23 23:17:40 +02:00
Matt Williams
f5ea8878c2 Add a default CompilerCapabilities.h
This file assumes that the compiler doesn't support anything. If building
without CMake, it will be used and if you want to enable things, the file
can be edited.

When using CMake, a proper CompilerCapabilites.h will be generated and
CMake will set the include path order correctly in order to source the
correct file.
2012-12-26 12:54:52 +00:00
David Williams
74f25eac23 Merge branch 'develop' into feature/cmake-cxx11-detect
Conflicts:
	examples/Basic/CMakeLists.txt
	examples/OpenGL/CMakeLists.txt
	examples/Paging/CMakeLists.txt
	examples/SmoothLOD/CMakeLists.txt
	library/PolyVoxCore/include/PolyVoxCore/Impl/TypeDef.h
2012-12-24 20:08:31 +00:00
Matt Williams
312a3def68 Fix GLEW compile error on Windows. 2012-11-26 23:15:19 +00:00
Matt Williams
989cd453fe Consolidate glew into one location to speed up build. 2012-11-23 23:01:50 +00:00
Matt Williams
3902e00a0f Add a CompilerCapabilities.h.in file which is filled in by CMake
It will #define a each of the basic features detected by CMake which can
then be used by other headers (like TypeDef.h) to set things up for
PolyVox.

It is this file which you will have to manually edit and rename if you want
to skip using CMake.
2012-11-23 15:41:26 +00:00
Matt Williams
7f6d952dbe A better fix than 17a2a8e3d1f8bd8e841443ec5157ee71010ba965 for GLEW 2012-11-19 12:05:29 +00:00
Matt Williams
17a2a8e3d1 Fix include path for glew headers. 2012-11-19 10:44:10 +00:00
David Williams
03cd1ada6d Small changes to basic example, mostly for clarity. 2012-11-17 16:38:46 +01:00