Ticket #1310: glteapot.patch
File glteapot.patch, 1.0 KB (added by , 17 years ago) |
---|
-
src/apps/glteapot/ObjectView.cpp
98 98 { 99 99 ObjectView* ov = (ObjectView*)cookie; 100 100 101 102 while (acquire_sem_etc(ov->quittingSem,1,B_TIMEOUT,0) == B_NO_ERROR) {101 int noPause = 0; 102 while (acquire_sem_etc(ov->quittingSem, 1, B_TIMEOUT, 0) == B_NO_ERROR) { 103 103 if (ov->SpinIt()) { 104 104 ov->DrawFrame(noPause); 105 105 release_sem(ov->quittingSem); … … 373 373 float f[3]; 374 374 f[1] = f[2] = 0; 375 375 for (int i = 0; i < fObjects.CountItems(); i++) { 376 f[0] = (255 - i) / 255.0;376 f[0] = (255 - 8 * i) / 255.0; 377 377 ((GLObject*)fObjects.ItemAt(i))->Draw(true, f); 378 378 } 379 379 glReadBuffer(GL_BACK); … … 381 381 glReadPixels((GLint)p.x, (GLint)(Bounds().bottom - p.y), 1, 1, 382 382 GL_RGB, GL_UNSIGNED_BYTE, pixel); 383 383 int objNum = pixel[0]; 384 objNum = 255 - objNum;384 objNum = (255 - objNum) / 8; 385 385 386 386 EnforceState(); 387 387 UnlockGL();