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

Author Topic: SFML compatibility context  (Read 1093 times)

0 Members and 1 Guest are viewing this topic.

Wafthrudnir

  • Newbie
  • *
  • Posts: 26
    • View Profile
SFML compatibility context
« on: October 02, 2016, 06:08:20 pm »
Hi,

I am trying to learn OpenGL and use SFML instead of GLFW. Since I want to combine it later on.
Everything is working fine with the Default attributeFlag (compatibility mode). Using the Core profile, gives me an error when calling

window.pushGLStates();
Error is: an internal opengl call failed in texture cpp pushGLStates...

AFAIK its because the OpenGL Core profile won't tolerate immediate calls made by SFML (I read, that SFML still uses the fixed function pipeline for compatibility with older hardware, that's okay)

My Question is:
When using VAOs to paint my nice triangles and semi professional models and then use sf::Text or Shape or Sprite to draw something, will pushGLStates do the trick or will things maybe get messed up at some point?!?!

                // Draw the triangle !
                glDrawArrays(GL_TRIANGLES, 0, 3); // Starting from vertex 0; 3 vertices total -> 1 triangle
                glDisableVertexAttribArray(0);

                window.pushGLStates();

                //---SFML STUFF

                window.popGLStates();
               
        //Maybe more OpenGL Stuff here...

                // Done => Display everything
                window.display();
 

This works fine, I just want to know if I will run into several problems later on, especially when drawing the GUI with SFML for example, using the compatibility mode. I am still learning. Maybe someone can give me a little head start here? :)
Black Metal + Coding = Win!

 

anything