Dont use glGetTexLevelParameteriv, it's only available in opengl es 3.1

This commit is contained in:
dec05eba
2025-09-21 03:19:56 +02:00
parent a4c227c43e
commit 2c22782ca0
14 changed files with 48 additions and 41 deletions

View File

@@ -46,6 +46,7 @@ typedef struct {
gsr_destination_color destination_color;
unsigned int destination_textures[2];
vec2i destination_textures_size[2];
int num_destination_textures;
gsr_color_range color_range;

View File

@@ -118,8 +118,6 @@ typedef void(*__GLXextFuncPtr)(void);
#define GL_TEXTURE_WRAP_T 0x2803
#define GL_TEXTURE_MAG_FILTER 0x2800
#define GL_TEXTURE_MIN_FILTER 0x2801
#define GL_TEXTURE_WIDTH 0x1000
#define GL_TEXTURE_HEIGHT 0x1001
#define GL_NEAREST 0x2600
#define GL_CLAMP_TO_EDGE 0x812F
#define GL_LINEAR 0x2601

View File

@@ -15,7 +15,7 @@ struct gsr_video_encoder {
void (*destroy)(gsr_video_encoder *encoder, AVCodecContext *video_codec_context);
void (*copy_textures_to_frame)(gsr_video_encoder *encoder, AVFrame *frame, gsr_color_conversion *color_conversion); /* Can be NULL */
/* |textures| should be able to fit 2 elements */
void (*get_textures)(gsr_video_encoder *encoder, unsigned int *textures, int *num_textures, gsr_destination_color *destination_color);
void (*get_textures)(gsr_video_encoder *encoder, unsigned int *textures, vec2i *texture_sizes, int *num_textures, gsr_destination_color *destination_color);
void *priv;
bool started;
@@ -25,6 +25,6 @@ struct gsr_video_encoder {
bool gsr_video_encoder_start(gsr_video_encoder *encoder, AVCodecContext *video_codec_context, AVFrame *frame);
void gsr_video_encoder_destroy(gsr_video_encoder *encoder, AVCodecContext *video_codec_context);
void gsr_video_encoder_copy_textures_to_frame(gsr_video_encoder *encoder, AVFrame *frame, gsr_color_conversion *color_conversion);
void gsr_video_encoder_get_textures(gsr_video_encoder *encoder, unsigned int *textures, int *num_textures, gsr_destination_color *destination_color);
void gsr_video_encoder_get_textures(gsr_video_encoder *encoder, unsigned int *textures, vec2i *texture_sizes, int *num_textures, gsr_destination_color *destination_color);
#endif /* GSR_ENCODER_VIDEO_H */

View File

@@ -11,6 +11,8 @@ typedef struct {
unsigned int texture_id;
int redirected;
gsr_egl *egl;
unsigned int window_width;
unsigned int window_height;
} WindowTexture;
/* Returns 0 on success */