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

Pages: [1] 2 3 ... 34
The only way is to use OpenGL. SFML already relies on OpenGL, so it would not be another dependency. Although, if your simulator is 2D, you don't need to render a sphere. You could just render a textured circle.

Graphics / Re: Vsync limits entire loop to 60 cycles per second
« on: September 13, 2014, 08:04:53 am »
This is exactly how Vsync is supposed to work. If Vsync is enabled, every time you call display(), the program goes to sleep until the next vertical sync of your monitor.

General discussions / Re: Understanding The syntax of SFML.
« on: January 04, 2014, 02:08:42 am »
It is a namespace like std. Use
using namespace sf;
if it bothers you.

Never use "using namespace" for any namespace. It is widely considered bad practice due to causing namespace collisions and the fact that the namespace clarifies where a function/class/etc is coming from, making code a bit easier to understand and making it easier to find the proper documentation for a function/class/etc.

General / Re: New version of SFML
« on: December 30, 2013, 11:31:17 am »
It will be released when the iOS and Android ports are done and when as many of these issues are closed as Laurent sees fit.

General / Re: How to make a button in SFML?
« on: November 25, 2013, 09:55:21 am »
You don't have to recreate the window to change its properties. You can change the title and the size quite easily using sf::Window's member functions.

General / Re: Lethn's Programming Questions Thread
« on: August 26, 2013, 06:38:03 am »
Those errors mean you haven't defined the functions "processEvents", "update", "updateStatistics", or "render". You need to define them before using them. If you've already defined them in another source (.cpp) file, include the header (.hpp) that correponds to that source file at the beginning of your source file that has the main function.

Window / Re: Window does not activate if you click inside it
« on: August 16, 2013, 04:14:45 am »
https://github.com/SFML/SFML/issues/437 I think this is the issue you are talking about. It was introduced by accident in 2.1, and will hopefully be fixed in 2.2.

General / Re: Linking in Linux
« on: August 16, 2013, 03:26:05 am »
Doesn't linking with the graphics module automatically link your program to OpenGL though?
Not if he's linking statically.

Audio / Re: Changing music when Game State changes
« on: August 15, 2013, 10:02:42 pm »
What? Why do you think anybody was offended? Your code was complete before, but not minimal.

Complete - You can copy, paste, and execute it with no modification.

Minimal - The only code there is is the code that relates to the problem, AND there is ideally only one source file.

So now, your code is minimal, but it is not complete. We need complete and minimal code in order to give you the best advice we can.

Anyways, your problem here is that you only tell the music to play once - in a switch statement before the while loop. Your code will never go back to that switch statement, so there is no way for the music to change to the new track. I have an idea of how to fix this, but I don't know the internals of the classes you use.

Audio / Re: Changing music when Game State changes
« on: August 15, 2013, 09:17:02 pm »
If there's one thing that code is not, it's minimal. Minimal means one source file, with ALL code removed except for what is ABSOLUTELY necessary to demonstrate the problem.

General / Re: sfml 2.1 build log shows some warnings
« on: August 15, 2013, 03:49:23 am »
There's nothing wrong with that warning. That's just there because Laurent decided not to use the return value from the mentioned function for anything.

binary, I was under the impression that exit() calls the destructors to all currently created objects. In fact, that seems to be the first bullet point for exit(). And I was also under the impression that std::shared_ptr cleans up the dynamically allocated memory in the destructor when it's the last shared pointer to that memory. So shouldn't exit() clean up the pointers?

exit() will likely work best, as it tries to exit as cleanly as possible. But I doubt you HAVE to abort the entire program. That seems... extremely draconian. Are you sure there isn't another way to handle any errors?

General / Re: Other people can't run my programs...
« on: August 14, 2013, 08:34:56 am »
...Yeah... I guess Alan Turing... and many many others were all morons... Please, you can at least show some respect and not generalize like that.

Could you please show some respect and not assume to know what Alan Turing would or would not have done? That is INCREDIBLY presumptuous of you. For your information, he died in 1954, DECADES before the GPL even existed.

General / Re: (Linux 32, CodeBlocks) cannot find -lsfml-system
« on: August 13, 2013, 06:51:37 am »
Your linker settings have underscores. Those should be dashes, not underscores.

Pages: [1] 2 3 ... 34