瀏覽代碼

libobs-opengl: Fix GS_A8 texture format

The non-internal format should be set to R8, and then swizzle is used to
set the red channel to the alpha channel.
jp9000 9 年之前
父節點
當前提交
ddc8e6fde2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libobs-opengl/gl-subsystem.h

+ 1 - 1
libobs-opengl/gl-subsystem.h

@@ -39,7 +39,7 @@ enum copy_type {
 static inline GLint convert_gs_format(enum gs_color_format format)
 static inline GLint convert_gs_format(enum gs_color_format format)
 {
 {
 	switch (format) {
 	switch (format) {
-	case GS_A8:          return GL_RGBA;
+	case GS_A8:          return GL_RED;
 	case GS_R8:          return GL_RED;
 	case GS_R8:          return GL_RED;
 	case GS_RGBA:        return GL_RGBA;
 	case GS_RGBA:        return GL_RGBA;
 	case GS_BGRX:        return GL_BGRA;
 	case GS_BGRX:        return GL_BGRA;