work on fix to weird issues
This commit is contained in:
parent
03556d15e8
commit
a2476a39a6
@ -26,10 +26,6 @@ draw_subwindow_texture_debug :: (state: *GR.Subwindow_State, r: GR.Rect, data: *
|
||||
#scope_export
|
||||
|
||||
draw_texture_debug :: () {
|
||||
uiTex := Ui_Texture.{gPipelines.plane.bind.images[0]};
|
||||
set_shader_for_images(*uiTex);
|
||||
immediate_quad(.{0, 0}, .{0 + 500, 0}, .{0 + 500, 0 + 500}, .{0, 0 + 500});
|
||||
set_shader_for_color();
|
||||
}
|
||||
|
||||
toggle_texdebug :: () {
|
||||
|
||||
@ -158,7 +158,12 @@ frame :: () {
|
||||
draw_editor();
|
||||
if !in_editor_view then game_draw();
|
||||
|
||||
draw_texture_debug();
|
||||
|
||||
uiTex := Ui_Texture.{gPipelines.plane.bind.images[0]};
|
||||
set_shader_for_images(*uiTex);
|
||||
r := GR.Rect.{0,0,500,500};
|
||||
immediate_quad(.{r.x, r.y}, .{r.x + r.w, r.y}, .{r.x + r.w, r.y + r.h}, .{r.x, r.y + r.h});
|
||||
set_shader_for_color();
|
||||
|
||||
ui_pass();
|
||||
sg_end_pass();
|
||||
|
||||
@ -292,10 +292,15 @@ create_plane_pipeline_reflection_image :: (binding: *sg_bindings) {
|
||||
height = h,
|
||||
pixel_format = .RGBA8,
|
||||
render_target = true,
|
||||
sample_count = 1,
|
||||
};
|
||||
depth_desc := sg_image_desc.{
|
||||
width = w,
|
||||
height = h,
|
||||
pixel_format = .DEPTH,
|
||||
render_target = true,
|
||||
};
|
||||
binding.images[0] = sg_make_image(*img_desc);
|
||||
binding.images[1] = sg_make_image(*img_desc);
|
||||
binding.images[1] = sg_make_image(*depth_desc);
|
||||
}
|
||||
|
||||
create_plane_pipeline :: () {
|
||||
@ -310,6 +315,7 @@ create_plane_pipeline :: () {
|
||||
pipeline.depth = .{
|
||||
write_enabled = true,
|
||||
compare = .LESS_EQUAL,
|
||||
pixel_format = .DEPTH,
|
||||
};
|
||||
|
||||
color_state := sg_color_target_state.{
|
||||
|
||||
@ -141,7 +141,6 @@ set_shader_for_color :: (enable_blend := false) {
|
||||
|
||||
|
||||
set_shader_for_images :: (texture: *Ui_Texture) {
|
||||
print("Setting shader for images!!!\n");
|
||||
arb_tri_command_add(.{
|
||||
type = .SET_TEXTURE,
|
||||
texture = texture
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user