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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - moonshadow

Pages: [1]
1
Graphics / sfml2, opengl3.2 and glCreateShader
« on: June 22, 2011, 11:27:17 pm »
Ouch! Thanks :(

And I was messing about with GlResource::EnsureGlContext. I hope it counts as some kind of excuse that it wasn't neccessary in 1.6, the same code was working perfectly then. Can it be that 1.6 did a glewInit()?

2
Graphics / Similar Error with minimal Example
« on: June 22, 2011, 11:09:08 pm »
I have a similar problem on Ubuntu 11.04 with SFML2, OpenGL 3.3.0 NVIDIA 270.41.06 (nvidia-current restricted driver), with a Segmentation Fault on glCreateShader. In the GLEW header, this seems to some kind of function pointer, which is NULL. Messing around with some of my code and the opengl example, i was able to reduce to this:

Code: [Select]

#include <GL/glew.h>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML OpenGL", sf::Style::Default, sf::ContextSettings(32));

    sf::Image backgroundImage;
    backgroundImage.LoadFromFile("resources/background.jpg"); //comment out to get segfault
   
    GLuint vertex_shader;
    vertex_shader = glCreateShader(GL_VERTEX_SHADER);

    return EXIT_SUCCESS;
}


It seems that some OpenGL/GLEW initialisation is unclean - there is a segfault when the marked piece of code is commented out. Of course, you need to have some backround.jpg in working-directory/resources.

Is this just something I'll have to work around in SFML2/Go back to SFML 1.6 for, or has someone had this kind of problem before?[/code]

Pages: [1]