comparison tests/test_font.nim @ 316:b145a05c2459

add: changing rendering system, not finished yet, also upgrading to Nim 2
author Sam <sam@basx.dev>
date Mon, 07 Aug 2023 00:23:00 +0700
parents bfcb41211c5b
children 04531bec3583
comparison
equal deleted inserted replaced
315:4921ec86dcb4 316:b145a05c2459
43 fragmentCode="""color = texture(textures[materialId], uvout);""", 43 fragmentCode="""color = texture(textures[materialId], uvout);""",
44 ) 44 )
45 45
46 var engine = initEngine("Test fonts") 46 var engine = initEngine("Test fonts")
47 engine.setRenderer(engine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)) 47 engine.setRenderer(engine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode))
48 engine.addScene(scene, vertexInput, samplers) 48 engine.addScene(scene, vertexInput, samplers, materialIndexAttribute="")
49 scene.addShaderGlobal("perspective", Unit4F32) 49 scene.addShaderGlobal("perspective", Unit4F32)
50 50
51 while engine.updateInputs() == Running and not engine.keyIsDown(Escape): 51 while engine.updateInputs() == Running and not engine.keyIsDown(Escape):
52 if engine.windowWasResized(): 52 if engine.windowWasResized():
53 var winSize = engine.getWindow().size 53 var winSize = engine.getWindow().size