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 - jeoffrey0522

Pages: [1]
1
General / Re: AW: Having a problem with glGenBuffers(...)
« on: December 20, 2014, 10:51:31 am »
Run a debugger, find the origin of the segfault and provide the call stack.

Also provide your full build command.
This is a runtime error(not compile-time), and this problem is related with OpenGL context creation in SFML.
Also, the segment fault was appeared at glGenBuffers().

2
General / Having a problem with glGenBuffers(...)
« on: December 20, 2014, 10:07:20 am »
Hello. I was just trying to do some kind of GPGPU Computing with OpenGL and OpenCL(you don't have to know about OpenCL),
and I created a VBO(vertex buffer object) before creating a window.

GLuint vbo;
glGenBuffers(1,&vbo);
 

But there was a segmentation fault and the program throwed an error.
So, I tried to create a VBO after creating window, but it doesnt' work neither. It worked only in the 'main loop', and I want to initialize everything before creating the window. What's the problem and how can I solve this?

 
int main()
{
        sf::Context context;//I think this code doesn't related with my problem.
        Fluid fluid;

        cout<<"main() - Window initalized"<<endl;
        sf::RenderWindow window(sf::VideoMode(1080, 720), "SFML works!",sf::Style::Titlebar|sf::Style::Close);

        //initialize something

    // The 'main loop'
    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        //draw and update something

    }

    //exit

}


*i'm not a native english speaker, so I'm sorry for my bad English.

Pages: [1]
anything