多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 图文详解OpenGL在Jetson TK1上的安装和使用 ### 1、入门介绍与资源推介 OpenGL(全写Open Graphics Library)是个定义了一个跨编程语言、跨平台的编程接口规格的专业的图形程序接口。它用于三维图像(二维的亦可),是一个功能强大,调用方便的底层图形库。 OpenGL ES (OpenGL for Embedded Systems) 是 OpenGL 三维图形 API 的子集,针对手机、PDA和游戏主机等嵌入式设备而设计。该API由Khronos集团定义推广,Khronos是一个图形软硬件行业协会,该协会主要关注图形和多媒体方面的开放标准。 下面推荐学习OpenGL的一些网址: **OpenGL tutorial**:[http://www.opengl-tutorial.org/](http://www.opengl-tutorial.org/) **OpenGL samples**:[https://github.com/NVIDIAGameWorks/OpenGLSamples](https://github.com/NVIDIAGameWorks/OpenGLSamples) **Cross-platform OpenGL and OpenGL ES samples (for Windows, Android, and Linux)**:[https://developer.nvidia.com/gameworks-opengl-samples](https://developer.nvidia.com/gameworks-opengl-samples) **OpenGL study documentation**:[http://docs.nvidia.com/gameworks/index.html#gameworkslibrary/graphicssamples/opengl_samples/opengl_index.htm](http://docs.nvidia.com/gameworks/index.html#gameworkslibrary/graphicssamples/opengl_samples/opengl_index.htm) ### 2、OpenGL Graphics and Compute Samples下载 下载地址:[https://developer.nvidia.com/gameworksdownload#?tx=$gameworks,graphics_library$graphics_api,opengl_4.3](https://developer.nvidia.com/gameworksdownload#?tx=$gameworks,graphics_library$graphics_api,opengl_4.3) 如下图所示: ![](https://box.kancloud.cn/2016-05-07_572d61723c457.jpg) The OpenGL Graphics and Compute Samples pack is a resource for cross-platform OpenGL 4 (GL4) and OpenGL ES 2 and 3 (ES2 and ES3) development, targeting Android, Windows, and Linux (x86/x64 and Linux for Tegra). The samples run on all four target platforms from a single source base. ### 3、OpenGL Samples Prerequisites ![](https://box.kancloud.cn/2016-05-07_572d61725fdcf.jpg) ### 4、OpenGL Samples Setup Guide 将下载好的gl-graphics-compute-samples-linux-2.0拷贝到Jetson TK1平台中,如下图: ![](https://box.kancloud.cn/2016-05-07_572d617270d8b.jpg) ![](https://box.kancloud.cn/2016-05-07_572d61728ca52.jpg) 解压samples pack并且把它移到工作目录,如下图: ![](https://box.kancloud.cn/2016-05-07_572d6172a509a.jpg) ![](https://box.kancloud.cn/2016-05-07_572d6172b53bd.jpg) Install the Linux target pre-requisites: ![](https://box.kancloud.cn/2016-05-07_572d6172ce6d4.jpg) ![](https://box.kancloud.cn/2016-05-07_572d6172dfc9a.jpg) ~~~ sudo apt-get update(this is critical, or else the next line will do nothing) sudo apt-get install g++ ~~~ 进入目录make: ![](https://box.kancloud.cn/2016-05-07_572d617304b3c.jpg) 生成的apps位于..../samples/bin/linux-arm32/,如下图所示: ![](https://box.kancloud.cn/2016-05-07_572d61731a337.jpg) ### 5、示例演示 进入apps所在的目录后,./xxxx即可,以Bindless Graphics Sample为例,演示结果如下图所示: ![](https://box.kancloud.cn/2016-05-07_572d6173308cc.jpg)