X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=render.h;h=a0bde7e024bf3c46e92ebe91d82641c5ccc49833;hb=HEAD;hp=3b69b2b3dd8dc07873d011b8fd32496c435d1c66;hpb=5f6a4f9df6c8accc89f1920bfe9ace3cbac4c4b6;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/render.h b/render.h deleted file mode 100644 index 3b69b2b..0000000 --- a/render.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved - */ -#pragma once -#include "common.h" -#include "model.h" -#include "camera.h" - -#include "shaders/blit.h" -#include "shaders/blitblur.h" -#include "shaders/blitcolour.h" -#include "shaders/blit_transition.h" - -#define WORKSHOP_PREVIEW_WIDTH 504 -#define WORKSHOP_PREVIEW_HEIGHT 336 - -static f32 k_render_scale = 1.0f; -static i32 k_blur_effect = 1; -static f32 k_blur_strength = 0.3f; -static f32 k_fov = 0.86f; -static f32 k_cam_height = 0.8f; - -typedef struct framebuffer framebuffer; - -/* - * All standard buffers used in rendering - */ -static struct pipeline{ - glmesh fsquad; - - framebuffer *fb_main, - *fb_water_reflection, - *fb_water_beneath, - *fb_workshop_preview, - *fb_network_status; - int ready; -} -gpipeline; - -struct framebuffer{ - const char *display_name; - int resolution_div, /* definition */ - fixed_w, - fixed_h, - - render_w, /* runtime */ - render_h; - - struct framebuffer_attachment{ - const char *display_name; - - enum framebuffer_attachment_type{ - k_framebuffer_attachment_type_none, - k_framebuffer_attachment_type_texture, - k_framebuffer_attachment_type_renderbuffer, - k_framebuffer_attachment_type_texture_depth - } - purpose; - - enum framebuffer_quality_profile{ - k_framebuffer_quality_all, - k_framebuffer_quality_high_only - } - quality; - - GLenum internalformat, - format, - type, - attachment; - - GLuint id; - - /* Runtime */ - int debug_view; - } - attachments[5]; - GLuint fb; - framebuffer **link; -} -extern framebuffers[]; - -void render_init(void); -void render_fsquad(void); -void render_fsquad1(void); -void render_fsquad2(void); -void render_view_framebuffer_ui(void); -void render_fb_bind_texture( framebuffer *fb, int attachment, int slot ); -void render_fb_inverse_ratio( framebuffer *fb, v2f inverse ); -void render_fb_get_current_res( struct framebuffer *fb, int *x, int *y ); -void render_fb_bind( framebuffer *fb, int use_scaling ); -void render_fb_bind_texture( framebuffer *fb, int attachment, int slot ); -void render_fb_allocate( struct framebuffer *fb ); -void render_fb_resize(void);