Skip to content

Commit 7442f19

Browse files
committed
gles example
1 parent bbb20fe commit 7442f19

19 files changed

Lines changed: 268 additions & 86 deletions

‎bullet/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
*.data
12
*.png

‎linux/fb.c‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
/*
22
Framebuffer device /dev/fb0
33
4+
Adapted from:
5+
http://stackoverflow.com/questions/4996777/paint-pixels-to-screen-via-linux-framebuffer
6+
7+
More examples:
8+
9+
- https://github.com/prpplague/fb-test-app
10+
- https://gist.github.com/robmint/4753401
11+
- http://stackoverflow.com/a/14809058/895245
12+
413
https://en.wikipedia.org/wiki/Linux_framebuffer
514
615
To run this, you must:
@@ -13,10 +22,9 @@ To run this, you must:
1322
1423
Expected outcome: pink square is printed on screen.
1524
If any terminal text scrolls over it, those square get overwritten.
16-
Get rid of terminal for good: http://stackoverflow.com/questions/32620019/c-linux-how-to-takeover-the-framebuffer
17-
18-
Adapted from:
19-
http://stackoverflow.com/questions/4996777/paint-pixels-to-screen-via-linux-framebuffer
25+
Get rid of terminal for good:
26+
- http://stackoverflow.com/questions/32620019/c-linux-how-to-takeover-the-framebuffer
27+
- http://stackoverflow.com/questions/14805294/using-linux-framebuffer-for-graphics-but-disabling-console-text
2028
2129
Other things to try:
2230

‎linux/screenshot1.bmp‎

-900 KB
Binary file not shown.

‎linux/screenshot2.bmp‎

-900 KB
Binary file not shown.

‎linux/screenshot3.bmp‎

-900 KB
Binary file not shown.

‎linux/screenshot4.bmp‎

-900 KB
Binary file not shown.

‎opencl/implementations.md‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ There is a certain "installable client driver loader (ICD loader)" which forward
99
<http://www.x.org/wiki/XorgEVoC/GalliumCompute/>
1010

1111
Looks like the major open source implementation.
12-
13-
## pocl
14-
15-
Portable OpenCL implementation.
16-
17-
<https://github.com/pocl/pocl>
18-
19-
<http://portablecl.org/>
20-
2112
MIT and LLVM based.
2213

2314
## NVIDIA
@@ -44,15 +35,36 @@ Threads:
4435

4536
## Intel
4637

38+
<http://stackoverflow.com/questions/19141272/opencl-implementation-for-intel-core-i5-linux>
39+
4740
No official Linux packages.
4841

4942
- <http://askubuntu.com/questions/545763/installation-of-intel-opencl>
5043
- <http://askubuntu.com/questions/629456/intel-opencl-on-14-04>
5144

45+
Beignet looks like an open source implementation for Intel's embedded GPU: <https://www.freedesktop.org/wiki/Software/Beignet/> TODO reversed or documented?
46+
5247
## Altera FPGA
5348

5449
<https://www.altera.com/products/design-software/embedded-software-developers/opencl/overview.html>
5550

5651
## Transpiler
5752

5853
- <http://repo.or.cz/w/ppcg.git> C99 to OpenCL.
54+
55+
## CPU implementations
56+
57+
Slow but portable, and a sanity check that OpenCL is actually making anything faster:
58+
59+
### Clover
60+
61+
- <https://people.freedesktop.org/~steckdenis/clover/>
62+
63+
### pocl
64+
65+
Portable OpenCL implementation.
66+
67+
<https://github.com/pocl/pocl>
68+
69+
<http://portablecl.org/>
70+

‎opengl/README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
1. [GLUT](glut.md)
77
1. [Lightning](lightning.md)
88
1. [Ray tracing](ray-tracing.md)
9+
1. [Benchmarks](benchmarks.md)
10+
1. [Drivers](drivers.md)
911
1. Examples
1012
1. [GLUT hello world](hello_world.c)
1113
1. [info](info.c)
@@ -46,8 +48,7 @@
4648
1. [Infinite loop shader](glfw_infinite_loop_shader.c.off)
4749
1. [Memory overflow shader](glfw_memory_overflow_shader.c.off)
4850
1. [GLX](glx.c)
49-
1. Performance
50-
1. [Many triangles](many_triangles.c)
51+
1. Benchmarks
5152
1. [Many triangles animation](many_triangles_animation.c)
5253
1. [main](main.cpp)
5354
1. Mini projects

‎opengl/benchmarks.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Benchmarks
2+
3+
Since the raison d'etre of OpenGL is to have high performance, you will want to know how your application performs compared to some standardized benchmarks.
4+
5+
- <http://askubuntu.com/questions/31913/how-to-perform-a-detailed-and-quick-3d-performance-test>
6+
7+
Free:
8+
9+
- `glxgears`. `es2gears` from Ubuntu 16.04 `mesa-utils-extra` is an GLES2 implementation.
10+
- `glmark2`. Maintained by Linaro.
11+
- `phoronix`
12+
13+
Non free:
14+
15+
- GFXBench: <https://gfxbench.com/result.jsp>

‎opengl/configure‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
# Tested on Ubuntu 16.04.
23
sudo aptitude update
34
# Ubuntu 14.04: glfw3 not present in repos, only glfw 2.
5+
# Must compile yourself, good luck: http://stackoverflow.com/questions/17768008/how-to-build-install-glfw-3-and-use-it-in-a-linux-project
46
sudo aptitude install -y freeglut3-dev libglfw3-dev libglew-dev libopencv-dev

0 commit comments

Comments
 (0)