Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2707690
  • 博文数量: 505
  • 博客积分: 1552
  • 博客等级: 上尉
  • 技术积分: 2514
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-23 18:24
文章分类

全部博文(505)

文章存档

2019年(12)

2018年(15)

2017年(1)

2016年(17)

2015年(14)

2014年(93)

2013年(233)

2012年(108)

2011年(1)

2009年(11)

分类: LINUX

2013-03-05 20:09:34

  • 这里龙芯3a指rs780e开发板,板上集成了ati的3200hd显卡
  • 要使用最新版龙芯内核,其中集成了相关drm驱动
  • 本文以debian系统为范例
  • 顺序安装以下软件(有些在文件系统中已经有了,但是版本偏低,请至少更新到本文指定的版本):
    • libtool
      • apt-get install libtool
    • glproto
      • tar -xvf x11proto-gl_1.4.15.orig.tar.gz
      • cd glproto-1.4.15
      • ./configure --build=mips64el-unknown-linux-gnu
      • 不用编译,直接安装:make install
    • dri2proto
      • ./configure --build=mips64el-unknown-linux-gnu
      • 直接安装:make install
    • libdrm
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • xcb-proto
      • ./autogen.sh
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • xcb-glx
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • xproto
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • x11-xcb
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • 显卡驱动
    • mesa 9.0
      • mesa就是openGL的一个实现,需要新版,才能支持openGL 2.0
      • 以上各软件都是mesa 9.0的依赖库,所以要先装,不然mesa在configure时会报错退出。
      • 如果此时mesa的configure还是报缺少依赖库的错误,按照提示安装即可。
      • 两个有用的网站,可以找到大多依赖库的源码:
      • mesa 9.0的下载链接:
      • 修改configure文件,去掉默认的驱动配置中,intel相关选项(否则configure无法通过):
    # default drivers
    if test "x$DRI_DIRS" = "xyes"; then
        DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
    fi
修改为:
	# default drivers
    if test "x$DRI_DIRS" = "xyes"; then
        DRI_DIRS=" nouveau r200 radeon swrast"
    fi
      • 比较特别的配置参数,打开openGL es(也许不打开也行)
        • ./configure --build=mips64el-unknown-linux-gnu --enable-gles1 --enable-gles2
      • make -j4
      • make install
    • 终于安装成功,但是软件运行时似乎没有成功调用到我们刚安装的openGL 2.0
      • 因为系统中之前可能用apt-get安装了旧版的mesa,其默认目录为/user/lib
      • 我们编译并安装的mesa,默认目录为/user/local/lib,如果通过prefix参数强制指定为/user/lib,则无法顺利安装,报错说只能安装在/user/local/lib
      • 解决方法是,把apt方式安装的mesa卸载掉:
        • apt-get remove libglu1-mesa
        • 卸载掉的不只是openGL,还包括几个其他软件,以后需要用的时候可以单独装
  • openGL 2.0安装成功,来确认一下成果:
    • glxgears -info
      • 可以看到这几行输出:
        • GL_RENDERER = Gallium 0.4 on AMD RS780
        • GL_VERSION = 2.1 Mesa 9.0
        • GL_VENDOR = X.Org

原文链接:http://www.loongson.cn/dev/wiki/OpenGL2.0

阅读(1721) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~