projects
/
clouds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Report
[clouds.git]
/
clouds.cpp
diff --git
a/clouds.cpp
b/clouds.cpp
index 5787181c79fbac832a0984d362a654eaaa6ae619..b8ea3f0071cb0f0e5ce34bdfd48e44b17151edbd 100644
(file)
--- a/
clouds.cpp
+++ b/
clouds.cpp
@@
-169,8
+169,6
@@
const int shadeWidth = 256, shadeHeight = 256;
#ifdef PBO
const int numPbos = 512;
GLuint pboBufs[numPbos];
#ifdef PBO
const int numPbos = 512;
GLuint pboBufs[numPbos];
-GLuint pboOffsets[numPbos]; // offsets into GL_PIXEL_PACK_BUFFER that
- // mapPixelRead should read from
GLbyte sink[shadeWidth * shadeHeight * 4];
void inline mapPixelRead(int pboBuf, int metaball) {
GLbyte sink[shadeWidth * shadeHeight * 4];
void inline mapPixelRead(int pboBuf, int metaball) {
@@
-178,8
+176,6
@@
void inline mapPixelRead(int pboBuf, int metaball) {
GLubyte *src =
(GLubyte *)glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0,
4 * sizeof(GLubyte), GL_MAP_READ_BIT);
GLubyte *src =
(GLubyte *)glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0,
4 * sizeof(GLubyte), GL_MAP_READ_BIT);
- /* (GLubyte *)glMapBufferRange(GL_PIXEL_PACK_BUFFER, pboOffsets[pboBuf], */
- /* 4 * sizeof(GLubyte), GL_MAP_READ_BIT); */
vec4 pixel = vec4(src[0], src[1], src[2], src[3]) / vec4(255.f);
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
vec4 pixel = vec4(src[0], src[1], src[2], src[3]) / vec4(255.f);
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
@@
-274,10
+270,7
@@
void shadeClouds() {
/* glReadPixels(screenPos.x, screenPos.y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE,
*/
/* NULL); */
/* glReadPixels(screenPos.x, screenPos.y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE,
*/
/* NULL); */
- /* glReadPixels(0, 0, shadeWidth, shadeHeight, GL_RGBA, GL_UNSIGNED_BYTE, */
- /* NULL); */
glReadPixels(screenPos.x, screenPos.y, 64, 64, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glReadPixels(screenPos.x, screenPos.y, 64, 64, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- /* pboOffsets[pboIdx] = screenPos.x * 4 + screenPos.y * shadeWidth * 4; */
int nextPbo = (pboIdx + 1) % numPbos;
if (i >= numPbos - 1) {
int nextPbo = (pboIdx + 1) % numPbos;
if (i >= numPbos - 1) {