Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Volatile Agent

Pages: [1]
1
Graphics / Error creating VertexArray
« on: September 19, 2019, 04:08:15 pm »
I am getting a syntax error on the symbol sf::Lines, and I can't figure out why. I've also tried specifying it as sf::PrimitiveType::Lines. What am I doing wrong?

#include <vector>
#include <SFML/Graphics.hpp>
#include "Geometry.h"

using namespace DarkLoonMath;

class CSpaceRaceMap : sf::Drawable
{
private:
        std::vector<TLineSegment2<float>> Lines;
        sf::VertexArray Vertices(sf::Lines, 10);
        const sf::Color MapLineColor = sf::Color::Green;

public:
        CSpaceRaceMap();
        ~CSpaceRaceMap();

        void AddLineSegment(TLineSegment2<float> S);

        void Draw(sf::RenderTarget & target, const sf::RenderStates states);
        void Update(sf::Time delta);
};

 

Pages: [1]
anything