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

Author Topic: Opengl 3 + SFML 2 + Mac OS X Mountain Lion  (Read 2354 times)

0 Members and 1 Guest are viewing this topic.

Jeffrey

  • Newbie
  • *
  • Posts: 36
    • View Profile
Opengl 3 + SFML 2 + Mac OS X Mountain Lion
« on: December 14, 2012, 08:14:24 am »
I'm having some difficulties with this program. It compiles fine and everything and no OpenGL error is thrown during execution but what I see is just a black window (see clear color). How's that? (Here's Utility.hpp and Utility.cpp)

On a side note. Mac OS X Mountain Lion supports almost every procedure of OpenGL 3.2 but the card is listed as OpenGL 2.1 card. But as you can see I can use all the function of OpenGL 3.2 without having any "undefined identifier" error. Maybe SFML creates an OpenGL 2 context?

Fragment shader
#version 120

varying vec4 pass_Color;
void main(void) {
        gl_FragColor = pass_Color;
}

Vertex shader
#version 120

uniform mat4 ModelMatrix;
uniform mat4 ViewMatrix;
uniform mat4 ProjectionMatrix;
attribute vec4 in_Color;
attribute vec4 in_Position;
varying vec4 pass_Color;
void main(void) {
        gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
        pass_Color = in_Color;
}

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Opengl 3 + SFML 2 + Mac OS X Mountain Lion
« Reply #1 on: December 14, 2012, 05:42:48 pm »
SFML / OS X developer