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

Author Topic: [SFML 2.1]Drawing with SFML and OpenGL  (Read 1346 times)

0 Members and 1 Guest are viewing this topic.

Karclintinton

  • Newbie
  • *
  • Posts: 5
    • View Profile
[SFML 2.1]Drawing with SFML and OpenGL
« on: December 06, 2014, 06:23:05 pm »
I'm wondering if its possible to draw SFML 2d elements onto a renderWindow and to also draw OpenGL elements but without using the glPush and glPop states on the renderWindow. I'm not using the glPush and Pop states as I'm sorting my openGL rendering through shaders and not through immediate mode. I followed the SFML tutorial to draw sfml 2d elements and openGL elements through using the gl push and pop states but as that example uses immediate mode it doesn't work on the shader based system (to my knowledge). I have tried using the glPush and Pop states to test to see if it would work but regardless of the order of drawing or the order of the gl push and pop states it will cause errors with OpenGL.

I'm not sure if I'm missing something simple that will fix this or if I need to do it in a different way. It seems a little silly if its impossible to draw sfml elements and opengl elements on a programmable shader based system instead of using immediate mode?

Any help will be greatly appreciated
« Last Edit: December 06, 2014, 06:43:57 pm by Karclintinton »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [SFML 2.1]Drawing with SFML and OpenGL
« Reply #1 on: December 06, 2014, 06:58:25 pm »
Have you first read the tons of other posts about this? They explain which functions you need to call additionally to push/pop, if you use modern OpenGL.
Laurent Gomila - SFML developer

Karclintinton

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [SFML 2.1]Drawing with SFML and OpenGL
« Reply #2 on: December 06, 2014, 07:52:00 pm »
I'm not very good at navigating and searching this forum. I will try to find all these other posts you mention

 

anything