Feature/globebrowsing optimization (#310)

* Simplest possible PBO implementation.

* Add PBO class

* TileLoadJob owns raw tile data

* Working on a soluton to cache textures and reuse them

* PBO and cached textures working for one texture type. Color textures.

* Threadpool for tile requests uses LRU cache as queue

* Remove framesUntilRequestFlush

* Clean up

* Clean up

* Use prioritizing concurrent job manager

* Use TileTextureInitData to initialize RawTileDataReader.

* Class TextureContainer owns the textures to use for tiles.

* Using TileTextureInitData to determine if new caches need to be created.

* Remove WriteDataDescription

* Remove TileDataLayout

* Rendering many different layer types again

* TileProviderByLevel gives layergroup id to tile providers

* Comment away use of PBO

* Erase unfinished requests to make room for new ones

* Enable choice of PBO or not.

* Enable resetting of asynctiledataprovider

* Add the ability to use PBO and also load to CPU

* Update ghoul

* Solve culling issue.

* Texture pointer of Tile is now a raw pointer. Currently break single image tile provider and text tile provider.

* Add gpudata

* Move fetching of shader preprocessing data to LayerManager

* No comparisons to determine shader recompilation.

* Show the tile cache size in the GUI

* Clean up and comment.

* Solve bug where float is interpreted as NaN

* Enable ability to blend between layers again

* Fix single image provider

* Fix windows build error

* Fix OSX compile issue.

* Some clean up

* Showing correct texture data size

* Enable use of text tile providers again. No backgroupd image path however.

* Change cache size from GUI

* Clean up

* Solve osx compilation error.

* Update ghoul

* Make it possible to switch between PBO and not during runtime.

* Enable resetting of tile datasets

* change function module in moduleengine to identify module by name

* MemoryAwareTileCache is no longer a singleton

* Update ownership of properties for globe browsing

* Logging info about resetting tile reader.

* Logging info

* Fix requested changes

* Fix some compile warnings.

* Fix compilation warnings

* Add ability to blend values with blend parameter. Also define settings through lua dict.

* Fix some comments on pull request.

* Change formatting

* Change formatting

* Change formatting

* Fix pull request comments.

* Those are details

* Make Mercury great again.

* Make Earth great again.

* Solve conflict

* Test to sometimes use valueblending and sometimes not

* Not always use value blending

* Update ghoul

* Change from auto to explicit type.

* Update test for LRU Cache

* Include algorithm.
This commit is contained in:
Kalle Bladin
2017-05-30 15:37:05 +02:00
committed by GitHub
parent f6da2b6472
commit f51f293989
128 changed files with 3039 additions and 1930 deletions
+7 -7
View File
@@ -33,7 +33,7 @@ BasicGrid::BasicGrid(unsigned int xSegments, unsigned int ySegments,
TriangleSoup::Positions usePositions,
TriangleSoup::TextureCoordinates useTextureCoordinates,
TriangleSoup::Normals useNormals)
: Grid(xSegments, ySegments, usePositions, useTextureCoordinates, useNormals)
: Grid(xSegments, ySegments)
{
_geometry = std::make_unique<TriangleSoup>(
createElements(xSegments, ySegments),
@@ -84,8 +84,8 @@ std::vector<GLuint> BasicGrid::createElements(int xSegments, int ySegments) {
std::vector<GLuint> elements;
elements.reserve(numElements(xSegments, ySegments));
for (unsigned int y = 0; y < ySegments; y++) {
for (unsigned int x = 0; x < xSegments; x++) {
for (int y = 0; y < ySegments; y++) {
for (int x = 0; x < xSegments; x++) {
// x v01---v11 x ..
// | / |
@@ -141,8 +141,8 @@ std::vector<glm::vec2> BasicGrid::createTextureCoordinates(int xSegments, int yS
std::vector<glm::vec2> textureCoordinates;
textureCoordinates.reserve(numVertices(xSegments, ySegments));
for (unsigned int y = 0; y < ySegments + 1; y++) {
for (unsigned int x = 0; x < xSegments + 1; x++) {
for (int y = 0; y < ySegments + 1; y++) {
for (int x = 0; x < xSegments + 1; x++) {
textureCoordinates.push_back(glm::vec2(
static_cast<float>(x) / static_cast<float>(xSegments),
static_cast<float>(y) / static_cast<float>(ySegments)
@@ -157,8 +157,8 @@ std::vector<glm::vec3> BasicGrid::createNormals(int xSegments, int ySegments) {
std::vector<glm::vec3> normals;
normals.reserve(numVertices(xSegments, ySegments));
for (unsigned int y = 0; y < ySegments + 1; y++) {
for (unsigned int x = 0; x < xSegments + 1; x++) {
for (int y = 0; y < ySegments + 1; y++) {
for (int x = 0; x < xSegments + 1; x++) {
normals.push_back(glm::vec3(0, 0, 1));
}
}