3#include "RenderContext.h"
4#include "RenderTexture.h"
5#include "RenderBlock.h"
7#include "ClipmapEffectVariables.h"
9#include "Rendering/IGraphicsDevice.h"
10#include "Rendering/ITextures.h"
11#include "Rendering/IBuffers.h"
16 struct ClipmapGeometry;
21 struct GlobalParameters;
22 struct LevelParameters;
23 struct ImageryParameters;
25 struct IRenderTargets;
27 RenderTexture createClipmapTexture(IGraphicsDevice * device,
int width,
int height, TextureFormat textureFormat,
bool mipmap =
false, glm::vec4 clearColor = glm::vec4(0));
28 void releaseClipmapTexture(IGraphicsDevice * device, RenderTexture & texture);
29 void clearClipmapTexture(IGraphicsDevice * device, RenderTexture & texture);
36 bool depthRenderInitialized =
false;
47 bool initialized =
false;
59 void initializeTextures(
ITextures * textures);
60 void initializeEffects(
IBuffers * buffers,
IEffects * effects,
const size_t numImagery,
size_t permutation);
70 void updateLevelParameters(
IContext * context,
const RenderOptions & options,
const LevelParameters & parameters,
const ImageryParameters & imageryParameters,
size_t permutation);
71 void updateLevelTextures(
IContext * context,
const RenderLevel * renderLevel,
size_t permutation);
73 void setCustomParameters(
const unsigned char * data,
int count);
80 std::vector<std::vector<ClipmapLevel>> &,
82 const GlobalParameters & globalParameters,
83 const LevelParameters & parameters,
84 const ImageryParameters & imageryParameters,
91 std::vector<std::vector<ClipmapLevel>> &,
93 const GlobalParameters & globalParameters,
94 const LevelParameters & parameters,
95 const ImageryParameters & imageryParameters,
96 bool useSimplifiedMesh =
false);
98 void setupDepthPass(
RenderContext & renderContext,
size_t depthDataIndex);
104 void createBlock(
ClipmapMesh & mesh,
int overallWest,
int overallSouth,
int blockWest,
int blockSouth,
RenderLevel & renderLevel,
bool useSimplifiedMesh =
false);
109 if (permutationDependentClipmapRendererData.size() <= index) {
110 permutationDependentClipmapRendererData.resize(index + 4);
113 return permutationDependentClipmapRendererData[index];
135 std::vector<DepthRenderData> raypickDepthData;
136 const static int NoPickIndex = -1;
137 const static int DefaultPickIndex = 0;
144 bool depthQueryRenderInitialized =
false;
146 bool reverseDepth =
false;
148 std::vector<unsigned char> customParameters;
152 bool visibleBlocks[Cogs::kMaxNumBlocks * Cogs::kMaxNumLevels];
157 std::vector<PermutationDependentClipmapRendererData> permutationDependentClipmapRendererData;
Represents a graphics device used to manage graphics resources and issue drawing commands.
Contains all Cogs related functionality.
static const Handle_t NoHandle
Represents a handle to nothing.
Provides buffer management functionality.
Represents a graphics device context which can receive rendering commands.
Provides effects and shader management functionality.
Provides render target management functionality.
Provides texture management functionality.