Пример #1
0
def __RenderUpdate():
    glLoadIdentity()

    glClearColor(Camera.clearColor.x, Camera.clearColor.y, Camera.clearColor.z, 1.)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)

    screenRatio = glutGet(GLUT_WINDOW_WIDTH) / glutGet(GLUT_WINDOW_HEIGHT)

    if FLAT_WORLD:
        glOrtho(-Camera.size * screenRatio, Camera.size * screenRatio,
                -Camera.size, Camera.size,
                Camera.near, -Camera.far)

        Camera.applyTransformation()
    else:
        gluPerspective(Camera.fov, screenRatio, Camera.near, Camera.far)

        Camera.applyTransformation()

    EventManager.castRender()

    glutSwapBuffers()
Пример #2
0
def __FrameUpdate():
    EventManager.castUpdate()
Пример #3
0
def __LateFrameUpdate():
    EventManager.castLateUpdate()
Пример #4
0
def Start():
    __init()
    EventManager.loadScripts()
    EventManager.castStart()
    glutMainLoop()
Пример #5
0
def instantiate(prefab_name):
    return EventManager.__HookMethods('UserAssets.Prefabs.' + prefab_name)
Пример #6
0
def enable(script_id):
    EventManager.__EnableScript(script_id)
Пример #7
0
def disable(script_id):
    EventManager.__DisableScript(script_id)
Пример #8
0
def destroy(script_id):
    EventManager.__UnHookScript(script_id)