X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=render.h;h=b6633943b68df2def3f51499fced0dfbf8885278;hb=e8a65239f85784e2e596d2622c2baddda9fb5fae;hp=b6172283121632b9d18ac0ac6395e300b8c5341f;hpb=bc40c302f1b8313bdd3c773fcfa2f850511c4634;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/render.h b/render.h index b617228..b663394 100644 --- a/render.h +++ b/render.h @@ -16,6 +16,9 @@ #include "shaders/vblend.h" #endif +#define WORKSHOP_PREVIEW_WIDTH 504 +#define WORKSHOP_PREVIEW_HEIGHT 336 + VG_STATIC void render_water_texture( world_instance *world, camera *cam, int layer_depth ); VG_STATIC void render_water_surface( world_instance *world, camera *cam ); @@ -36,7 +39,8 @@ VG_STATIC struct pipeline{ framebuffer *fb_main, *fb_water_reflection, - *fb_water_beneath; + *fb_water_beneath, + *fb_workshop_preview; int ready; float view_render_scale, @@ -175,6 +179,27 @@ framebuffers[] = .attachment = GL_DEPTH_STENCIL_ATTACHMENT } } + }, + { + "workshop_preview", + .link = &gpipeline.fb_workshop_preview, + .resolution_div = 0, + .fixed_w = WORKSHOP_PREVIEW_WIDTH, .fixed_h = WORKSHOP_PREVIEW_HEIGHT, + .attachments = + { + { + "colour", k_framebuffer_attachment_type_texture, + .internalformat = GL_RGB, + .format = GL_RGB, + .type = GL_UNSIGNED_BYTE, + .attachment = GL_COLOR_ATTACHMENT0 + }, + { + "depth_stencil", k_framebuffer_attachment_type_renderbuffer, + .internalformat = GL_DEPTH24_STENCIL8, + .attachment = GL_DEPTH_STENCIL_ATTACHMENT + } + } } };