forked from organicmaps/organicmaps
reducing the amount of geometry sent to GPU.
This commit is contained in:
parent
156f96b958
commit
d778e137bf
2 changed files with 25 additions and 0 deletions
|
@ -18,12 +18,35 @@ namespace yg
|
|||
m_isSolid = true;
|
||||
else
|
||||
{
|
||||
/* buffer_vector<double, 8> vec;
|
||||
copy(pattern, pattern + patternSize, back_inserter(vec));
|
||||
double length = 0;
|
||||
for (size_t i = 0; i < vec.size(); ++i)
|
||||
{
|
||||
if ((vec[i] < 2) && (vec[i] > 0))
|
||||
vec[i] = 2;
|
||||
length += vec[i];
|
||||
}
|
||||
|
||||
int periods = min(20, max(int(100 / length), 1));
|
||||
m_pat.reserve(periods * vec.size());
|
||||
for (int i = 0; i < periods; ++i)
|
||||
copy(vec.begin(), vec.end(), back_inserter(m_pat));
|
||||
*/
|
||||
copy(pattern, pattern + patternSize, back_inserter(m_pat));
|
||||
double length = 0;
|
||||
for (size_t i = 0; i < m_pat.size(); ++i)
|
||||
{
|
||||
if ((m_pat[i] < 2) && (m_pat[i] > 0))
|
||||
m_pat[i] = 2;
|
||||
// length += m_pat[i];
|
||||
}
|
||||
|
||||
/* int periods = min(20, max(int(100 / length), 1));
|
||||
m_pat.reserve(periods * vec.size());
|
||||
for (int i = 0; i < periods; ++i)
|
||||
copy(vec.begin(), vec.end(), back_inserter(m_pat));
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
#include "color.hpp"
|
||||
|
||||
#include "../std/vector.hpp"
|
||||
#include "../base/buffer_vector.hpp"
|
||||
|
||||
namespace yg
|
||||
{
|
||||
/// definition of the line style pattern used as a texture-cache-key
|
||||
struct PenInfo
|
||||
{
|
||||
//typedef buffer_vector<double, 8> TPattern;
|
||||
typedef vector<double> TPattern;
|
||||
Color m_color;
|
||||
double m_w;
|
||||
|
|
Loading…
Add table
Reference in a new issue