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 - Ilman

Pages: 1 [2]
16
Window / Re: sf::Window+the create function=errors?
« on: May 20, 2013, 09:42:03 pm »
Thanks for telling me how to use my window in the draw function. I should've known how to do that.

But the part about the ContextSettings you wrote gives me an error.
I write this in the beginning of my main function:
sf::ContextSettings contextsettings(0, 0, 4, 2, 0);
sf::RenderWindow window(sf::VideoMode(200, 200), "Randum stuffz", &contextsettings);
 

And it spits out this:
Quote
error: invalid conversion from 'sf::ContextSettings*' to 'sf::Uint32 {aka unsigned int}' [-fpermissive]|

17
Window / Re: sf::Window+the create function=errors?
« on: May 20, 2013, 08:18:41 pm »
As you said, using sf::RenderWindow globally isn't a good idea and that's the only way the drawing function will pick it up.

Also, n00b question, how can I set contextsettings' anti-aliasing level to, say 4, at declaration. I don't know much about Uint32 and it looks like that's what is used at declaration. I can change it in a function by typing contextsettings.antialiasingLevel=4, but I can't at declaration.

18
Window / Re: sf::Window+the create function=errors?
« on: May 20, 2013, 06:30:52 pm »
Oh, I forgot to mention this...
It works if I use sf::RenderWindow globally, but I can't apply anti-aliasing to my program. I know that setSmooth works, but I want native anti-aliasing. Since sf::RenderWindow is called before I can make a sf::ContextSettings variable, I can't apply any setting to my window.
Sorry for not mentioning this earlier.

19
Window / sf::Window+the create function=errors?
« on: May 20, 2013, 05:57:59 pm »
Hello to all,
I'm new here  :) and I have a small issue with SFML. Let's say I make a function that draws all my stuff on the window. Good, but if I use sf::RenderWindow in main, I get an error stating that no window was created at the point of the draw function in my function.
In that case I thought of making a global sf:Window and create it inside main. All compiles well until it hits a draw function in main. It then says
error: 'class sf::Window' has no member named 'draw'|.
I'm using CodeBlocks on Windows 7.


All help apreciated.

Pages: 1 [2]
anything