您的位置:首页 > 编程语言 > Qt开发

在qt框架中尝试用opengl绘制回波图像_20120518

2012-05-18 20:48 375 查看
1、在opengl中,可以将回波图像层、固定距标圈层、活动距标圈层、光标层进行叠加,每层像素点的深度值不一,从底层到上层依次设置为回波图像层、固定距标圈层、活动距标圈层、光标层。

2、首先要解决回波图像层的像素点的绘制问题。嵌入式opengl es2.0中,相关glReadPixels,glDrawPixels等像素操作函数的使用

在目前ti提供的库与头文件中,由于个别原因,暂时找不到支持相关的像素操作的文件;在xll的相关头文件中,有相关的说明,下面操作,尝试xll的demo在板子上的运行

查阅相关文档:/usr/local/dvsdk/omap35x_graphics/GFX_Linux_SDK/OGLES2/SDKPackage的帮助文档中第3.2. Linux节:If you want an X11 build and it is available,please:

cd /usr/local/dvsdk/omap35x_graphics/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/07_IntroducingPOD/OGLES2/Build/LinuxGeneric

export X11ROOT=/usr/local/dvsdk/omap35x_graphics/gfx_rel_es5.x/freedesktop/kdrive/usr/X11R6_SGX

export LIBDIR=/usr/local/dvsdk/omap35x_graphics/gfx_rel_es5.x

make PLATFORM=LinuxOMAP3 X11BUILD=1

把生成的文件放到板子上,运行前,进行如下设置:

vi /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost

export LD_LIBRARY_PATH=/usr/local/XSGX/lib:$LD_LIBRARY_PATH

export DISPLAY=:0.0

运行:

./OGLES2IntroducingPOD -posx=10 -posy=10 -width=100 -height=100
//出错

引用说明:http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide

If one has built and installed the graphics SDK with SUPPORT_XORG=1 option, then the EVM will boot up with omap-demo script run by default and installing the required Xorg driver and file system.

In case the demo script has not run, one can run it as /etc/init.d/omap-demo for OMAP devices. For AM335x run the demo script /etc/init.d/335x-demo.

If there are problems in installation, issue depmod -a command on linux command prompt and reboot. Now the Xorg drivers should be installed correctly.

To cross check whether system is fine(ready to run X apps) make sure lsmod command on EVM shows pvrsrvkm.ko, drm.ko inserted successfully and ps shows X process running.//当前的sdk找不到drm.ko文件
Issue commands export LD_LIBRARY_PATH=/usr/local/XSGX/lib and export DISPLAY=:0 on the EVM command prompt.//当前的sdk也找不XSGX文件夹
Now the system is ready to run any X app. One can run the unit test application present under /usr/local/XSGX/bin/glxgears to confirm the system is fine.

尝试新版本的sdk:Graphics_SDK_4_05_00_03
但:
make BUILD=release OMAPES=5.x SUPPORT_XORG=1 all

提示找不到:

/usr/local/dvsdk/a/Graphics_SDK_4_05_00_03/GFX_Linux_KM/services4/3rdparty/linux_drm/drm_global.c:34:24: error: drm_global.h : No such file or directory
经查阅,此文件在当前旧版本内核源代码中不存在
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: