Uniform colors
This commit is contained in:
@@ -12,10 +12,12 @@ Material :: struct {
|
||||
textures: [MATERIAL_MAX_TEXTURES]^Texture,
|
||||
texture_count: u8,
|
||||
|
||||
uniforms: []Uniform,
|
||||
|
||||
uv_scale: [2]f32, // TODO: SS - Move?
|
||||
}
|
||||
|
||||
create_material :: proc(program: ^Shader_Program, textures: []^Texture) -> (Material, bool) {
|
||||
create_material :: proc(program: ^Shader_Program, textures: []^Texture, uniforms: []Uniform) -> (Material, bool) {
|
||||
m: Material
|
||||
m.shader_program = program
|
||||
|
||||
@@ -39,7 +41,9 @@ create_material :: proc(program: ^Shader_Program, textures: []^Texture) -> (Mate
|
||||
// TODO: SS - Should we return false here?
|
||||
}
|
||||
|
||||
m.uv_scale = { 2.0, 2.0 } // NOTE: SS - Hardcoded.
|
||||
|
||||
m.uniforms = uniforms
|
||||
m.uv_scale = { 1.0, 1.0 } // NOTE: SS - Hardcoded.
|
||||
|
||||
return m, true
|
||||
}
|
||||
Reference in New Issue
Block a user