2020-10-13 09:20:52 +02:00
|
|
|
#ifndef RENDER_OGL_H
|
|
|
|
#define RENDER_OGL_H
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
#include "opengl_utils.h"
|
|
|
|
|
|
|
|
#define TEXTURE_COUNT 4
|
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
typedef struct OGLRENDERER
|
2020-10-13 09:20:52 +02:00
|
|
|
{
|
|
|
|
HGLRC context;
|
|
|
|
GLuint main_program;
|
|
|
|
GLuint scale_program;
|
|
|
|
BOOL got_error;
|
|
|
|
int surface_tex_width;
|
|
|
|
int surface_tex_height;
|
|
|
|
int* surface_tex;
|
|
|
|
GLenum surface_format;
|
|
|
|
GLenum surface_type;
|
|
|
|
GLuint surface_tex_ids[TEXTURE_COUNT];
|
|
|
|
GLuint palette_tex_ids[TEXTURE_COUNT];
|
|
|
|
float scale_w;
|
|
|
|
float scale_h;
|
|
|
|
GLint main_tex_coord_attr_loc;
|
|
|
|
GLint main_vertex_coord_attr_loc;
|
|
|
|
GLuint main_vbos[3];
|
|
|
|
GLuint main_vao;
|
|
|
|
GLint frame_count_uni_loc;
|
|
|
|
GLuint frame_buffer_id;
|
|
|
|
GLuint frame_buffer_tex_id;
|
2021-05-15 02:36:05 +02:00
|
|
|
GLint scale_tex_coord_attr_loc;
|
2020-10-13 09:20:52 +02:00
|
|
|
GLuint scale_vbos[3];
|
|
|
|
GLuint scale_vao;
|
|
|
|
BOOL use_opengl;
|
|
|
|
BOOL adjust_alignment;
|
|
|
|
BOOL filter_bilinear;
|
2021-06-11 20:30:43 +02:00
|
|
|
} OGLRENDERER;
|
2020-10-13 09:20:52 +02:00
|
|
|
|
|
|
|
DWORD WINAPI ogl_render_main(void);
|
|
|
|
|
|
|
|
#endif
|