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

Author Topic: Shape doesn't compile  (Read 2729 times)

0 Members and 1 Guest are viewing this topic.

DarkGlitch

  • Newbie
  • *
  • Posts: 11
    • View Profile
Shape doesn't compile
« on: December 17, 2012, 06:03:36 pm »
So I'm trying to draw a square on the screen and not only does it not appear, the compiler tells me it has 5 points when I only used the AddPoint function 4 times, and it says it isn't compiled, so I assume that's why it isn't drawing.

Help?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Shape doesn't compile
« Reply #1 on: December 17, 2012, 06:40:19 pm »
Wait what? You're able to run an application that doesn't compile? ???

If you want help you need to provide the complete and minimal code that reproduces the problem... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

DarkGlitch

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Shape doesn't compile
« Reply #2 on: December 17, 2012, 06:48:59 pm »
What I mean to say is the shape says it isn't compiled.

I just tried to reproduce this but it WORKS when I try it...I'm looking at my code and there are no errors, and I also double checked the doc for 1.6 to make sure I'm not missing anything but it still doesn't show on the screen.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Shape doesn't compile
« Reply #3 on: December 17, 2012, 07:06:17 pm »
What I mean to say is the shape says it isn't compiled.
Where and what does say it doesn't get compiled? ???

We're not magician who can see what you've written, if you want us to help you need to provide the code. Also read this.

Anyways I'd strongly advice you to use SFML 2.0, because SFML 1.6 has some serious bugs, hasn't been maintained in over two years and lacks a lot of features that SFML 2 provides (e.g. sf::VertexArray, sf::RenderTexture, etc..).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

DarkGlitch

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Shape doesn't compile
« Reply #4 on: December 17, 2012, 10:46:17 pm »
.....

There is a boolean in sf::Shape that is private. When I use MSVC++ 2010 debug mode I can 'watch' a variable or what have you. The boolean is something like isCompiled or myIsCompiled or some such name and it shows up as false. So I wondered if anyone here might know what that means...obviously not.

As for 2.0 I would use it if there were a tutorial on how to get it up and running. The download page says to "wait until the final version is released, and tutorials are written. " so in an effort to not annoy the piss out of people here, I abstain. Also tutorials I've looked at elsewhere are either incomplete or incorrect, or something on my pc is broke. I set up 1.6 just fine and it works well for me...except for this one occasion.

I wonder when posting links to board rules got started as a way of answering a question. All it seems to do in most cases is annoy the hell out of people. That was a musing, not a flame btw.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Shape doesn't compile
« Reply #5 on: December 17, 2012, 11:22:53 pm »
There is a boolean in sf::Shape that is private. When I use MSVC++ 2010 debug mode I can 'watch' a variable or what have you. The boolean is something like isCompiled or myIsCompiled or some such name and it shows up as false. So I wondered if anyone here might know what that means...obviously not.
You should have mentioned that in your first post. It is pretty clear that the expression "compile" is primarily understood in a different way.

The shape internally stores more points. Both the amount of points and the myIsCompiled variable are implementation details, you are not supposed to draw conclusions from them. Please come up with a minimal example reproducing your problems. But I agree with eXpl0it3r that you're better off with SFML 2, since it contains much more features and fewer bugs. SFML 1 has been unmaintained for a long time.

As for 2.0 I would use it if there were a tutorial on how to get it up and running. The download page says to "wait until the final version is released, and tutorials are written. "
There are tutorials about installation and some use cases, but they are not complete yet. Until they're finished, you can take a look at the documentation or the SFML 1.6 tutorials (many concepts have remained the same, with slightly different API).

I wonder when posting links to board rules got started as a way of answering a question.
It started around the time when Laurent wrote that "Read before posting" thread, as a result of a massive amount of people who weren't able to meaningfully ask for help.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: Re: Shape doesn't compile
« Reply #6 on: December 18, 2012, 11:51:38 am »
There is a boolean in sf::Shape that is private. When I use MSVC++ 2010 debug mode I can 'watch' a variable or what have you. The boolean is something like isCompiled or myIsCompiled or some such name and it shows up as false. So I wondered if anyone here might know what that means...obviously not.
And I should've guessed that how? ???
If you're already looking at implementation details you could've also looked how and when that boolean gets set.
I'd guess that your described shape is a concave shape and iirc SFML 1.6 as well as SFML 2.0 provides only direct support for convex shapes.

As for 2.0 I would use it if there were a tutorial on how to get it up and running. The download page says to "wait until the final version is released, and tutorials are written. " so in an effort to not annoy the piss out of people here, I abstain. Also tutorials I've looked at elsewhere are either incomplete or incorrect, or something on my pc is broken.
The offical tutorials on how to set things up are already finished and complete for SFML 2. What other sources say I can't judge, but it's often the case that they get outdated.

I wonder when posting links to board rules got started as a way of answering a question. All it seems to do in most cases is annoy the hell out of people. That was a musing, not a flame btw.
If you had taken your time to read the rules you'd have seen in the last post how to write a good post and if then had compared it to your post it would've gotten clear to you what I wanted to point out. ;)

And again if you want solutions to your problems quickly, it's important to not hold back information or assume that somthing is well known and most impotantly provide a minimal and complete example that reproduces your problem. ;)
« Last Edit: December 18, 2012, 11:53:50 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything