Quick Links
  • Homepage
        - Overview
        - Download
        - Screenshots
        - Community
  • Code Sample Pack
  • Reference Guide
  • Changelog
  • Overview of GLSL Hacker
  • Live Coding
  • Hack your first GLSL Code
  • Moon3D




  • GLSL Hacker Articles

    > Compute shaders on Radeon
    > Distance functions in GLSL
    > GLSL Interpolation Qualifiers
    > Tessellation Spacing Modes
    > Normal Visualizer with GS
    > 3D Surface Plots
    > Normal Mapping
    > Circle and Disc in GLSL
    > PhysX 3 Flag Demo
    > GLSL Hacker on Raspberry Pi
    GLSL Hacker

    Reference Guide
    Host-API Lua / Python



    Back to Homepage
    Back to Developer's 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.

    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)





  • (C)2012-2014 Geeks3D