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.


Topics - massive_potato

Pages: [1]
1
Feature requests / Improved Iterator Support for sf::String
« on: June 07, 2013, 03:11:27 am »
Would it be possible to implement more support for iterators (as in find, insert, construction, etc.). Additionally, would it be possible to get support for reverse iterators? I looked on the forums and could not find anything about this, so I was wondering if it was already planned or if it would ever be implemented.

2
General / Possible error with Windows 8
« on: December 27, 2012, 05:07:55 am »
I recently made the switch to Windows 8 (from Windows 7) and have not had a pleasant time moving my code over. This code, which is just a combination of the examples for sf::Text and the Visual Studio set-up example, works on my old machine -

#include <SFML\Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML doesn't work :(");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);
    // Create a text
    sf::Text text("hello");
    //text.setCharacterSize(30);
    //text.setStyle(sf::Text::Bold);
    //text.setColor(sf::Color::Red);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        //window.draw(text);
        window.display();
    }

    return 0;
}
 

- but produces the following error "Access violation reading location 0xfeeefef6" on the new one. Both machines have the same version of SFML (2.0, downloaded from the RC page), are linked in the exact same manner, and have the exact same code. I also created a new solution instead of simply copying over an old one, which didn't fix the problem. From some other posts on the forums it appears that a few other people are having issues running code with Windows 8. Is there a reason for this? If there is, is a fix available or when can one be expected?

If it makes any difference, the issue appears to occur when I instantiate the sf::Text object, as commenting that line out eliminates the error. Does anyone have any insight into this problem?

3
Graphics / Question about Displaying Text
« on: December 21, 2012, 03:57:52 am »
void displayText(const std::string & text, sf::RenderWindow & window, const sf::Vector2f & position = sf::Vector2f(0, 0), const short & size = 30, const sf::Color & color = sf::Color::White)
        {
                sf::Text t(text, sf::Font::getDefaultFont(), size);
                t.setPosition(position);
                t.setColor(color);
                window.draw(t);
        }

Is there a faster way to replicate the functionality of this function, or is this the best way to output text? Whenever I call this function it drops my framerate by about 300 fps. How can I improve this or what alternatives are available? I've gone through the documentation and have not found anything (although I certainly could have missed something).

4
General / Linking SFML 2.0 to MS Visual Studio 2012
« on: August 15, 2012, 06:43:24 am »
I recently downloaded the latest version of Microsoft Visual Studio (MS Visual Studio Ultimate RC), but can't seem to link it to SFML. Is there anything different that needs to be done from the older versions of MS Visual Studio, or is the process the same? Are there any extra steps that need to be taken in order to link SFML to MS Visual Studio 2012?

5
Graphics / Question about sf::VertexArray
« on: August 12, 2012, 09:36:19 pm »
I have created a polygon class and am trying to render it. I created a vertex array containing each point of the polygon and am able to draw the shape to a window, but have no way of changing the color of the polygon's outline (it draws white lines). Is there some way of doing this without resorting to sf::Shape (the polygons can be both concave and convex, preventing me from using the sf::Shape class)?

6
Window / Passing sf::RenderWindow to a function [Solved]
« on: June 30, 2012, 03:41:57 am »
What is the most efficient way to pass a RenderWindow to a function? Is one method preferable compared to another?

7
Graphics / Question Regarding Image Types
« on: June 17, 2012, 09:52:21 pm »
Is there any noticeable difference between image types? If I were to use either a .jpg file or a .png file, would one be faster than the other?

Pages: [1]
anything