I am making a vertexArray of points to draw my map. Each point is a pixel on the screen.
drawArray.setPrimitiveType(sf::Points);
drawArray.resize((ScreenHeight * ScreenWidth));
int size = 0;
for(int x = 0; x < ScreenWidth; x++)
{
for(int y = 0; y < ScreenlHeight; y++)
{
if(MapVector[x][y].isPixel)
{
sf::Vector2f pixelPos(x,y);
drawArray[size].color = sf::Color::Magenta;
drawArray[size].position = pixelPos;
size++;
}
}
}
Then at the end of populating this vertexArray called "drawArray" I draw it to the screen just using window.draw(drawArray)
Any ideas on why this just gives me a black screen?