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

Author Topic: A darkening suspicion with my SFML setup and Classes  (Read 1537 times)

0 Members and 1 Guest are viewing this topic.

NinjaFishleg

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
A darkening suspicion with my SFML setup and Classes
« on: March 17, 2014, 09:17:45 pm »
I have a suspicion that for some reason my Classes with SFML are behaving wrong (maybe due to my install?). Could a SFML hero spend a few seconds of there day to reply with a quick classes example with sfml?

example:
class classname{
    public:
        sfml member
}

This is either me being an idiot or my setup is wrong (it seems strange that only classes would mess up)

Thanks in advance!
« Last Edit: March 17, 2014, 09:19:56 pm by NinjaFishleg »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: A darkening suspicion with my SFML setup and Classes
« Reply #1 on: March 17, 2014, 09:24:20 pm »
Can you be more specific about your problem? Please read this thread before posting.

The only thing you should keep in mind is to avoid global/static variables of SFML types. But there's no fundamental problem with classes.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

NinjaFishleg

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: A darkening suspicion with my SFML setup and Classes
« Reply #2 on: March 17, 2014, 11:16:57 pm »
Thank you Nexus! Kind as always! Keep up the good work.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: A darkening suspicion with my SFML setup and Classes
« Reply #3 on: March 17, 2014, 11:54:49 pm »
Quote
my Classes with SFML are behaving wrong
Quote
This is either me being an idiot or my setup is wrong
You should describe your problem (precisely) rather than being vague and saying you're maybe an idiot ;)

Do you have a compile error? Linker error? Crash? Unexpected behaviour?
Laurent Gomila - SFML developer