3#include "ClipmapUpdater.h"
4#include "NormalUpdater.h"
6#include "ClipmapGeometry.h"
7#include "ClipmapState.h"
8#include "ClipmapLevel.h"
10#include "ClipmapRenderer.h"
11#include "ClipmapDepthQuery.h"
13#include "OceanRenderer.h"
15#include "Raster/RasterSourceSubscription.h"
25 void setRasterSources(
const RasterSourcePtr & terrainSource,
const std::vector<RasterSourcePtr> & imagerySources);
27 void setCustomParameters(
const unsigned char * data,
int count);
31 void initializeGeometry();
32 void initializeLevels();
33 void initializeBackgroundLevels();
35 void detachResponseHandlers();
40 void renderDepth(
RenderContext & renderContext,
size_t maxLevel);
42 void renderOcean(
RenderContext & renderContext,
size_t maxLevel);
49 void invalidateRasterSource(
RasterSource * rasterSource,
bool clearContents);
52 bool updateRequired()
const {
return needsUpdate; }
54 bool isInitialized()
const {
return initialized; }
56 float getNearestSample();
63 bool effectsNeedUpdate =
false;
71 bool oceanActive =
false;
73 std::vector<ClipmapLevel> terrainLevels;
74 std::vector<std::vector<ClipmapLevel>> imagery;
75 std::vector<ClipmapLevel> normalLevels;
78 std::vector<ClipmapLevel> backgroundImagery;
80 bool backgroundNeedsUpdate =
false;
82 std::vector<bool> imageryEnabled;
85 bool geometryNeedsUpdate =
true;
88 std::vector<RasterSourceSubscription> imagerySources;
89 bool sourcesNeedUpdate =
false;
94 size_t calculateCenterAndMaxLevel(
RenderContext & renderContext);
96 void requestTileLoads(
RenderContext & renderContext,
const size_t maxLevel);
103 void preloadLevelZeroTiles();
107 void touch() { needsUpdate =
true; }
109 void clearLevels(
RasterSource * rasterSource,
bool clearContents);
111 RenderTexture createTexture(
const size_t width,
const size_t height,
const TextureFormat textureFormat,
const bool mipmapping =
false, glm::vec4 clearColor = glm::vec4(0, 0, 0, 0));
123 int missingTileRegions = 1;
124 std::vector<size_t> missingImageryTileRegions;
126 size_t lastMaxLevel = 0;
127 bool needsUpdate =
false;
129 bool initialized =
false;
130 float nearestSample = 0;
Represents a graphics device used to manage graphics resources and issue drawing commands.
Contains all Cogs related functionality.