🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24862

24 bit TrueColor solution

#24862
From: steritir
Date: Tue, 12 Jan 1993 22:29
25 lines
1060 bytes
I've solved the TrueColor visual problem by setting the depth to 12
instead of the default depth.

i.e.
    default_visual = DefaultVisual ( display, screen );
    switch ( default_visual->class ) {

    case PseudoColor:
      r = XMatchVisualInfo ( display, screen, depth, PseudoColor, &vis_info );
      break;
    case TrueColor:
      depth = 12;
      r = XMatchVisualInfo ( display, screen, depth, PseudoColor, &vis_info );
      break;
    default:
      printf ( " No visual found. \n");

    }
    if ( !r ) printf ( " Problem matching visual \n" );

    cmap = XCreateColormap ( display, parent, vis_info.visual, AllocAll );

thanks for the help.
Ron Steriti
UMass Lowell
Technical Details
Message-ID: <1993Jan12.172936.1@woods.ulowell.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ulowell!woods.ulowell.edu!steritir

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.x
Path: arc1-ca.pugleaf.net!sparky!uunet!ulowell!woods.ulowell.edu!steritir
From: steritir@woods.ulowell.edu
Subject: 24 bit TrueColor solution
Message-ID: <1993Jan12.172936.1@woods.ulowell.edu>
Lines: 26
Sender: usenet@ulowell.ulowell.edu (News manager - ulowell)
Organization: University of Lowell
Date: Tue, 12 Jan 1993 22:29:36 GMT