MCPcopy
hub / github.com/EngoEngine/engo / newCamera

Function newCamera

common/render_shaders.go:161–178  ·  view source on GitHub ↗
(w *ecs.World)

Source from the content-addressed store, hash-verified

159}
160
161func newCamera(w *ecs.World) {
162 shaderInitMutex.Lock()
163 defer shaderInitMutex.Unlock()
164 var cam *CameraSystem
165 for _, system := range w.Systems() {
166 switch sys := system.(type) {
167 case *CameraSystem:
168 cam = sys
169 }
170 }
171 if cam == nil {
172 log.Println("Camera system was not found when changing scene!")
173 return
174 }
175 for _, shader := range shaders {
176 shader.SetCamera(cam)
177 }
178}
179
180// VertexShaderCompilationError is returned whenever the `LoadShader` method was unable to compile your Vertex-shader (GLSL)
181type VertexShaderCompilationError struct {

Callers 1

UpdateMethod · 0.85

Calls 1

SetCameraMethod · 0.65

Tested by

no test coverage detected