LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-14-2005, 07:52 PM   #1
damien
Member
 
Registered: Sep 2003
Location: Calgary, Canada
Distribution: Slackware 10.0
Posts: 90

Rep: Reputation: 15
Some help for anyone having trouble with OpenGL, nVidia cards and Xorg


I could get flamed for stating the obvious here, but in my Gentoo 64 installation this was giving me the screaming heebies until I fixed it 5 minutes ago.

No matter what I did, emerge out the wazoo, whatever, I couldn't get OpenGL working on my GF5200 card and Xorg. Glxinfo complained about not being able to find RGB, and so on. I finally found the problem (in /var/log/Xorg.0.log).

NVidia OpenGL apparently only works in 16 or 24-bit. When my KDE session started up, it would change resolutions on me before settling down, and nothing GL-based would work. The reason is that no matter what your "Display" Depth is set to in the Screen section of Xorg.conf, it needs a DefaultDepth entry of 16 or 24 for OpenGL to load properly. Mine looks like this:

Section "Screen"
Identifier "Screen0"
Device "NVidiaCard"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1600x1200"
EndSubSection
EndSection

Hope this helps someone.

Damien
 
Old 01-14-2005, 11:35 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
That is true. You see, 32bit color isn't really 32bit color, it is 24bit color with an 8 bit Z-buffer (if you don't believe me then load up windows sometime and look at the actual number of colors in 24 and 32 bit mode... yes they are the same). It is my understanding that the nvidia driver assumes the buffer so it uses a max of 24 bit color.
 
Old 01-14-2005, 11:43 PM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Ok... I need to clarify... some graphics card people use the extra 8 bits in "32-bit" color for a Z-Buffer (or sometimes other buffers). I believe nVidia does this, but I'm not totally sure.

The biggest reason for 32bit color originally was so that the data would always by aligned in a single word. For example... if you have 24bit color (24 bit color = true color = 16,777,216 colors) then three colors held in memory back to back would look something like this:

0x00 11 11 11 22
0x01 22 22 33 33
0x02 33 xx xx xx

I hope this wasn't too confusing.... but the whole point is the 2nd and 3rd colors overlap the word boundries and thus it is much more difficult to get access to the data on a machine with 32bit words (you need both words in memory instead of just one.. which means you end up loading 64bits of data to access 24bits in a lot of cases).

In 32 bit color you insure each one gets a full word, and you never have to deal with things crossing word boundries. This trick also works for 64 bit machines because the size of a color is evenly divisible by the word size.

My understanding from nVidia Tech support is that they byte align there colors by default so all you are setting is the actual number when you set the display mode.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xorg server (fglrx) SEGV calling openGL finidi Linux - Hardware 4 06-29-2005 10:55 AM
xorg 6.8.2 and OpenGL blackgenesis Slackware 4 04-11-2005 06:28 PM
opengl problem on xorg 6.7 with ati radeon 8500 olkku486 Linux - Hardware 3 12-15-2004 03:33 PM
Having trouble with 3D or OpenGL support Nic-MDKman Linux - General 4 04-14-2004 08:42 PM
nvidia opengl sodamnmad Programming 1 09-30-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration