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

Author Topic: OpenGL and SFML Graphics in a single window  (Read 6023 times)

0 Members and 1 Guest are viewing this topic.

acrin1

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • http://www.crpgdev.com
OpenGL and SFML Graphics in a single window
« on: August 30, 2007, 02:03:06 pm »
Hi,

Apologies if this is a silly question. Is is possible to draw an OpenGL 3D view in an SFML window but use SMFLs 2D graphics functions in the same window? E.g. for displaying text or overlaying sprites.

Thanks

Moomin

  • Newbie
  • *
  • Posts: 6
    • View Profile
OpenGL and SFML Graphics in a single window
« Reply #1 on: August 30, 2007, 02:06:09 pm »
Yes, just look at the opengl sample project.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
OpenGL and SFML Graphics in a single window
« Reply #2 on: August 30, 2007, 02:07:51 pm »
Yes, have a look at the OpenGL sample, it does exactly what you want.
Laurent Gomila - SFML developer

acrin1

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • http://www.crpgdev.com
OpenGL and SFML Graphics in a single window
« Reply #3 on: August 30, 2007, 03:44:06 pm »
Quote from: "Laurent"
Yes, have a look at the OpenGL sample, it does exactly what you want.


Thanks. That's great. I'd been looking at the OpenGL tutorial rather than the sample progrem.

My current SDL/OpenGL project has the 2D stuff done with OpenGL which I find less convenient. This will make things a lot easier for me.

thanks again.