Home | Info | Community | Development | myReactOS | Contact Us
[static]
Write the hit record.
Write the hit record, i.e., the number of names in the stack, the minimum and maximum depth values and the number of names in the name stack at the time of the event. Resets the hit flag.
Definition at line 255 of file feedback.c.
Referenced by _mesa_InitNames(), _mesa_LoadName(), _mesa_PopName(), _mesa_PushName(), and _mesa_RenderMode().
{ GLuint i; GLuint zmin, zmax, zscale = (~0u); /* HitMinZ and HitMaxZ are in [0,1]. Multiply these values by */ /* 2^32-1 and round to nearest unsigned integer. */ assert( ctx != NULL ); /* this line magically fixes a SunOS 5.x/gcc bug */ zmin = (GLuint) ((GLfloat) zscale * ctx->Select.HitMinZ); zmax = (GLuint) ((GLfloat) zscale * ctx->Select.HitMaxZ); WRITE_RECORD( ctx, ctx->Select.NameStackDepth ); WRITE_RECORD( ctx, zmin ); WRITE_RECORD( ctx, zmax ); for (i = 0; i < ctx->Select.NameStackDepth; i++) { WRITE_RECORD( ctx, ctx->Select.NameStack[i] ); } ctx->Select.Hits++; ctx->Select.HitFlag = GL_FALSE; ctx->Select.HitMinZ = 1.0; ctx->Select.HitMaxZ = -1.0; }