Revision 2845af2d
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/examples/save/SaveWorkerThread.java | ||
|---|---|---|
| 126 | 126 |
buf.position(( i)*width*4); // GL uses a coordinate system from mathematics; i.e. |
| 127 | 127 |
buf.get(tmp1); // (0,0) is in the lower-left corner. 2D stuff has |
| 128 | 128 |
buf.position((height-1-i)*width*4); // the origin on the upper-left corner; we have to flip |
| 129 |
buf.get(tmp2); // out bitmap upside down!
|
|
| 129 |
buf.get(tmp2); // our bitmap upside down!
|
|
| 130 | 130 |
|
| 131 | 131 |
buf.position(( i)*width*4); |
| 132 | 132 |
buf.put(tmp2); |
Also available in: Unified diff
Preparation for saving/reading Meshes to/from a file.