|
@@ -64,6 +64,7 @@ glxGraphicsStateGuardian(GraphicsEngine *engine, GraphicsPipe *pipe,
|
|
|
*/
|
|
*/
|
|
|
glxGraphicsStateGuardian::
|
|
glxGraphicsStateGuardian::
|
|
|
~glxGraphicsStateGuardian() {
|
|
~glxGraphicsStateGuardian() {
|
|
|
|
|
+ LightReMutexHolder holder(glxGraphicsPipe::_x_mutex);
|
|
|
destroy_temp_xwindow();
|
|
destroy_temp_xwindow();
|
|
|
if (_visuals != nullptr) {
|
|
if (_visuals != nullptr) {
|
|
|
XFree(_visuals);
|
|
XFree(_visuals);
|
|
@@ -224,6 +225,7 @@ choose_pixel_format(const FrameBufferProperties &properties,
|
|
|
X11_Display *display,
|
|
X11_Display *display,
|
|
|
int screen, bool need_pbuffer, bool need_pixmap) {
|
|
int screen, bool need_pbuffer, bool need_pixmap) {
|
|
|
|
|
|
|
|
|
|
+ LightReMutexHolder holder(glxGraphicsPipe::_x_mutex);
|
|
|
_display = display;
|
|
_display = display;
|
|
|
_screen = screen;
|
|
_screen = screen;
|
|
|
_context = nullptr;
|
|
_context = nullptr;
|
|
@@ -457,6 +459,7 @@ gl_get_error() const {
|
|
|
*/
|
|
*/
|
|
|
void glxGraphicsStateGuardian::
|
|
void glxGraphicsStateGuardian::
|
|
|
query_gl_version() {
|
|
query_gl_version() {
|
|
|
|
|
+ LightReMutexHolder holder(glxGraphicsPipe::_x_mutex);
|
|
|
PosixGraphicsStateGuardian::query_gl_version();
|
|
PosixGraphicsStateGuardian::query_gl_version();
|
|
|
|
|
|
|
|
show_glx_client_string("GLX_VENDOR", GLX_VENDOR);
|
|
show_glx_client_string("GLX_VENDOR", GLX_VENDOR);
|
|
@@ -483,6 +486,7 @@ query_gl_version() {
|
|
|
*/
|
|
*/
|
|
|
void glxGraphicsStateGuardian::
|
|
void glxGraphicsStateGuardian::
|
|
|
get_extra_extensions() {
|
|
get_extra_extensions() {
|
|
|
|
|
+ LightReMutexHolder holder(glxGraphicsPipe::_x_mutex);
|
|
|
save_extensions(glXQueryExtensionsString(_display, _screen));
|
|
save_extensions(glXQueryExtensionsString(_display, _screen));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -497,6 +501,8 @@ do_get_extension_func(const char *name) {
|
|
|
nassertr(name != nullptr, nullptr);
|
|
nassertr(name != nullptr, nullptr);
|
|
|
|
|
|
|
|
if (glx_get_proc_address) {
|
|
if (glx_get_proc_address) {
|
|
|
|
|
+ LightReMutexHolder holder(glxGraphicsPipe::_x_mutex);
|
|
|
|
|
+
|
|
|
// First, check if we have glXGetProcAddress available. This will be
|
|
// First, check if we have glXGetProcAddress available. This will be
|
|
|
// superior if we can get it.
|
|
// superior if we can get it.
|
|
|
|
|
|