Wade Olsen (wade++at++surf.shoreline-studios.com)
Tue, 8 Oct 1996 11:30:29 -0700
I'm trying to get an OpenGL GLX visual that has RGB and A, double buffer,
z-buffer, and as many multi-samples as I can get. I can use ircombine to
set up the framebuffer to a 800x600 VOF and gfxinfo tells me I have extra
large pixels, but findvis only shows visuals with alpha planes that have 4
multisamples (8 with no alpha planes). All the VOF's I'm running also have
Sirius video configured.
Any ideas? Seems like I should be able to get at least 8, maybe 16.
Here's the code where I configure the window:
window = new pfPipeWindow(pipe);
if (larchConfig.exists("windowConfig")) {
windowConfig = larchConfig.fetch("windowConfig");
}
int msample = 0; // Does this machine support multisampling
int samples_ix = 0;
pfQuerySys(PFQSYS_MAX_MS_SAMPLES, & msample);
Array<int> list;
list.add(GLX_RGBA);
list.add(GLX_DOUBLEBUFFER);
if (msample) // If supported, use multisamples
{
list.add(GLX_SAMPLE_BUFFERS_SGIS);
list.add(1);
list.add(GLX_SAMPLES_SGIS);
samples_ix = list.size();
list.add(16);
}
list.add(GLX_RED_SIZE);
list.add(1);
list.add(GLX_GREEN_SIZE);
list.add(1);
list.add(GLX_BLUE_SIZE);
list.add(1);
list.add(GLX_ALPHA_SIZE);
list.add(1);
list.add(GLX_DEPTH_SIZE);
list.add(1);
list.add(None);
if (msample) // Find the visual with the most multi-samples
{
Display * display = XOpenDisplay("");
XVisualInfo * info;
while ((info = glXChooseVisual(display, 0, list)) == 0)
{
if (list[samples_ix] == 0)
break;
list[samples_ix] /= 2;
}
if (info)
XFree(info);
}
window->setFBConfigAttrs(list);
--
-----------------------------
Wade Olsen, Shoreline Studios
e-mail: wade++at++shoreline-studios.com
phone: 415-969-7896
fax: 415-969-7864
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:44 PDT