mirror of
https://github.com/ScrelliCopter/NeHe-SDL_GPU.git
synced 2025-06-19 21:49:17 +10:00
Simplify lessons that use textured shaders w/o tinting
This commit is contained in:
@@ -266,11 +266,8 @@ struct Lesson7: AppDelegate
|
||||
}
|
||||
else
|
||||
{
|
||||
struct Uniforms { var modelViewProj: simd_float4x4, color: SIMD4<Float> }
|
||||
var u = Uniforms(
|
||||
modelViewProj: self.projection * model,
|
||||
color: .init(repeating: 1.0))
|
||||
SDL_PushGPUVertexUniformData(cmd, 0, &u, UInt32(MemoryLayout<Uniforms>.size))
|
||||
var modelViewProj = self.projection * model
|
||||
SDL_PushGPUVertexUniformData(cmd, 0, &modelViewProj, UInt32(MemoryLayout<simd_float4x4>.size))
|
||||
}
|
||||
|
||||
// Draw textured cube
|
||||
|
||||
Reference in New Issue
Block a user