26 #define GLES_VERSION 3
38 GL_CHECK(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
40 char method_string[128];
41 sprintf(method_string,
"Method: %s (%4.1f / 10.0 s)", method, current_time);
67 common_set_basedir(
"/data/data/com.arm.malideveloper.openglessdk.occlusionculling/files/");
75 text =
new Text(
"/data/data/com.arm.malideveloper.openglessdk.occlusionculling/files/", width, height);
83 (JNIEnv *env, jclass jcls)
92 static const char *methods[] = {
93 "Hierarchical-Z occlusion culling with level-of-detail",
94 "Hierarchical-Z occlusion culling without level-of-detail",
101 GL_CHECK(glInvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments));
108 phase = (phase + 1) % 3;
void render(unsigned width, unsigned height)
Functions for drawing text in OpenGL ES.
GLint GLsizei GLsizei height
void update(float delta_time, unsigned width, unsigned height)
Provides a platform independent high resolution timer.
void clear(void)
Removes the current string from the class.
void move_camera(float delta_x, float delta_y)
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_occlusionculling_OcclusionCulling_uninit(JNIEnv *, jclass)
void common_set_basedir(const char *basedir)
void set_culling_method(CullingMethod method)
void reset()
Resets the timer to 0.0f.
void addString(int xPosition, int yPosition, const char *string, int red, int green, int blue, int alpha)
Add a std::string to be drawn to the screen.
void set_show_redundant(bool enable)
GLsizei const GLenum * attachments
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_occlusionculling_OcclusionCulling_step(JNIEnv *env, jclass jcls)
float getInterval()
Returns the time passed since getInterval() was last called.
static void render_text(Text &text, const char *method, float current_time)
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
void draw(void)
Draw the text to the screen.
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_occlusionculling_OcclusionCulling_init(JNIEnv *env, jclass jcls, jint width, jint height)