This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drawDepthPass(); | |
drawOcclusionQueries(); | |
populateScene(); | |
updateOcclusionQueries(); | |
drawScene(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uniform samplerCubeArrayShadow texture_shadowmap_cube; | |
/** | |
* @return The fraction of the sample that is _not_ shadowed (0.0 - 1.0). | |
*/ | |
float sample_shadowmap(in light_t light, in int index) { | |
// the position of the fragment in light space | |
vec4 position = vec4(light.model.xyz - vertex.model, 1.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
light_t light = lights[light_index]; | |
vec4 translate = vec4(-light.model.xyz, 0.0); | |
for (int i = 0; i < 6; i++) { | |
gl_Layer = light_index * 6 + i; | |
for (int j = 0; j < 3; j++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glBeginQuery(GL_ANY_SAMPLES_PASSED, query->name); | |
glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_INT, query->elements); // draw the AABB | |
glEndQuery(GL_ANY_SAMPLES_PASSED); | |
glGetQueryObjectiv(query->name, GL_QUERY_RESULT, &query->result); | |
if (query->result) { | |
// draw the object(s) the query was guarding | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief Updates and re-draws active occlusion queries for the current frame. | |
*/ | |
void R_UpdateOcclusionQueries(r_view_t *view) { | |
if (!r_occlude->integer) { | |
return; | |
} | |
if (view->flags & VIEW_FLAG_NO_DELTA) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<audio controls autoplay="autoplay"><source src="http:///shouthost.com.17.streams.bassdrive.com:8200/;stream.mp3" type="audio/mp3"> | |
Your browser does not support the audio element. | |
</audio> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Data *data = $(alloc(Data), initWithContentsOfFile, path); | |
Dictionary *dict = $$(JSONSerialization, objectFromData, data, 0); | |
Number *dataStoreInitConns = $$(JSONPath, objectWithPath, dict0, "$.web-app.servlet[0].init-param.dataStoreInitConns"); | |
assert(10 == (int) dataStoreInitConns->value); | |
release(data); | |
release(dict); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* config.h. Generated from config.h.in by configure. */ | |
/* config.h.in. Generated from configure.ac by autoheader. */ | |
/* Define to 1 to build a client. */ | |
#define BUILD_CLIENT 1 | |
/* Set to the canonical name of the target machine */ | |
#define BUILD_HOST "x86_64-darwin13.1.0" | |
/* Define to 1 to build a master server. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @brief Unwinds the surface, iterating all non-collinear vertices. | |
* | |
* @return The next winding point, or NULL if the face is completely unwound. | |
*/ | |
static const vec_t *R_UnwindBspSurface(const r_bsp_model_t *bsp, const r_bsp_surface_t *surf, | |
const vec_t *last) { | |
const int32_t *se = &bsp->surface_edges[surf->first_edge]; | |
const vec_t *v0 = R_BSP_VERTEX(bsp, *se)->position; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @brief Applies any configuration and tag alignment, populating the model-view | |
* matrix for the entity in the process. | |
*/ | |
static void R_SetMatrixForEntity(r_entity_t *e) { | |
vec_t *o = e->origin, *a = e->angles; | |
if (e->parent) { | |
vec3_t forward, tmp; |
NewerOlder