Mercurial > games > semicongine
diff tests/test_vulkan_wrapper.nim @ 329:69e18f69713b
add: scene/shader compatability check, fix collision code to work with new APIs
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 29 Aug 2023 00:01:13 +0700 |
parents | 8d0ffcacc7e3 |
children | 04531bec3583 |
line wrap: on
line diff
--- a/tests/test_vulkan_wrapper.nim Fri Aug 25 01:14:04 2023 +0700 +++ b/tests/test_vulkan_wrapper.nim Tue Aug 29 00:01:13 2023 +0700 @@ -13,7 +13,7 @@ (R, W) = ([255'u8, 0'u8, 0'u8, 255'u8], [255'u8, 255'u8, 255'u8, 255'u8]) mat = Material( name: "mat", - materialType: "my_material", + materialType: "textures_material", textures: { "my_little_texture": Texture(image: Image(width: 5, height: 5, imagedata: @[ R, R, R, R, R, @@ -26,7 +26,7 @@ ) mat2 = Material( name: "mat2", - materialType: "my_material", + materialType: "textures_material", textures: { "my_little_texture": Texture(image: Image(width: 5, height: 5, imagedata: @[ R, W, R, W, R, @@ -39,7 +39,7 @@ ) mat3 = Material( name: "mat3", - materialType: "my_special_material", + materialType: "plain", constants: { "color": toGPUValue(newVec4f(0, 1, 0, 1)) }.toTable @@ -192,8 +192,8 @@ fragmentCode="color = outcolor;", ) engine.initRenderer({ - "my_material": shaderConfiguration1, - "my_special_material": shaderConfiguration2, + "textures_material": shaderConfiguration1, + "plain": shaderConfiguration2, }.toTable) # INIT SCENES @@ -205,7 +205,6 @@ Scene(name: "multimaterial", meshes: scene_multi_material()), ] - scenes[4].addShaderGlobal("color", newVec4f(1, 0, 0, 1)) for scene in scenes.mitems: scene.addShaderGlobal("time", 0.0'f32) engine.addScene(scene)