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

Author Topic: Raw OpenGL with SFML 2  (Read 2765 times)

0 Members and 1 Guest are viewing this topic.

kurasu1415

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Raw OpenGL with SFML 2
« on: August 08, 2012, 07:02:31 pm »
In previous versions I know SFML had a way to create an OpenGL context of a certain version, and then just draw to a window using Raw OpenGL instead of using any SFML specific calls. Do I have to do anything special to render OpenGL to an SFML2 Window? I want to use standard OpenGL, not the SFML functions. I want to handle my own shaders etc.

Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11028
    • View Profile
    • development blog
    • Email
Re: Raw OpenGL with SFML 2
« Reply #1 on: August 08, 2012, 07:09:38 pm »
I guess a search in the forum or with google or a peak into the example folder or the tutorial section was too complicated? ::)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kurasu1415

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Raw OpenGL with SFML 2
« Reply #2 on: August 08, 2012, 07:12:02 pm »
Sorry, every time I saw a post about this people were just using the SFML built-ins. Also, I didn't even realize that there was an examples folder. I'm so busy lost in my little world it must have slipped by. Thanks for the rerouting though.

kurasu1415

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Raw OpenGL with SFML 2
« Reply #3 on: August 08, 2012, 07:22:53 pm »
Actually,
This doesn't answer my question at all. No where in this code does he use any shaders. Its using this Window.pushGLStates() function. This function isn't outlined in the documentation, at least not that I can find. What exactly is this function for?

Also, this example utilizes the fixed function pipeline. Do I just replace the fixed function calls with Programmable Pipeline calls?
« Last Edit: August 08, 2012, 07:25:48 pm by kurasu1415 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11028
    • View Profile
    • development blog
    • Email
Re: Raw OpenGL with SFML 2
« Reply #4 on: August 08, 2012, 08:20:47 pm »
You've never mentioned anything about shaders or programmable pipeline, thus you've never asked a question which hasn't been answered. ;D

Also if you look closely you'll see that the example is using a sf::RenderWindow, which in fact has pushGLStates().

For the OpenGL questions I've no idea. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kurasu1415

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Raw OpenGL with SFML 2
« Reply #5 on: August 08, 2012, 08:29:41 pm »
I shouldn't have assumed that people use the modern OpenGL approach I assume. I never quite understood why everyone still uses the fixed-function approach. It has been outdated for years, and is completely unusable on modern graphics cards.

Anyways, hopefully someone can give me some insight as to what the process is for this.

P.S. you were right about the RenderWindow thing. I was checking out plain Window. touche!

 

anything