GLSL Hacker
FEATURES DOWNLOAD GALLERY BLOG LEARN



Back to Reference Guide Index

gh_window Library

Description

gh_window is the module that manages the current window.

Number of functions: 4



gh_window.getsize

Description

Returns the size of the window.

Languages

Lua - Python

Parameters

  • win_id [INTEGER]: identifier of the window. 0 is the current window.

    Return Values

  • width, height [INTEGER]: size of the window

    Code sample


    width, height = gh_window.getsize(0)



    gh_window.timer_reset

    Description

    Resets the timer of the window.

    Languages

    Lua - Python

    Parameters

  • win_id [INTEGER]: identifier of the window. 0 is the current window.

    Return Values

    This function has no return value(s).

    Code sample


    gh_window.timer_reset(0)



    gh_window.timer_get_milliseconds

    Description

    Returns the number of milliseconds since the last reset.

    Languages

    Lua - Python

    Parameters

  • win_id [INTEGER]: identifier of the window. 0 is the current window.

    Return Values

  • elapsed_time [FLOAT]: elpased time in milliseconds

    Code sample


    elapsed_time = gh_window.timer_get_milliseconds(0)



    gh_window.timer_get_seconds

    Description

    Returns the number of seconds since the last reset.

    Languages

    Lua - Python

    Parameters

  • win_id [INTEGER]: identifier of the window. 0 is the current window.

    Return Values

  • elapsed_time [FLOAT]: elpased time in seconds

    Code sample


    elapsed_time = gh_window.timer_get_seconds(0)





    2013-2015 Geeks3D. All Rights Reserved.

    .:- G3D Network -:.