21 #ifndef _tessellation_h_
22 #define _tessellation_h_
82 #define get_attrib_location(prog, name) \
83 app->a_##prog##_##name = glGetAttribLocation(app->program_##prog, #name); \
84 if (app->a_##prog##_##name < 0) { \
85 printf("Invalid or unused attribute %s\n", #name); \
88 #define get_uniform_location(prog, name) \
89 app->u_##prog##_##name = glGetUniformLocation(app->program_##prog, #name); \
90 if (app->u_##prog##_##name < 0) { \
91 printf("Invalid or unused uniform %s\n", #name); \
94 #define attribfv(prog, name, n, offset) \
95 glEnableVertexAttribArray(app->a_##prog##_##name); \
96 glVertexAttribPointer(app->a_##prog##_##name, n, GL_FLOAT, GL_FALSE, \
97 n * sizeof(float), (void*)offset);
99 #define uniform1f(prog, name, value) glUniform1f(app->u_##prog##_##name, value);
100 #define uniform2f(prog, name, x, y) glUniform2f(app->u_##prog##_##name, x, y);
101 #define uniform3fv(prog, name, value) glUniform3fv(app->u_##prog##_##name, 1, &value[0]);
102 #define uniform1i(prog, name, value) glUniform1i(app->u_##prog##_##name, value);
103 #define uniformm4(prog, name, value) glUniformMatrix4fv(app->u_##prog##_##name, 1, GL_FALSE, value.value_ptr());
GLuint u_mapping_heightmap
GLuint u_backdrop_sun_dir
GLuint u_mapping_height_scale
void app_update_and_render(App *app)
GLuint u_mapping_projection
GLuint u_mapping_max_lod_coverage
GLuint u_backdrop_screen_size
GLuint a_mapping_position
void app_initialize(App *app)
GLuint u_backdrop_inv_tan_fov
GLuint u_mapping_screen_size
GLuint u_mapping_diffusemap
GLuint a_backdrop_position
typedef GLuint(GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC)(GLuint count