mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-01 23:05:19 +00:00
Enable trilinear filtering for OpenGL
Improve downscaling quality if mipmapping is available. Suggested-by: Giumo Clanjor (哆啦比猫/兰威举) <cjxgm2@gmail.com> Fixes #40 <https://github.com/Genymobile/scrcpy/issues/40> Ref: <https://github.com/Genymobile/scrcpy/issues/40#issuecomment-591917787>
This commit is contained in:
36
app/src/opengl.h
Normal file
36
app/src/opengl.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef SC_OPENGL_H
|
||||
#define SC_OPENGL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
struct sc_opengl {
|
||||
const char *version;
|
||||
bool is_opengles;
|
||||
int version_major;
|
||||
int version_minor;
|
||||
|
||||
const GLubyte *
|
||||
(*GetString)(GLenum name);
|
||||
|
||||
void
|
||||
(*TexParameterf)(GLenum target, GLenum pname, GLfloat param);
|
||||
|
||||
void
|
||||
(*TexParameteri)(GLenum target, GLenum pname, GLint param);
|
||||
|
||||
void
|
||||
(*GenerateMipmap)(GLenum target);
|
||||
};
|
||||
|
||||
void
|
||||
sc_opengl_init(struct sc_opengl *gl);
|
||||
|
||||
bool
|
||||
sc_opengl_version_at_least(struct sc_opengl *gl,
|
||||
int minver_major, int minver_minor,
|
||||
int minver_es_major, int minver_es_minor);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user