Compare commits

..

No commits in common. "b8e4f0f3edf1853bdfd97a970c751deb1601e423" and "03556d15e8d525e43df9abc63cd2cd6f3ac2fff0" have entirely different histories.

5 changed files with 16 additions and 22 deletions

View File

@ -26,6 +26,10 @@ 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 :: () {

View File

@ -158,12 +158,7 @@ frame :: () {
draw_editor();
if !in_editor_view then game_draw();
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();
draw_texture_debug();
ui_pass();
sg_end_pass();

View File

@ -292,15 +292,10 @@ create_plane_pipeline_reflection_image :: (binding: *sg_bindings) {
height = h,
pixel_format = .RGBA8,
render_target = true,
};
depth_desc := sg_image_desc.{
width = w,
height = h,
pixel_format = .DEPTH,
render_target = true,
sample_count = 1,
};
binding.images[0] = sg_make_image(*img_desc);
binding.images[1] = sg_make_image(*depth_desc);
binding.images[1] = sg_make_image(*img_desc);
}
create_plane_pipeline :: () {
@ -315,7 +310,6 @@ create_plane_pipeline :: () {
pipeline.depth = .{
write_enabled = true,
compare = .LESS_EQUAL,
pixel_format = .DEPTH,
};
color_state := sg_color_target_state.{

View File

@ -1,12 +1,12 @@
#import,dir "../../modules/sokol-jai/sokol/app"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/gfx"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/gl"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/glue"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/shape"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/app";
#import,dir "../../modules/sokol-jai/sokol/gfx";
#import,dir "../../modules/sokol-jai/sokol/gl";
#import,dir "../../modules/sokol-jai/sokol/glue";
#import,dir "../../modules/sokol-jai/sokol/shape";
#import,dir "../../modules/sokol-jai/sokol/fontstash";
#import,dir "../../modules/sokol-jai/sokol/log"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/time"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/fetch"(DEBUG = true);
#import,dir "../../modules/sokol-jai/sokol/log";
#import,dir "../../modules/sokol-jai/sokol/time";
#import,dir "../../modules/sokol-jai/sokol/fetch";
#load "../main.jai";

View File

@ -141,6 +141,7 @@ 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