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

Author Topic: [SFML 1.6] Drawing an sf::Image over OpenGL Rendering  (Read 1135 times)

0 Members and 1 Guest are viewing this topic.

imbetter911

  • Newbie
  • *
  • Posts: 5
    • View Profile
[SFML 1.6] Drawing an sf::Image over OpenGL Rendering
« on: May 15, 2012, 11:56:16 pm »
Whenever I use App.Draw(sprite) over my window, it doesn't render to the screen.

Just a snippet...

while (App.IsOpened())
    {
        App.SetActive();

        PollInput();
        PositionCamera();

        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
        gluLookAt(camx, camy, camz, 0, 0, 0, 0, 1, 0);

        gl_draw_axes(-50.0, 50.0, -50.0, 50.0, -50.0, 50.0, .5*(Distance/70)); // Draw axes

        Bar_sprite.SetPosition(30, 30);

        App.Draw(Bar_sprite);

        App.Display();
    }

In my headers, I load the image and it loads correctly. I have PreserveOpenGLStates(true) set at the top. What am i doing wrong?
« Last Edit: May 16, 2012, 12:13:02 am by imbetter911 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: [SFML 1.6] Drawing an sf::Image over OpenGL Rendering
« Reply #1 on: May 16, 2012, 07:31:59 am »
Does it appear if you don't execute your OpenGL code?
Laurent Gomila - SFML developer

 

anything