Karl Zylinski 6 meses atrás
pai
commit
3a76a399fc
3 arquivos alterados com 10 adições e 1 exclusões
  1. 5 1
      README.md
  2. 2 0
      karl2d.odin
  3. 3 0
      karl2d_windows.odin

+ 5 - 1
README.md

@@ -22,7 +22,11 @@ Here follows my near-future TODO list
 * Do proper checks of vertex count and dispatch rendering when full
 	* What happens when list is full? We can't just empty the vertex list due to being used by input assembler etc.
 * Should we sort by depth? Maybe we should use Vec3 because some 2D games rely on it?
-* Shader loading
+* Shaders
+	* Basic loading
+	* Constants that you can set
+	* Dynamic vertex creation
+	* Feed extra vertex field values using some kind of context
 
 
 ## DONE

+ 2 - 0
karl2d.odin

@@ -64,6 +64,8 @@ set_shader_constant_mat4: proc(shader: Shader_Handle, loc: Shader_Constant_Locat
 set_shader_constant_f32: proc(shader: Shader_Handle, loc: Shader_Constant_Location, val: f32) : _set_shader_constant_f32
 set_shader_constant_vec2: proc(shader: Shader_Handle, loc: Shader_Constant_Location, val: Vec2) : _set_shader_constant_vec2
 
+set_vertex_field :: proc(input: Shader_Input)
+
 Shader_Input_Format :: enum {
 	RGBA32_Float,
 	RGBA8_Norm,

+ 3 - 0
karl2d_windows.odin

@@ -1182,6 +1182,9 @@ _destroy_shader :: proc(shader: Shader_Handle) {
 		}
 
 		delete(shd.constant_lookup)
+		for i in shd.inputs {
+			delete(i.name)
+		}
 		delete(shd.inputs)
 	}