+ set_clamp_to_edge();
+ if (field == 0) {
+ if (global_flags.can_disable_srgb_decoder) { // See the comments in tweaked_inputs.h.
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB8_ALPHA8, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
+ } else {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
+ }
+ check_error();
+ }
+ break;
+ case bmusb::PixelFormat_8BitYCbCrPlanar:
+ glBindTexture(GL_TEXTURE_2D, userdata[i].tex_y[field]);
+ check_error();
+ set_clamp_to_edge();
+ if (field == 0) {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, width, height, 0, GL_RED, GL_UNSIGNED_BYTE, NULL);
+ check_error();
+ }
+
+ glBindTexture(GL_TEXTURE_2D, userdata[i].tex_cb[field]);