occlusion

iPhone iOS5 querying OpenGL ES 2.0 pipeline objects if they are hidden in the view or not…“Occlusion”

亡梦爱人 提交于 2019-12-04 07:02:16
EXT_occlusion_query_boolean is new with OS5.0, it looks to me like not a single person on the entire internet has posted about these new extensions nor used this code.... so here they are set up properly...which is not documented anywhere as far as i can tell... you can imagine how they would go in your code from this little sudo code here: import UIKit/UIKit.h import GLKit/GLKit.h import "GLProgram.h" GLuint testBox,hasBeenTested,theParams; //... glGenQueriesEXT(1, &testBox); glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, testBox); //... draw an object ....... glEndQueryEXT(GL_ANY_SAMPLES_PASSED

OpenGL: How to determine if a 3D (rendered) point is occluded by other 3D (rendered) primitives in front of it?

删除回忆录丶 提交于 2019-12-03 16:17:47
In my OpenGL program, I am doing the following in sequence: // Drawing filled polyhedrons // Drawing points using GL_POINTS // Displaying information for each above point beside it For displaying the point information (say a point identifier/number), I convert the 3D coordinates of the point to 2D window coordinates using gluProject (). I write the point identifier at that 2D window location using glRasterPos () and 2D character rendering code. When a rendered point is occluded by another primitive, it is automatically not displayed due to automatic occlusion test and depth test that happens

ggplot2: how to transparently shade alternate days on a plot

旧时模样 提交于 2019-11-29 13:10:05
问题 What am I doing wrong here please? I'm trying to shade alternate 24-hr daily rectangles with transparent gray. But only the last rectangle from the for-loop gets drawn(?!?) If I do things manually instead of by for-loop it works fine. Is there a way to vectorize this to avoid the for-loop? (And can it be done with qplot?) I'm new to ggplot2 and yes I read through Hadley's site, book and examples. Second issue: the alpha setting on the aesthetic doesn't prevent the rectangles occluding the