Compare commits
2 Commits
03556d15e8
...
b8e4f0f3ed
| Author | SHA1 | Date | |
|---|---|---|---|
| b8e4f0f3ed | |||
| 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.{
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
#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/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/fontstash";
|
||||
#import,dir "../../modules/sokol-jai/sokol/log";
|
||||
#import,dir "../../modules/sokol-jai/sokol/time";
|
||||
#import,dir "../../modules/sokol-jai/sokol/fetch";
|
||||
#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);
|
||||
|
||||
#load "../main.jai";
|
||||
|
||||
|
||||
@ -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