mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
Update Ghoul
Change TriangleSoup and StatsCollector to use new Boolean class
This commit is contained in:
@@ -36,9 +36,9 @@ TriangleSoup::TriangleSoup(std::vector<unsigned int> elements,
|
||||
: _vaoID(0)
|
||||
,_vertexBufferID(0)
|
||||
,_elementBufferID(0)
|
||||
,_useVertexPositions(usePositions == Positions::Yes)
|
||||
,_useTextureCoordinates(useTextures == TextureCoordinates::Yes)
|
||||
,_useVertexNormals(useNormals == Normals::Yes)
|
||||
,_useVertexPositions(usePositions)
|
||||
,_useTextureCoordinates(useTextures)
|
||||
,_useVertexNormals(useNormals)
|
||||
{
|
||||
setElements(elements);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef __TRIANGLESOUP_H__
|
||||
#define __TRIANGLESOUP_H__
|
||||
|
||||
#include <ghoul/misc/boolean.h>
|
||||
#include <ghoul/opengl/ghoul_gl.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
|
||||
@@ -44,12 +45,11 @@ namespace openspace {
|
||||
// TODO : Possibly render triangle strips in this class instead of triangles since
|
||||
// that is faster
|
||||
|
||||
class TriangleSoup
|
||||
{
|
||||
class TriangleSoup {
|
||||
public:
|
||||
enum class Positions { Yes, No };
|
||||
enum class TextureCoordinates { Yes, No };
|
||||
enum class Normals { Yes, No };
|
||||
using Positions = ghoul::Boolean;
|
||||
using TextureCoordinates = ghoul::Boolean;
|
||||
using Normals = ghoul::Boolean;
|
||||
|
||||
TriangleSoup(
|
||||
std::vector<unsigned int> elements, // At least elements are required
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#ifndef __STATS_TRACKER_H__
|
||||
#define __STATS_TRACKER_H__
|
||||
|
||||
#include <ghoul/misc/boolean.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <ghoul/filesystem/filesystem>
|
||||
|
||||
@@ -143,13 +144,13 @@ namespace openspace {
|
||||
|
||||
StatsCollector() = delete;
|
||||
|
||||
enum class Enabled { Yes, No };
|
||||
using Enabled = ghoul::Boolean;
|
||||
|
||||
StatsCollector(const std::string& filename, int dumpEveryXRecord, Enabled enabled = Enabled::Yes, const std::string& delimiter = ",")
|
||||
: _filename(filename)
|
||||
, _dumpEveryXRecord(dumpEveryXRecord)
|
||||
, _recordsSinceLastDump(0)
|
||||
, _enabled(enabled == Enabled::Yes)
|
||||
, _enabled(enabled)
|
||||
, _delimiter(delimiter)
|
||||
, _hasWrittenHeader(false)
|
||||
, i(TemplatedStatsCollector<long long>(_enabled, delimiter))
|
||||
|
||||
Reference in New Issue
Block a user