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

Author Topic: SFML and hDC  (Read 2020 times)

0 Members and 1 Guest are viewing this topic.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
SFML and hDC
« on: July 25, 2011, 05:28:23 pm »
Im trying to learn some OpenGL but I have reached the point where I would like to use functions and stuff that need the hDC or other low level things and I just wondered if SFML provides any way to get this?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML and hDC
« Reply #1 on: July 25, 2011, 08:11:37 pm »
If you want to mess up with HDC etc. then you probably don't want to use SFML. SFML is made to hide this low-level, messy, platform-specific stuff.

In case you really need it, SFML 2 has a Window::GetSystemHandle function that gives you the low-level handle of a window, from which you can get the HDC.
Laurent Gomila - SFML developer

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
SFML and hDC
« Reply #2 on: July 25, 2011, 10:07:46 pm »
Ahh, fair enough.
The reason I was asking was because I wanted to try a method of antialiasing.
Just out of curiosity when using windowSettings/contextSettings if I have antialiasing set does that work with pure openGL?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML and hDC
« Reply #3 on: July 25, 2011, 10:12:19 pm »
Yes of course, ContextSettings directly defines the settings of the underlying OpenGL context, so it applies to anything that you do with this context.
Laurent Gomila - SFML developer

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
SFML and hDC
« Reply #4 on: August 06, 2011, 03:51:26 am »
Didnt really want to open a new thread for a simple question so thought i would ask it here, when creating the openGL context, if using 3.x< can you specify to only load the core stuff?
or core and compatibility?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML and hDC
« Reply #5 on: August 06, 2011, 10:03:26 am »
Quote
Didnt really want to open a new thread for a simple question so thought i would ask it here

This topic is not really related to your question. And what's wrong with creating new topics? Several threads focused on their own question are much better for people who read the forum than a single thread containing several questions of several posters ;)

Quote
when creating the openGL context, if using 3.x< can you specify to only load the core stuff?

No, SFML uses deprecated functions so it always creates compatibility profiles.
Laurent Gomila - SFML developer