/** * Creates the OpenGL ES 2.X context and builds the shaders. * @param raspitex_state A pointer to the GL preview state. * @return Zero if successful. */ static int blur_init(RASPITEX_STATE *state) { int rc = raspitexutil_gl_init_2_0(state); if (rc != 0) goto end; rc = raspitexutil_build_shader_program(&blur_shader); end: return rc; }
/** * Creates the OpenGL ES 2.X context and builds the shaders. * @param raspitex_state A pointer to the GL preview state. * @return Zero if successful. */ static int motion_init(RASPITEX_STATE *state) { int rc = raspitexutil_gl_init_2_0(state); if (rc != 0) goto end; rc = raspitexutil_build_shader_program(&motion_shader); //Call initialisation functions in c++ part (Graphics.cpp) InitTextures(state->width, state->height); InitShaders(); end: return rc; }