work on ground type texture
This commit is contained in:
parent
e375dc02aa
commit
4e34dbdd4c
10
src/main.jai
10
src/main.jai
@ -156,11 +156,11 @@ frame :: () {
|
|||||||
|
|
||||||
sg_begin_pass(*(sg_pass.{ action = state.pass_action_clear, swapchain = cast,force(sg_swapchain) sglue_swapchain() }));
|
sg_begin_pass(*(sg_pass.{ action = state.pass_action_clear, swapchain = cast,force(sg_swapchain) sglue_swapchain() }));
|
||||||
draw_editor();
|
draw_editor();
|
||||||
uiTex := Ui_Texture.{*gPipelines.plane.bind.images[2]};
|
// uiTex := Ui_Texture.{*gPipelines.plane.bind.images[2]};
|
||||||
set_shader_for_images(*uiTex);
|
// set_shader_for_images(*uiTex);
|
||||||
r := GR.get_rect(500,500,300,300);
|
// r := GR.get_rect(500,500,300,300);
|
||||||
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});
|
// 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();
|
// set_shader_for_color();
|
||||||
if !in_editor_view then game_draw();
|
if !in_editor_view then game_draw();
|
||||||
ui_pass();
|
ui_pass();
|
||||||
sg_end_pass();
|
sg_end_pass();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -55,8 +55,8 @@ World :: struct {
|
|||||||
update_image_from_ground :: (world: *World, img: *sg_image) {
|
update_image_from_ground :: (world: *World, img: *sg_image) {
|
||||||
materialdata : [1000*1000*4]u8;
|
materialdata : [1000*1000*4]u8;
|
||||||
counter : int = 0;
|
counter : int = 0;
|
||||||
for x: 0..1000 {
|
for x: 0..999 {
|
||||||
for y: 0..1000 {
|
for y: 0..999 {
|
||||||
if world.ground[x][y] == .GRASS {
|
if world.ground[x][y] == .GRASS {
|
||||||
materialdata[counter + 0] = 0;
|
materialdata[counter + 0] = 0;
|
||||||
materialdata[counter + 1] = 255;
|
materialdata[counter + 1] = 255;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user