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

Pages: [1]
1
Graphics / Re: Drawing a textured 3D object breaks SFML text rendering
« on: August 25, 2013, 01:08:46 pm »
Great! I added:

   
    glBindBuffer( GL_ARRAY_BUFFER, 0 );
    glDisableVertexAttribArray( 0 );
    glUseProgram( 0 );
 

And now it works.

Also, If I use only  3.3 core   Can I remove pushGLStates/popGLStates saving a few nanoseconds/per frame?

2
Graphics / Re: Drawing a textured 3D object breaks SFML text rendering
« on: August 25, 2013, 10:52:35 am »
I were using SFML 2.0 and I just upgrade to 2.1, but the problem remains.

3
I writing a OpenGL game using SFML.

I'm using the push/pop function to combine OpenGL with SFML like the tutorial SFML+OpenGL but, when I added textures to my model, the SFML text rendering appears broken and wrong rendered.

The simplified loop I used is:
while( true ){
    glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

    mydraw();

    window->pushGLStates();
    window->draw( text );
    window->popGLStates();
    window->display();
}
 

Using this simple mydraw function causes the SFML text not drawing:

   
    glUseProgram( myprogram );
    glEnableVertexAttribArray( 0 );
    glBindBuffer( GL_ARRAY_BUFFER, verts_buffer );
    glVertexAttribPointer( 0, 3, GL_FLOAT, GL_FALSE, 0, nullptr );
 

If I commented out the mydraw call, the text is visible again.

Pages: [1]
anything