【OpenGL】MIPS平台上Linux系统中安装OpenGL 2.0库(Mesa库)

我用的系统是Fedora发型版的Linux系统,对其他版本的linux系统可能有一些地方有点差异。

下面就以Fedora系统为例:


1、安装libtool

输入命令:yum install libtool

2、安装glproto

解压命令:tar -xvf x11proto-gl_1.4.15.orig.tar.gz
进入:cd glproto-1.4.15
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
不用make直接:make install

3、安装dri2proto

解压命令:tar -xvf dri2proto-2.8.tar.bz2
进入:cd dri2proto-2.8
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
不用make
直接:make install

4、安装libdrm

解压命令:tar -xvf libdrm-2.4.40.tar.bz2
进入:cd libdrm-2.4.40
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install

5、安装xcb-proto

解压命令:tar -xvf xcb-proto_1.7.1.orig.tar.xz
进入:cd xcb-proto_1.7.1
./autogen.sh
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install

6、安装xcb-glx

解压命令:tar -xvf libxcb_1.8.1.ori.tar.gz
进入:cd libxcb_1.8.1
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install

7、安装xproto

解压命令:tar -xvf xproto-7.0.23.tar.gz
进入:cd xproto-7.0.23
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install

8、安装x11-xcb

解压命令:tar -xvf libx11_1.5.0.orig.tar.gz
进入:cd libx11_1.5.0
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install

以上都是mesa9.0的依赖库,所以要先装,不然mesa在configure时会出错。


在安装以上一些依赖库是会出现一些缺少另一些库的错误:

如:


上面的错误就是缺少了xtrans这样的库
你可以用命令:yum search xtrans来搜这样的库,
然后用:yum install xxx  来安装搜到的。

中去找缺的库,下载下来,解压在安装上,安装步骤如上面库的安装。

9、安装mesa9.0

解压命令:tar -xvf MesaLib-9.0.tar.bz2
进入:cd Mesa-9.0
./autogen.sh
修改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
去掉默认的驱动配置,因为我的显卡是用的 集成了ati的3200hd显卡,所以只需要与我配套的选项。否则configure无法通过。

./config --build=mips64el-unknown-linux-gnu --prefix=/usr/ --enable-gles1 --enable-gles2
后面的配置参数是打开OpenGL ES
make -j4
make install

安装成功后,可以用linux中自带的齿轮例子测试一下:

glxgears -info
可以看到以下内容:
  • GL_RENDERER = Gallium 0.4 on AMD RS780
  • GL_VERSION = 2.1 Mesa 9.0
  • GL_VENDOR = X.Org

搞定收工!






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值