From: Brian P. <br...@tu...> - 2002-01-23 23:21:02
|
You never said if you're using Mesa or Sun's OpenGL. But since you're posting here, I'll assume Mesa. Try the following before running the program: setenv MESA_RGB_VISUAL "TrueColor 8" or export MESA_RGB_VISUAL="TrueColor 8" depending on the shell you're using. This environment variable will force Mesa to choose an 8-bit TrueColor visual (which xdpyinfo reports that you have) instead of an 8-bit PseudoColor visual. The reason Mesa prefers a PseudoColor visual over a TrueColor visual is to eliminate colormap flashing. xpyinfo reports that your screen has one colormap and that the default/root visual is PseudoColor. If Mesa were to choose any visual besides the 8-bit PseudoColor visual then you'd see colormap flashing whenever focus goes in or out of your OpenGL window (because colormaps can't be shared among windows with different visual classes). In this case, you'll just have to put up with colormap flashing since the program won't run any other way. Of course, you could modify the program to do something more intelligent in the getShareableColormap() function. Another possibility is to try running your X display at 16 or 24 bpp. But I have no idea what kind of graphics hardware you have. -Brian Lily Tse wrote: > > hi, > i already ran xdpyinfo. However, i am not sure how to interpret > the information to know whether or not TrueColor visuals can be > seen. Also, i am not sure how to modify the program so that it can run > with TrueColor. > Someone suggested the deletion of GLX_DEPTH_SIZE, 12 from > static int snglBuf[] = {GLX_RGBA, GLX_DEPTH_SIZE, 12, GLX_RED_SIZE, 1, > None}; > and > static dblBuf[] = {GLX_RGBA, GLX_DEPTH_SIZE, 12, GLX_RED_SIZE, 1, None}; > in the program. > I did what he suggested. However, i get the same error > message. I am attaching a copy of the > program code "glw.c" and the output of running xdpyinfo. Please take a > look at both of these files and give me further advices on how to solve > the "Error: no support for non-TrueColor visual." Thanks for all your > time. > > LT > > > Lily Tse wrote: > > > > > > hi, > > > i tried compiling a file name "glw.c" on Solaris. The executable was > > > generated. However, when i run the executable, i get the error message > > > "Error: no support for non-TrueColor visual". Does anyone know what this > > > message mean and how this problem can be solved? Thanks > > > > Run xdpyinfo or glxinfo and look if any PseudoColor or StaticColor > > visuals are listed. > > > > You're probably running with a 24-bit or 16-bit/pixel display configuration. > > This basically limits you to TrueColor and DirectColor visuals since nobody > > has hardware with 16 or 24-bit color look-up tables. > > > > You'll probably have to run your display at 8bpp in order to get around > > that error, or modify the application itself so it can run with TrueColor. > > > > -Brian > > > > Lily Tse > lt...@ch... > > ------------------------------------------------------------------------------ > Name: glw.c > glw.c Type: text (TEXT/PLAIN) > Encoding: BASE64 > > Name: xdpy > xdpy Type: text (TEXT/PLAIN) > Encoding: BASE64 |