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

Author Topic: [Answered] SFML 2.2 and 64 bit opengl32  (Read 1660 times)

0 Members and 1 Guest are viewing this topic.

thecheeselover

  • Newbie
  • *
  • Posts: 24
    • View Profile
[Answered] SFML 2.2 and 64 bit opengl32
« on: January 04, 2015, 03:44:51 am »
I've built SFML 2.2 for multiple 64 bit compilers but I just noticed that it links opengl32. By default, opengl32 is a 32 bit dll. First of, does it mean I need to put the shared library in my bin folder or linking statically SFML fixes that? Also, in the cmake files, sfml only links openl32 and doesn't try to get the 64 bit opengl32 located at %ProgramFiles%\Microsoft SDKs\Windows\<version>\Lib\x64\OpenGL32.lib. This means that the .lib files, that are actually multiple .o files, uses a 32 bit library. Does it actually change anything or it only matters in an executable?

Thanks in advance! :)
« Last Edit: January 04, 2015, 07:16:58 pm by thecheeselover »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML 2.2 and 64 bit opengl32
« Reply #1 on: January 04, 2015, 02:29:05 pm »
opengl32 is a system library, you don't have to think about whether it's 32-bit or 64-bit or where it's located, just make sure it gets linked into SFML (or if you link statically, linked into your application).

I hope you understand that just because it has a "32" at the end, doesn't automatically mean it's a 32-bit library.
Also opengl32 is usually provided by the graphics driver, so they may differ an any system and you should not try to ship it with your application.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

thecheeselover

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: SFML 2.2 and 64 bit opengl32
« Reply #2 on: January 04, 2015, 06:57:24 pm »
Quote
I hope you understand that just because it has a "32" at the end, doesn't automatically mean it's a 32-bit library.

I understand that because actually the 64 bit version of opengl32 is called opengl32.

Quote
you don't have to think about whether it's 32-bit or 64-bit

Why is that so? When building a 64 bit application, linking 32 bit libraries either won't work or will drastically decrease the performance due to "casting" (I forgot the real term). If you say the truth (not that I doubt you, it's just that I'm really confused), then do I actually need to link opengl32 in my final application if I do 3D?

Thanks for your answer! :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: SFML 2.2 and 64 bit opengl32
« Reply #3 on: January 04, 2015, 07:16:22 pm »
The reason you don't have to think about is, that by choosing the right compiler toolchain (32 bit vs 64 bit) you'll link against the right version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/