2
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
3
* Copyright 2008-2010 Pelican Mapping
6
* osgEarth is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>
19
#ifndef OSGEARTH_DROAM_ENGINE_COMMON_H
20
#define OSGEARTH_DROAM_ENGINE_COMMON_H 1
22
#include <osgEarth/Common>
24
//typedef unsigned int VertexIndex; // index into the VBO
25
typedef unsigned int NodeIndex; // index of a node in the mesh node container
26
typedef unsigned short Level; // LOD level number
27
typedef short ChildIndex; // -1 = invalid
28
typedef short AncestorIndex; // -1 = invalid
29
typedef int TravNumber; // mesh traversal number
32
#define WHITE osg::Vec4f(1,1,1,1)
33
#define RED osg::Vec4f(1,0,0,1)
34
#define BLUE osg::Vec4f(0,0,1,1)
35
#define GREEN osg::Vec4f(0,1,0,1)
36
#define YELLOW osg::Vec4f(1,1,0,1)
37
#define MAGENTA osg::Vec4f(1,0,1,1)
38
#define CYAN osg::Vec4f(0,1,1,1)
41
// the number of verts to initial reserve in the shared VBO:
42
#define RESERVED_VERTICES 20000
44
// define this to employ a queue for refreshing diamonds' primitive sets & tex coords in UPDATE:
45
#define USE_DIRTY_QUEUE
47
// define this to apply textures to the quadtree diamonds:
50
// DEBUGGING: define this to apply simulated "debugging" textures instead of fetching them from MapLayer (for testing):
51
//#define USE_DEBUG_TEXTURES
53
// DEBUGGING: define this to set a color array on the shared VBO, and to apply colors based on LOD level (for testing):
54
//#define USE_VERTEX_COLORS
56
// DEBUGGING: draw a green outline around each texture
57
//#define OUTLINE_TEXTURES
59
// the highest LOD level at which diamond splits can occur:
60
#define MAX_ACTIVE_LEVEL 30
62
// maximum number of split, merge, and image jobs to complete per UPDATE frame
63
// (todo: replace with time quota)
64
#define MAX_JOBS_PER_FRAME 10
66
// maximum subdivision level that can split and merge
67
#define MAX_ACTIVE_LEVEL 30
69
// multiple this # by the diamond bounding sphere radius for switch-in/out distance:
70
#define CULL_RANGE_FACTOR 2
72
// density of each AMR patch (number of rows/cols)
73
#define AMR_PATCH_ROWS 8
75
// whether to use the geodetic manifold (or the cube manifold, the default)
76
//#define USE_GEODETIC_MANIFOLD 1
79
#endif // OSGEARTH_DROAM_ENGINE_COMMON_H