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

Author Topic: How to get offset of a View? (conversion from world position to window position)  (Read 4109 times)

0 Members and 1 Guest are viewing this topic.

waxx

  • Newbie
  • *
  • Posts: 26
    • View Profile
Tried convertCoords but it works the other way around I need. My version is 2.0.

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
What version of sfml 2 are you using exactly? The rc or a self compiled version? If you using the rc you should compile sfml yourself (or use one of the unofficial nightly builds) because the function you want has only been added recently. See here: https://github.com/SFML/SFML/commit/6ce6014dd8517ee3012c0b969484f6bc258e65ef

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
My version is 2.0.
Use the latest version fomr GitHub, which implements mapPixelToCoords. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

waxx

  • Newbie
  • *
  • Posts: 26
    • View Profile
Can't seem to find a project for VC to build and compile this version (or maybe I'm missing, not a fan of git/svn and things like that). What do?

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
If you don't want to compile SFML from source yourself, you can use the Unofficial nightlies provieded by exploit3r.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Can't seem to find a project for VC to build and compile this version.
SFML uses a 'meta build system'. You don't directly get project/make files, but you get CMake files, which then generate any supported project/make file you'd ever want.
So you could generate VS project files on Windows and makefiles on Linux and the maintainer of the source code, doesn't have to provide any of them and 'just' write a CMake script. ;)

(not a fan of git/svn and things like that). What do?
If you want to keep going in the programming section, you'll sooner rather than later have to get familiar with it. It's not only the best way to distribute code, but it's also the best way to keep track of code changes and work in teams. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

waxx

  • Newbie
  • *
  • Posts: 26
    • View Profile
Did the SFML_STATIC flag change or something? Without it I'm getting tons of linker errors as usual, but with it I'm getting them as well as fatal error LNK1169: one or more multiply defined symbols found (not sure if it is about this preprocessor call).

@SVN
For me it's way too bothersome, or at least for now when I'm working alone and I prefer to work alone.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Well you need to give use some more information...
What version did you now get?
How are you setting things? Are you sure you don't use the old versions somehow?
Did you make a clean rebuild?
Which version of VC are you using?
etc. :D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

waxx

  • Newbie
  • *
  • Posts: 26
    • View Profile
okay, that was silly thing by me, I quickly opened static-std folder just because I saw "static".

Works like a charm now, thanks guys.

 

anything