projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved some stuff
[carveJwlIkooP6JGAAIwe30JlM.git]
/
render.h
diff --git
a/render.h
b/render.h
index cac188d07dcbdf3fc258bcbb4a5ab45256567e50..8122b2ae8e41f18effe8dea39a9d5224ae8f2c93 100644
(file)
--- a/
render.h
+++ b/
render.h
@@
-1,10
+1,13
@@
+/*
+ * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
+ */
+
#include "common.h"
#include "model.h"
#include "shaders/blit.h"
#include "shaders/standard.h"
#include "shaders/vblend.h"
#include "common.h"
#include "model.h"
#include "shaders/blit.h"
#include "shaders/standard.h"
#include "shaders/vblend.h"
-#include "shaders/unlit.h"
static void render_water_texture( m4x3f camera );
static void render_water_surface( m4x4f pv, m4x3f camera );
static void render_water_texture( m4x3f camera );
static void render_water_surface( m4x4f pv, m4x3f camera );
@@
-122,7
+125,7
@@
static void pipeline_projection( m4x4f mat, float nearz, float farz )
{
m4x4_projection( mat,
gpipeline.fov,
{
m4x4_projection( mat,
gpipeline.fov,
- (float)vg
_window_x / (float)vg_
window_y,
+ (float)vg
.window_x / (float)vg.
window_y,
nearz, farz );
}
nearz, farz );
}
@@
-180,19
+183,19
@@
static void fb_use( struct framebuffer *fb )
if( !fb )
{
glBindFramebuffer( GL_FRAMEBUFFER, 0 );
if( !fb )
{
glBindFramebuffer( GL_FRAMEBUFFER, 0 );
- glViewport( 0, 0, vg
_window_x, vg_
window_y );
+ glViewport( 0, 0, vg
.window_x, vg.
window_y );
}
else
{
glBindFramebuffer( GL_FRAMEBUFFER, fb->fb );
}
else
{
glBindFramebuffer( GL_FRAMEBUFFER, fb->fb );
- glViewport( 0, 0, vg
_window_x / fb->div, vg_
window_y / fb->div );
+ glViewport( 0, 0, vg
.window_x / fb->div, vg.
window_y / fb->div );
}
}
static void fb_init( struct framebuffer *fb )
{
}
}
static void fb_init( struct framebuffer *fb )
{
- i32 ix = vg
_
window_x / fb->div,
- iy = vg
_
window_y / fb->div;
+ i32 ix = vg
.
window_x / fb->div,
+ iy = vg
.
window_y / fb->div;
glGenFramebuffers( 1, &fb->fb );
glBindFramebuffer( GL_FRAMEBUFFER, fb->fb );
glGenFramebuffers( 1, &fb->fb );
glBindFramebuffer( GL_FRAMEBUFFER, fb->fb );
@@
-236,8
+239,8
@@
static void fb_resize( struct framebuffer *fb )
if( !fb->allocated )
return;
if( !fb->allocated )
return;
- i32 ix = vg
_
window_x / fb->div,
- iy = vg
_
window_y / fb->div;
+ i32 ix = vg
.
window_x / fb->div,
+ iy = vg
.
window_y / fb->div;
glBindTexture( GL_TEXTURE_2D, fb->colour );
glTexImage2D( GL_TEXTURE_2D, 0, fb->format, ix, iy, 0,
glBindTexture( GL_TEXTURE_2D, fb->colour );
glTexImage2D( GL_TEXTURE_2D, 0, fb->format, ix, iy, 0,
@@
-252,7
+255,7
@@
static void render_fb_resize(void)
if( gpipeline.ready )
{
glBindTexture( GL_TEXTURE_2D, gpipeline.rgb_background );
if( gpipeline.ready )
{
glBindTexture( GL_TEXTURE_2D, gpipeline.rgb_background );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, vg
_window_x, vg_
window_y, 0,
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, vg
.window_x, vg.
window_y, 0,
GL_RGB, GL_UNSIGNED_BYTE, NULL );
}
}
GL_RGB, GL_UNSIGNED_BYTE, NULL );
}
}
@@
-267,7
+270,7
@@
static void render_init_temp_buffer(void)
glGenTextures( 1, &gpipeline.rgb_background );
glBindTexture( GL_TEXTURE_2D, gpipeline.rgb_background );
glGenTextures( 1, &gpipeline.rgb_background );
glBindTexture( GL_TEXTURE_2D, gpipeline.rgb_background );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, vg
_window_x, vg_
window_y,
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, vg
.window_x, vg.
window_y,
0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
@@
-343,7
+346,6
@@
static void render_init(void)
shader_blit_register();
shader_standard_register();
shader_vblend_register();
shader_blit_register();
shader_standard_register();
shader_vblend_register();
- shader_unlit_register();
vg_acquire_thread_sync();
{
vg_acquire_thread_sync();
{