Showing posts with label OpenGL. Show all posts
OpenGL ES with Raspberry PI
+ you need to have rootfs of RPI on host, openg es framework on RPI rootfs /opt/vc/lib folder
+ source code get from here
- change SDKSTAGE in Makefile to your RPI'rootfs
+ build app as bellow
#source build environment
TOOLCHAIN_DIR=/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64
export PATH=$PATH:${TOOLCHAIN_DIR}/bin
#build
make
#copy to boar via scp command on host
scp -r your_opengles_app_on_host pi@192.168.1.3:/home/pi/
#terminal on RPI
export LD_LIBRARY_PATH=/opt/vc/lib
run_your_opengles_app
Lập trình OpenGL/ES cơ bản
Download examples source code
- LinuxX11
- GLES2.0
Download here
OpenGL ES 2.0 and GLSL
- OpenGL ES 2.0 API Quick Reference Card
- The OpenGL® ES Shading Language
- OpenGL ES 2.0 Reference Pages
- Vertex/fragment shader
- Vertex and Texcoord
- Texture
- Program object
- Draws
- Viewport
- MVP matrix
- Transform
- Render 3D object
Project
- Car cluster display
Ứng dụng OpenGL Helloworld
Download examples source code
- LinuxX11
- GLES2.0
Ở phần này chúng ta sẽ xem các ví dụ sử dụng OpenGL ES 2.0
- OpenGL ES 2.0 API Quick Reference Card
- The OpenGL® ES Shading Language
- OpenGL ES 2.0 Reference Pages
Note: Để build và chạy được các ví dụ dưới đây các thư viện OpenGL và liên quan cần được install trước, xem lại tại đây.
LinuxX11 examples:
GLES2.0 examples:
- LinuxX11
- GLES2.0
Ở phần này chúng ta sẽ xem các ví dụ sử dụng OpenGL ES 2.0
- OpenGL ES 2.0 API Quick Reference Card
- The OpenGL® ES Shading Language
- OpenGL ES 2.0 Reference Pages
Note: Để build và chạy được các ví dụ dưới đây các thư viện OpenGL và liên quan cần được install trước, xem lại tại đây.
LinuxX11 examples:
$ make
$ cd Chapter_2/Hello_Triangle/
$ ./CH02_HelloTriangle
122 frames rendered in 2.0049 seconds -> FPS=60.8524
120 frames rendered in 2.0098 seconds -> FPS=59.7080
120 frames rendered in 2.0148 seconds -> FPS=59.5586
119 frames rendered in 2.0032 seconds -> FPS=59.4038
GLES2.0 examples:
$ make -f Makefile.x11
$ cd 01_SimpleTriangle/
$ ./01_SimpleTriangle
Tag :
OpenGL