Context returns the engine's root context.
()
| 173 | |
| 174 | // Context returns the engine's root context. |
| 175 | func (e *Engine) Context() *Context { |
| 176 | e.assertValid() |
| 177 | var ctx Context |
| 178 | ctx.engine = e |
| 179 | RunMain(func() { |
| 180 | ctx.addr = C.engineRootContext(e.addr) |
| 181 | }) |
| 182 | return &ctx |
| 183 | } |
| 184 | |
| 185 | // TODO ObjectOf is probably still worth it, but turned out unnecessary |
| 186 | // for GL functionality. Test it properly before introducing it. |