MCPcopy Index your code
hub / github.com/EngoEngine/engo / SetFPSLimit

Function SetFPSLimit

engo.go:245–252  ·  view source on GitHub ↗

SetFPSLimit can be used to change the value in the given `RunOpts` after already having called `engo.Run`.

(limit int)

Source from the content-addressed store, hash-verified

243
244// SetFPSLimit can be used to change the value in the given `RunOpts` after already having called `engo.Run`.
245func SetFPSLimit(limit int) error {
246 if limit <= 0 {
247 return fmt.Errorf("FPS Limit out of bounds. Requires > 0")
248 }
249 opts.FPSLimit = limit
250 resetLoopTicker <- true
251 return nil
252}
253
254// Headless indicates whether or not OpenGL-calls should be made
255func Headless() bool {

Callers 1

TestSetFPSLimitFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSetFPSLimitFunction · 0.68