Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3990886
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:32:55+00:00 2026-05-20T06:32:55+00:00

We have an application with multiple windows on different screens using 3 graphic cards.

  • 0

We have an application with multiple windows on different screens using 3 graphic cards. Each window uses opengl to render fonts, images etc…
This works very well so far, except for sharing resources. we tried to implement something like this (fenster is a custom class to store information like context, etc…):

//a list of display names
vector<string> displays;
displays.push_back(":0.0");
displays.push_back(":0.1");
displays.push_back(":0.2");
displays.push_back(":0.3");    
displays.push_back(":0.4");


//and then we loop them
FOREACH(string dispName in displays): //dummy code

static int dblBuf[]  = {GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None};

Display* disp;
if(dispName != "default")
    disp = XOpenDisplay(dispName.c_str());
else
    disp = XOpenDisplay(NULL);

if(disp == NULL)
{
    cout << "ERROR GETING DISPLAY " << dispName << endl;
    return NULL;
}

cout << "CREATING WINDOW ON SCREEN "<< dispName << endl;

XVisualInfo *vi = glXChooseVisual(disp, DefaultScreen(disp), dblBuf);

fenster->display = disp;

fenster->window = XCreateSimpleWindow(disp, RootWindow(disp, vi->screen), 1, 1, 500, 500, 0, BlackPixel (disp, 0), BlackPixel(disp, 0));

XSetStandardProperties(fenster->display, fenster->window, "main", "main", None,NULL, 0, NULL);

XMapWindow(disp, fenster->window);

if(fensterList.size()==0)
    fenster->glXContext = glXCreateContext(disp, vi, NULL, GL_TRUE);
else
    fenster->glXContext = glXCreateContext(fensterList[0]->display, vi, fensterList[0]->glXContext, GL_TRUE);

XSelectInput(disp, fenster->window, ButtonPressMask|KeyPressMask);

glXMakeCurrent(disp, fenster->window, fenster->glXContext);

glEnable(GL_DEPTH_TEST);
glClearColor(0.0, 0.0, 0.0, 0.0);

XFlush(disp);

fenster->id = fensterList.size();

fensterList.push_back(fenster);

fenster->setup();

This compiles fine, but produces the following error on runtime:

CREATING WINDOW ON SCREEN :0.0
CREATING WINDOW ON SCREEN :0.1
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 137 (GLX)
  Minor opcode of failed request: 3 (X_GLXCreateContext)
  Serial number of failed request: 90
  Current serial number in output stream: 91

The code works when I try to create multiple windows on the same desktop (using display :0.0).

The system is ubuntu 10.10, using the proprietary ATI driver.

Any ideas? Is it even possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:32:55+00:00Added an answer on May 20, 2026 at 6:32 am

    From http://www.opengl.org/sdk/docs/man/xhtml/glXCreateContext.xml :

    BadMatch is generated if the context to be created would not
    share the address space or the screen of the context specified by shareList.

    The spec wording suggests this should work if you have direct rendering contexts and they’re all created by the same process, but in practice the X server and/or libGL might think differently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Swing application in which I have multiple windows with different goals
Hi all i am developing a chat application ... i have multiple chat windows
I have a Windows Forms (.NET) application that can have multiple documents open simultaneously.
I have an application with multiple forms, each form has the same icon, so
I have an application that has multiple states, with each state responding to input
I have a Windows Mobile application written in Java that uses AWT for the
Problem : I have multiple instances of the same C# application running on different
I have an application with multiple views. I can click on different buttons to
I have an ASP.NET application running on IIS 7 and using Windows Authentication. For
I have an application with multiple "pick list" entities, such as used to populate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.