public PointsGisLayerCPU(Game game, int maxPointsCount, bool isDynamic = true) : base(game)
{
PointsCountToDraw = maxPointsCount;
indeces = new int[maxPointsCount*6];
PointsDrawOffset = 0;
SizeMultiplier = 1;
var vbOptions = isDynamic ? VertexBufferOptions.Dynamic : VertexBufferOptions.Default;
currentBuffer = new VertexBuffer(Game.GraphicsDevice, typeof(Gis.CartPoint), maxPointsCount * 4, vbOptions);
PointsCpu = new Gis.CartPoint[maxPointsCount*4];
indBuf = new IndexBuffer(Game.GraphicsDevice, indeces.Length);
for (int i = 0; i < maxPointsCount; i += 1) {
indeces[i*6 + 0] = i*4 + 0;
indeces[i*6 + 1] = i*4 + 1;
indeces[i*6 + 2] = i*4 + 2;
indeces[i*6 + 3] = i*4 + 1;
indeces[i*6 + 4] = i*4 + 3;
indeces[i*6 + 5] = i*4 + 2;
}
indBuf.SetData(indeces);
shader = Game.Content.Load<Ubershader>("globe.Debug.hlsl");
factory = shader.CreateFactory(typeof(PointFlags), Primitive.TriangleList, VertexInputElement.FromStructure<Gis.CartPoint>(), BlendState.AlphaBlend, RasterizerState.CullCW, DepthStencilState.None);
}