projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build scripts
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_render.c
diff --git
a/world_render.c
b/world_render.c
index e1a30886b8de504afacda8052fbef4e9eba4c2ef..4cac23f6a2418446cdc4ceee2b8ac412bff78747 100644
(file)
--- a/
world_render.c
+++ b/
world_render.c
@@
-145,15
+145,6
@@
static GLuint world_get_texture( world_instance *world, u32 id ){
else return world->textures[ id ];
}
else return world->textures[ id ];
}
-#if 0
-static void bindpoint_diffuse_texture1( world_instance *world,
- struct world_surface *mat ){
- glActiveTexture( GL_TEXTURE1 );
- glBindTexture( GL_TEXTURE_2D,
- world_get_texture(world,mat->info.tex_diffuse) );
-}
-#endif
-
/*
* Passes Rendering
* ----------------------------------------------------------------------------
/*
* Passes Rendering
* ----------------------------------------------------------------------------
@@
-1210,7
+1201,6
@@
void render_world_override( world_instance *world,
v4f uPlayerPos, uSpawnPos;
v4_zero( uPlayerPos );
v4_zero( uSpawnPos );
v4f uPlayerPos, uSpawnPos;
v4_zero( uPlayerPos );
v4_zero( uSpawnPos );
-
v3_copy( world->player_co, uPlayerPos );
if( dest_spawn && (v3_dist2(dest_spawn->transform.co,uPlayerPos) > 0.1f) )
v3_copy( world->player_co, uPlayerPos );
if( dest_spawn && (v3_dist2(dest_spawn->transform.co,uPlayerPos) > 0.1f) )
@@
-1360,20
+1350,21
@@
static f32 *skybox_prop_location( world_instance *world, i32 index ){
}
}
}
}
-void imgui_world_light_edit( world_instance *world )
+void imgui_world_light_edit(
ui_context *ctx,
world_instance *world )
{
ui_rect panel = { vg.window_x-400, 0, 400, vg.window_y };
{
ui_rect panel = { vg.window_x-400, 0, 400, vg.window_y };
- ui_fill(
panel, ui_colour(
k_ui_bg+1 ) );
- ui_outline(
panel, 1, ui_colour(
k_ui_bg+7 ), 0 );
+ ui_fill(
ctx, panel, ui_colour( ctx,
k_ui_bg+1 ) );
+ ui_outline(
ctx, panel, 1, ui_colour( ctx,
k_ui_bg+7 ), 0 );
ui_rect_pad( panel, (ui_px[2]){ 8, 8 } );
ui_rect_pad( panel, (ui_px[2]){ 8, 8 } );
-
vg_ui.wants_mouse = 1
;
+
ui_capture_mouse(ctx, 1)
;
static i32 option_to_edit = 0;
static i32 option_to_edit = 0;
- ui_enum( panel, "option", skybox_setting_options, 5, &option_to_edit );
- ui_colourpicker( panel, "colour",
+ ui_enum(
ctx,
panel, "option", skybox_setting_options, 5, &option_to_edit );
+ ui_colourpicker(
ctx,
panel, "colour",
skybox_prop_location( world, option_to_edit ) );
skybox_prop_location( world, option_to_edit ) );
- if( ui_button( panel, "save tweaker file ('/tmp/tweaker.txt')\n" ) == 1 ){
+ if( ui_button( ctx, panel, "save tweaker file ('/tmp/tweaker.txt')\n" ) == 1 )
+ {
FILE *fp = fopen( "/tmp/tweaker.txt", "w" );
for( i32 i=0; i<5; i ++ ){
FILE *fp = fopen( "/tmp/tweaker.txt", "w" );
for( i32 i=0; i<5; i ++ ){