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

Author Topic: OpenGL not rendering  (Read 5755 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 18
    • View Profile
OpenGL not rendering
« Reply #15 on: August 03, 2011, 04:34:09 am »
Quote from: "Laurent"
Have you tried the Window or OpenGL examples provided with the SFML SDK?

Yes, both of them work just fine, which confuses me greatly.


  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
OpenGL not rendering
« Reply #16 on: August 03, 2011, 08:00:27 am »
Ok, so you can start from them and try to build your own code on top of that.
Laurent Gomila - SFML developer


  • Newbie
  • *
  • Posts: 11
    • View Profile
OpenGL not rendering
« Reply #17 on: August 04, 2011, 09:34:26 pm »
Quote from: "drummerp"
It still displays no more than a blank screen, and I cannot determine why. Please, any explanation is greatly appreciated, let alone help. I just want to get this working.

In your code at the end of your setup function, you need to setup a perspective projection like so:
Code: [Select]
    gluPerspective(90.f, 1.f, 1.f, 500.f);

And in your render function you need to add glMatrixMode(GL_MODELVIEW); like so:

Code: [Select]
void render() {
    // Clear the window with current clearing color

I hope that helps!