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

Pages: [1]
1
Window / sf::Window crashes on linux with ATI graphics driver
« on: July 15, 2010, 04:44:59 am »
Hello,

I have built the SFML 2 snapshot successfully on openSUSE 11.2 with ATI linux x64 driver 10.6. However when I try the OpenGL sample, window crash when exiting application. The error message is
Code: [Select]
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server "�""
      after 151 requests (150 known processed) with 0 events remaining.
Segmentation fault


I check the source codes and find it occurs in the destructor of WindowImplX11. When call "XCloseDisplay(myDisplay);" the application crashes.

I also try it on another PC with openSUSE 11.2 and Nvidia driver 256.35. It works fine. So is it a driver bug of ATI ? Any suggestions?

Thanks!

2
Quote
I'd prefer if you still offered these as an option, but include a warning in the documentation that it may cause problems if SFML-Graphics is used with incorrect flags.


I agree. It is time to remove the deprecated OpenGL functions and move forward to the core profile. Although it can not be finished at one blow, we should start.

Quote
Yes, I'll definitely think about that for SFML 2.0.

Thanks for your attention!

3
http://www.opengl.org/registry/specs/ARB/glx_create_context.txt

The OpenGL 3.2 introduces the profile mechanism. Each profile is one subset of full OpenGL API. Now there are two profiles: core profile and compatibility  profile. The core profile removes lost of old functions. And the compatibility profile could be compatible with any old OpenGL versions.As a result, when create an OpenGL context, the profile should be specified.

Besides, there are two context flag:
GLX_CONTEXT_DEBUG_BIT_ARB and  GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB

"If the GLX_CONTEXT_DEBUG_BIT_ARB flag bit is set in
    GLX_CONTEXT_FLAGS_ARB, then a <debug context> will be created. Debug
    contexts are intended for use during application development, and
    provide additional runtime checking, validation, and logging
    functionality while possibly incurring performance penalties. The
    additional functionality provided by debug contexts may vary
    according to the implementation(fn). In some cases a debug context
    may be identical to a non-debug context.

    If the GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB is set in
    GLX_CONTEXT_FLAGS_ARB, then a <forward-compatible> context will be
    created. Forward-compatible contexts are defined only for OpenGL
    versions 3.0 and later. They must not support functionality marked
    as <deprecated> by that version of the API, while a
    non-forward-compatible context must support all functionality in
    that version, deprecated or not."


The profile and flag should be set in the attribute list, which is the last parameter of glXCreateContextAttribsARB.

So just add two options to ContextSetting and set them into the attribute list before calling glXCreateContextAttribsARB.

I have modified the SFML 2.0 snapshot and it works fine for me.

Thanks!

4
Hello,

I find that no option for context flag and profile version can be used in SFML 2.0 snapshot.
It is very easy to add them to ContextSettings and the attributes list for creating context.
I hope these two options could be added in the next release so that we can change the profile version for OpenGL 3.2 or later.

Thanks!

ZHAO Peng :wink:

Pages: [1]
anything