1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-23 08:52:25 +01:00
cnc-ddraw/inc/render_ogl.h

42 lines
918 B
C
Raw Normal View History

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
typedef struct ogl_renderer
{
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;
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;
} ogl_renderer;
DWORD WINAPI ogl_render_main(void);
#endif