/usr/ports/x11/nvidia-driver
/usr/ports/x11/nvidia-settings
/usr/ports/x11/nvidia-xconfig
nvidia_load="YES"
Section "ServerLayout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/local/share/X11/rgb"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
FontPath "/usr/local/lib/X11/fonts/local/"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "freetype"
Load "type1"
EndSection
Section "ServerFlags"
Option "Xinerama" "0"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
#DisplaySize 310 230 # mm
### Comment all HorizSync and VertRefresh values to use DDC:
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Philips PH107C/F/H/T6"
HorizSync 30.0 - 71.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection
Section "Device"
### Available Driver options are:-
### Values: : integer,
###
### [arg]: arg optional
#Option "SWcursor" # [
#Option "HWcursor" # [
#Option "NoAccel" # [
#Option "ShadowFB" # [
#Option "UseFBDev" # [
#Option "Rotate" # [
#Option "VideoKey" #
#Option "FlatPanel" # [
#Option "FPDither" # [
#Option "CrtcNumber" #
#Option "FPScale" # [
#Option "FPTweak" #
#Option "DualHead" # [
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "NV43 [GeForce 6600]"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 6600"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "CRT: 1024x768_85 +0+0; CRT: 1024x768 +0+0"
SubSection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
#Section "Extensions"
# Option "Composite" "Enable"
#EndSection
为了测试3D加速效果,安装了如下ports
/usr/ports/graphics/mesa-demos
glxinfo glxpears等测试程序都是在这个ports中,但是在make时,在一些测试程序中报错无法继续进行下去,主要是一些 ...MESA 函数,查看 /usr/local/include/GL/glx.h 文件,里面也不存在对应的函数,费了一番周折进行了修改,但是整体编译还是不成功。
细究了一下 GL 对应的头文件,发现在nvidia驱动安装以后,nvidia不同程度的覆盖了原来系统的MESA3D的一些文件。
both libGL-7.0.1 and nvidia-driver-100.14.19,也就是两个ports都包含这个,从日期上看,nvidia的覆盖了原来的。
libGL-7.0.1的文件列表如下:
Information for libGL-7.0.1:
Files:
/usr/local/include/GL/gl.h
/usr/local/include/GL/glext.h
/usr/local/include/GL/glx.h
/usr/local/include/GL/glxext.h
文件列表如下:
Information for libGLU-7.0.1:
Files:
/usr/local/include/GL/glu.h
/usr/local/share/doc/NVIDIA_GLX-1.0/gl.h
/usr/local/share/doc/NVIDIA_GLX-1.0/glext.h
/usr/local/share/doc/NVIDIA_GLX-1.0/glx.h
/usr/local/share/doc/NVIDIA_GLX-1.0/glxtokens.h
我想这可能是mesa-demos没有安装成功的一个原因,但没有具体的确定
小节:OPENGL的库还是蛮复杂的,感觉里面也是有不少的陷阱
附上nvidia-driver的文件列表,以后参考:-)
Information for nvidia-driver-100.14.19:
Files:
/usr/local/lib/libXvMCNVIDIA.a
/boot/modules/nvidia.ko
/usr/local/share/doc/NVIDIA_GLX-1.0/README
/usr/local/share/doc/NVIDIA_GLX-1.0/XF86Config.sample
/usr/local/share/doc/NVIDIA_GLX-1.0/gl.h
/usr/local/share/doc/NVIDIA_GLX-1.0/glext.h
/usr/local/share/doc/NVIDIA_GLX-1.0/glx.h
/usr/local/share/doc/NVIDIA_GLX-1.0/glxtokens.h
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-a.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-b.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-c.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-d.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-e.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-f.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-g.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-h.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-i.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/appendix-j.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-01.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-02.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-03.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-04-section-02.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-04.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-05.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-06.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-07.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-08.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/index.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-09.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-10.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-11.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-12.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-13.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-14.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-15.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-16.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-17.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-18.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-19.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-20.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-21.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-22.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-23.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/chapter-24.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/part-01.html
/usr/local/share/doc/NVIDIA_GLX-1.0/html/part-02.html
/usr/local/share/doc/NVIDIA_GLX-1.0/license.txt