Sepehr Taghdisian avatar Sepehr Taghdisian committed 8687421

glfw modifications for window override, python bindings test

Comments (0)

Files changed (17)

3rdparty/glfw/include/GLFW/glfw3.h

  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
+GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, 
+    GLFWwindow* share, void* override_wnd);
 
 /*! @brief Destroys the specified window and its context.
  *

3rdparty/glfw/src/internal.h

 //
 //========================================================================
 
+/**
+ * Edit: Sepehr Taghdisian (sep.tagh@gmail.com)
+ * Added override_wnd to _glfwPlatformCreateWindow arguments 
+ * Added overrided to _GLFWWindow struct
+ */
+
 #ifndef _internal_h_
 #define _internal_h_
 
     GLboolean           decorated;
     GLboolean           visible;
     GLboolean           closed;
+    GLboolean           overrided;  /* Added by sepehr */
     void*               userPointer;
     GLFWvidmode         videoMode;
     _GLFWmonitor*       monitor;
  */
 int _glfwPlatformCreateWindow(_GLFWwindow* window,
                               const _GLFWwndconfig* wndconfig,
-                              const _GLFWfbconfig* fbconfig);
+                              const _GLFWfbconfig* fbconfig,
+                              void* override_wnd);
 
 /*! @ingroup platform
  */

3rdparty/glfw/src/win32_window.c

 //
 //========================================================================
 
+/**
+ * Edit: Sepehr Taghdisian (sep.tagh@gmail.com)
+ * modified createWindow, destroyWindow functions for override_wnd
+ */
+
 #include "internal.h"
 
 #include <stdlib.h>
 //
 static int createWindow(_GLFWwindow* window,
                         const _GLFWwndconfig* wndconfig,
-                        const _GLFWfbconfig* fbconfig)
+                        const _GLFWfbconfig* fbconfig,
+                        void* override_wnd)
 {
     int xpos, ypos, fullWidth, fullHeight;
     WCHAR* wideTitle;
         return GL_FALSE;
     }
 
-    window->win32.handle = CreateWindowEx(window->win32.dwExStyle,
-                                          _GLFW_WNDCLASSNAME,
-                                          wideTitle,
-                                          window->win32.dwStyle,
-                                          xpos, ypos,
-                                          fullWidth, fullHeight,
-                                          NULL, // No parent window
-                                          NULL, // No window menu
-                                          GetModuleHandle(NULL),
-                                          window); // Pass object to WM_CREATE
+    if (override_wnd == NULL)   {
+        window->win32.handle = CreateWindowEx(window->win32.dwExStyle,
+                                              _GLFW_WNDCLASSNAME,
+                                              wideTitle,
+                                              window->win32.dwStyle,
+                                              xpos, ypos,
+                                              fullWidth, fullHeight,
+                                              NULL, // No parent window
+                                              NULL, // No window menu
+                                              GetModuleHandle(NULL),
+                                              window); // Pass object to WM_CREATE
+    }   else    {
+        window->win32.handle = (HWND)override_wnd;
+        window->overrided = GL_TRUE;
+    }
 
     free(wideTitle);
 
-    if (!window->win32.handle)
+    if (!window->win32.handle || !IsWindow(window->win32.handle))
     {
         _glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to create window");
         return GL_FALSE;
 {
     _glfwDestroyContext(window);
 
-    if (window->win32.handle)
+    if (window->win32.handle && !window->overrided)
     {
         DestroyWindow(window->win32.handle);
-        window->win32.handle = NULL;
     }
+    window->win32.handle = NULL;
 }
 
 
 
 int _glfwPlatformCreateWindow(_GLFWwindow* window,
                               const _GLFWwndconfig* wndconfig,
-                              const _GLFWfbconfig* fbconfig)
+                              const _GLFWfbconfig* fbconfig,
+                              void* override_wnd)
 {
     int status;
 
-    if (!_glfw.win32.classAtom)
-    {
-        _glfw.win32.classAtom = registerWindowClass();
+    if (override_wnd == NULL)   {
         if (!_glfw.win32.classAtom)
-            return GL_FALSE;
+        {
+            _glfw.win32.classAtom = registerWindowClass();
+            if (!_glfw.win32.classAtom)
+                return GL_FALSE;
+        }
     }
 
-    if (!createWindow(window, wndconfig, fbconfig))
+    if (!createWindow(window, wndconfig, fbconfig, override_wnd))
         return GL_FALSE;
 
     status = _glfwAnalyzeContext(window, wndconfig, fbconfig);
         destroyWindow(window);
 
         // ...and then create them again, this time with better APIs
-        if (!createWindow(window, wndconfig, fbconfig))
+        if (!createWindow(window, wndconfig, fbconfig, override_wnd))
             return GL_FALSE;
     }
 

3rdparty/glfw/src/window.c

 GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
                                      const char* title,
                                      GLFWmonitor* monitor,
-                                     GLFWwindow* share)
+                                     GLFWwindow* share,
+                                     void* override_wnd)
 {
     _GLFWfbconfig fbconfig;
     _GLFWwndconfig wndconfig;
     previous = (_GLFWwindow*) glfwGetCurrentContext();
 
     // Open the actual window and create its context
-    if (!_glfwPlatformCreateWindow(window, &wndconfig, &fbconfig))
+    if (!_glfwPlatformCreateWindow(window, &wndconfig, &fbconfig, override_wnd))
     {
         glfwDestroyWindow((GLFWwindow*) window);
         glfwMakeContextCurrent((GLFWwindow*) previous);

3rdparty/include/glfw/glfw3.h

  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
+GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, 
+    GLFWwindow* share, void* override_wnd);
 
 /*! @brief Destroys the specified window and its context.
  *
 Credits
 -------
 - __Engine Developer:__ _Sepehr Taghdisian (sep.tagh@gmail.com)_
-- __Tools Developer:__ _Amin Valinejad (amin67v@gmail.com), [sharphammer](https://sharphammer.codeplex.com)_
+- __Tools Developer:__ _Amin Valinejad (amin67v@hotmail), [sharphammer](https://sharphammer.codeplex.com)_
 - __MacOSX port and build tools:__ _Davide Bacchet (davide.bacchet@gmail.com)_
 

include/core/types.h

 #define _OSX_
 #endif
 
-#if !defined(_OSX_) && !defined(_WIN_) && !defined(_LINUX_)
+#if (!defined(_OSX_) && !defined(_WIN_) && !defined(_LINUX_)) && !defined(SWIG)
 #error "Platform is not defined, use macros _WIN_, _LINUX_ or _OSX_"
 #endif
 
 #define _X64_
 #endif
 
-#if !defined(_X86_) && !defined(_X64_)
+#if (!defined(_X86_) && !defined(_X64_)) && !defined(SWIG)
 #error "CPU architecture is unknown, use either _X86_ or _X64_"
 #endif
 

include/engine/app.h

 
 /* */
 typedef void* app_t;
+typedef void* wnd_t;
 
 /* event callback definitions */
 typedef void (*pfn_app_create)(const char* wnd_name);
 ENGINE_API char* app_query_displaymodes();
 ENGINE_API void app_free_displaymodes(char* dispmodes);
 
-ENGINE_API result_t app_init(const char* name, const struct init_params* params);
+ENGINE_API result_t app_init(const char* name, const struct init_params* params, 
+    OPTIONAL wnd_t wnd_override);
 ENGINE_API void app_release();
 ENGINE_API void app_update();
 ENGINE_API void app_readjust(uint32 client_width, uint32 client_height);
 ENGINE_API const char* app_get_name();
 ENGINE_API bool_t app_isactive();
 
+/* for manual resize (automatically handled by app if wnd is not overrriden) */
+ENGINE_API result_t app_resize_window(OPTIONAL const char* name, uint32 width, uint32 height);
+
 #ifdef __cplusplus
 }
 #endif

src/engine/d3d/app-d3d.cpp

     bool_t always_active;
     bool_t init;
     bool_t d3d_dbg;
+    bool_t wnd_override;
 
     /* callbacks */
     pfn_app_create create_fn;
 void app_remove_swapchain(const char* name);
 const char* app_get_wndname(HWND hwnd);
 struct app_swapchain* app_find_swapchain(const char* wnd_name);
-result_t app_resize_window(OPTIONAL const char* name, uint32 width, uint32 height);
 
 /* inlines */
 INLINE const char* app_get_hwverstr(enum gfx_hwver hwver)
     return 0;
 }
 
-result_t app_init(const char* name, const struct init_params* params)
+result_t app_init(const char* name, const struct init_params* params, OPTIONAL wnd_t wnd_override)
 {
     ASSERT(g_app == NULL);
     if (g_app != NULL)  {
 
     HINSTANCE myinst = GetModuleHandle(NULL);
 
-    /* register window class */
-    WNDCLASSEX wndcls;
-    memset(&wndcls, 0x00, sizeof(WNDCLASSEX));
-    wndcls.cbSize =  sizeof(WNDCLASSEX);
-    wndcls.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
-    wndcls.lpfnWndProc = msg_callback;
-    wndcls.cbClsExtra = 0;
-    wndcls.cbWndExtra = 0;
-    wndcls.hInstance = myinst;
-    wndcls.hIcon = NULL;
-    wndcls.hCursor = LoadCursor(NULL, IDC_ARROW);
-    wndcls.hbrBackground = (HBRUSH)(GetStockObject(WHITE_BRUSH));
-    wndcls.lpszMenuName = NULL;
-    wndcls.lpszClassName = app->name;
-    wndcls.hIconSm = NULL;
-    if (!RegisterClassEx(&wndcls))  {
-        err_print(__FILE__, __LINE__, "win-app init failed");
-        app_release();
-        return RET_FAIL;
-    }
+    if (wnd_override == NULL)   {
+        /* register window class */
+        WNDCLASSEX wndcls;
+        memset(&wndcls, 0x00, sizeof(WNDCLASSEX));
+        wndcls.cbSize =  sizeof(WNDCLASSEX);
+        wndcls.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
+        wndcls.lpfnWndProc = msg_callback;
+        wndcls.cbClsExtra = 0;
+        wndcls.cbWndExtra = 0;
+        wndcls.hInstance = myinst;
+        wndcls.hIcon = NULL;
+        wndcls.hCursor = LoadCursor(NULL, IDC_ARROW);
+        wndcls.hbrBackground = (HBRUSH)(GetStockObject(WHITE_BRUSH));
+        wndcls.lpszMenuName = NULL;
+        wndcls.lpszClassName = app->name;
+        wndcls.hIconSm = NULL;
+        if (!RegisterClassEx(&wndcls))  {
+            err_print(__FILE__, __LINE__, "win-app init failed");
+            return RET_FAIL;
+        }
 
-    /* create window */
-    RECT wndrc = {0, 0, width, height};
-    uint32 x;
-    uint32 y;
+        /* create window */
+        RECT wndrc = {0, 0, width, height};
+        uint32 x;
+        uint32 y;
 
-    AdjustWindowRect(&wndrc, WS_OVERLAPPEDWINDOW, FALSE);
-    calc_screenpos(wndrc.right-wndrc.left, wndrc.bottom-wndrc.top, &x, &y);
-    app->hwnd = CreateWindow(app->name, 
-                             name, 
-                             WS_OVERLAPPEDWINDOW,
-                             x, y, 
-                             wndrc.right - wndrc.left,
-                             wndrc.bottom - wndrc.top,
-                             NULL, NULL,
-                             myinst,
-                             NULL);
-    if (app->hwnd == NULL)  {
-        err_print(__FILE__, __LINE__, "win-app init failed: could not create window");
-        app_release();
-        return RET_FAIL;
+        AdjustWindowRect(&wndrc, WS_OVERLAPPEDWINDOW, FALSE);
+        calc_screenpos(wndrc.right-wndrc.left, wndrc.bottom-wndrc.top, &x, &y);
+        app->hwnd = CreateWindow(app->name, 
+                                 name, 
+                                 WS_OVERLAPPEDWINDOW,
+                                 x, y, 
+                                 wndrc.right - wndrc.left,
+                                 wndrc.bottom - wndrc.top,
+                                 NULL, NULL,
+                                 myinst,
+                                 NULL);
+        if (app->hwnd == NULL)  {
+            err_print(__FILE__, __LINE__, "win-app init failed: could not create window");
+            return RET_FAIL;
+        }
+    }   else    {
+        HWND hwnd = (HWND)wnd_override;
+        if (!IsWindow(hwnd))    {
+            err_print(__FILE__, __LINE__, "win-app init failed: invalid window override handle");
+            return RET_FAIL;
+        }
+        app->hwnd = hwnd;
+        app->wnd_override = TRUE;
     }
 
     /* init DXGI */
     /* release main dx-sdk objects */
     app_release_dxgi();
 
-    if (wapp->hwnd != NULL && IsWindow(wapp->hwnd)) 
-        DestroyWindow(wapp->hwnd);
+    if (!wapp->wnd_override)    {
+        if (wapp->hwnd != NULL && IsWindow(wapp->hwnd)) 
+            DestroyWindow(wapp->hwnd);
+        UnregisterClass(wapp->name, wapp->pinst);
+    }
 
-    UnregisterClass(wapp->name, wapp->pinst);
     FREE(wapp);
     g_app = NULL;
 }
 {
     ASSERT(g_app);
     struct app_win* wapp = g_app;
+    if (wapp->wnd_override)
+        return;
 
     MSG msg;
     bool_t quit = FALSE;
     ASSERT(g_app);
 
     struct app_win* app = g_app;
+
+    if (app->wnd_override)
+        return;
+
     RECT wnd_rect = {0, 0, 
         (client_width!=0) ? client_width : app->width, 
         (client_height!=0) ? client_height : app->height};
 {
     struct app_swapchain* sc = wnd_name != NULL ? app_find_swapchain(wnd_name) : 
         g_app->render_target;
-    if (sc != NULL)
+    if (sc != NULL && !g_app->wnd_override)
         ShowWindow(sc->hwnd, SW_SHOW);
 }
 
 {
     struct app_swapchain* sc = wnd_name != NULL ? app_find_swapchain(wnd_name) : 
         g_app->render_target;
-    if (sc != NULL)
+    if (sc != NULL && !g_app->wnd_override)
         ShowWindow(sc->hwnd, SW_HIDE);
 }
 

src/engine/gl/app-gl.c

 struct app_wnd* app_find_window(const char* wnd_name);
 struct app_wnd* app_find_window_byhdl(GLFWwindow* w);
 struct app_wnd* app_add_window(const char* name, uint32 width, uint32 height, uint32 refresh_rate, 
-    bool_t fullscreen);
+    bool_t fullscreen, void* wnd_override);
 void app_remove_window(const char* name);
 
 void APIENTRY app_gl_debug_callback(GLenum source, GLenum type, GLuint id, GLenum severity,
 }
 
 /*************************************************************************************************/
-result_t app_init(const char* name, const struct init_params* params)
+result_t app_init(const char* name, const struct init_params* params,
+    OPTIONAL wnd_t wnd_override)
 {
     ASSERT(g_app == NULL);
 
 
     log_print(LOG_INFO, "  init OpenGL ...");
     struct app_wnd* wnd = app_add_window(app->name, width, height, 0, 
-        BIT_CHECK(params->gfx.flags, GFX_FLAG_FULLSCREEN));
+        BIT_CHECK(params->gfx.flags, GFX_FLAG_FULLSCREEN), wnd_override);
     if (wnd == NULL)    {
         err_print(__FILE__, __LINE__, "gl-app init failed: coult not create main context/window");
         return RET_FAIL;
 }
 
 struct app_wnd* app_add_window(const char* name, uint32 width, uint32 height, uint32 refresh_rate, 
-    bool_t fullscreen)
+    bool_t fullscreen, void* wnd_override)
 {
     struct app_wnd* wnd = ALLOC(sizeof(struct app_wnd), 0);
     ASSERT(wnd);
     GLFWmonitor* mon = fullscreen ? glfwGetPrimaryMonitor() : NULL;
 
     wnd->w = glfwCreateWindow((int)width, (int)height, name, mon, 
-        (g_app->main_wnd != NULL) ? g_app->main_wnd->w : NULL);
+        (g_app->main_wnd != NULL) ? g_app->main_wnd->w : NULL, wnd_override);
     if (wnd->w == NULL) {
         err_print(__FILE__, __LINE__, "create window/context failed");
         FREE(wnd);

src/engine/pybind/pyeng.py

-# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.9
-#
-# Do not make changes to this file unless you know what you are doing--modify
-# the SWIG interface file instead.
-
-
-
-from sys import version_info
-if version_info >= (2,6,0):
-    def swig_import_helper():
-        from os.path import dirname
-        import imp
-        fp = None
-        try:
-            fp, pathname, description = imp.find_module('_pyeng', [dirname(__file__)])
-        except ImportError:
-            import _pyeng
-            return _pyeng
-        if fp is not None:
-            try:
-                _mod = imp.load_module('_pyeng', fp, pathname, description)
-            finally:
-                fp.close()
-            return _mod
-    _pyeng = swig_import_helper()
-    del swig_import_helper
-else:
-    import _pyeng
-del version_info
-try:
-    _swig_property = property
-except NameError:
-    pass # Python < 2.2 doesn't have 'property'.
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
-    if (name == "thisown"): return self.this.own(value)
-    if (name == "this"):
-        if type(value).__name__ == 'SwigPyObject':
-            self.__dict__[name] = value
-            return
-    method = class_type.__swig_setmethods__.get(name,None)
-    if method: return method(self,value)
-    if (not static):
-        self.__dict__[name] = value
-    else:
-        raise AttributeError("You cannot add attributes to %s" % self)
-
-def _swig_setattr(self,class_type,name,value):
-    return _swig_setattr_nondynamic(self,class_type,name,value,0)
-
-def _swig_getattr(self,class_type,name):
-    if (name == "thisown"): return self.this.own()
-    method = class_type.__swig_getmethods__.get(name,None)
-    if method: return method(self)
-    raise AttributeError(name)
-
-def _swig_repr(self):
-    try: strthis = "proxy of " + self.this.__repr__()
-    except: strthis = ""
-    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
-
-try:
-    _object = object
-    _newclass = 1
-except AttributeError:
-    class _object : pass
-    _newclass = 0
-
-
-
-def core_init(*args):
-  return _pyeng.core_init(*args)
-core_init = _pyeng.core_init
-
-def core_release(*args):
-  return _pyeng.core_release(*args)
-core_release = _pyeng.core_release
-LOG_TEXT = _pyeng.LOG_TEXT
-LOG_ERROR = _pyeng.LOG_ERROR
-LOG_WARNING = _pyeng.LOG_WARNING
-LOG_INFO = _pyeng.LOG_INFO
-LOG_LOAD = _pyeng.LOG_LOAD
-
-def log_outputconsole(*args):
-  return _pyeng.log_outputconsole(*args)
-log_outputconsole = _pyeng.log_outputconsole
-
-def log_outputfile(*args):
-  return _pyeng.log_outputfile(*args)
-log_outputfile = _pyeng.log_outputfile
-
-def log_outputdebugger(*args):
-  return _pyeng.log_outputdebugger(*args)
-log_outputdebugger = _pyeng.log_outputdebugger
-RET_OK = _pyeng.RET_OK
-RET_FAIL = _pyeng.RET_FAIL
-
-def err_print(*args):
-  return _pyeng.err_print(*args)
-err_print = _pyeng.err_print
-
-def err_getcode():
-  return _pyeng.err_getcode()
-err_getcode = _pyeng.err_getcode
-
-def err_sendtolog(*args):
-  return _pyeng.err_sendtolog(*args)
-err_sendtolog = _pyeng.err_sendtolog
-
-def err_getstring():
-  return _pyeng.err_getstring()
-err_getstring = _pyeng.err_getstring
-
-def err_clear():
-  return _pyeng.err_clear()
-err_clear = _pyeng.err_clear
-
-def err_haserrors():
-  return _pyeng.err_haserrors()
-err_haserrors = _pyeng.err_haserrors
-
-def math_torad(*args):
-  return _pyeng.math_torad(*args)
-math_torad = _pyeng.math_torad
-
-def math_todeg(*args):
-  return _pyeng.math_todeg(*args)
-math_todeg = _pyeng.math_todeg
-
-def math_isequal(*args):
-  return _pyeng.math_isequal(*args)
-math_isequal = _pyeng.math_isequal
-
-def io_addvdir(*args):
-  return _pyeng.io_addvdir(*args)
-io_addvdir = _pyeng.io_addvdir
-
-def io_clearvdirs():
-  return _pyeng.io_clearvdirs()
-io_clearvdirs = _pyeng.io_clearvdirs
-
-def hash_murmur32(*args):
-  return _pyeng.hash_murmur32(*args)
-hash_murmur32 = _pyeng.hash_murmur32
-
-def str_toptr(*args):
-  return _pyeng.str_toptr(*args)
-str_toptr = _pyeng.str_toptr
-class vec4f(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, vec4f, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, vec4f, name)
-    __repr__ = _swig_repr
-    __swig_setmethods__["x"] = _pyeng.vec4f_x_set
-    __swig_getmethods__["x"] = _pyeng.vec4f_x_get
-    if _newclass:x = _swig_property(_pyeng.vec4f_x_get, _pyeng.vec4f_x_set)
-    __swig_setmethods__["y"] = _pyeng.vec4f_y_set
-    __swig_getmethods__["y"] = _pyeng.vec4f_y_get
-    if _newclass:y = _swig_property(_pyeng.vec4f_y_get, _pyeng.vec4f_y_set)
-    __swig_setmethods__["z"] = _pyeng.vec4f_z_set
-    __swig_getmethods__["z"] = _pyeng.vec4f_z_get
-    if _newclass:z = _swig_property(_pyeng.vec4f_z_get, _pyeng.vec4f_z_set)
-    __swig_setmethods__["w"] = _pyeng.vec4f_w_set
-    __swig_getmethods__["w"] = _pyeng.vec4f_w_get
-    if _newclass:w = _swig_property(_pyeng.vec4f_w_get, _pyeng.vec4f_w_set)
-    def __init__(self): 
-        this = _pyeng.new_vec4f()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _pyeng.delete_vec4f
-    __del__ = lambda self : None;
-vec4f_swigregister = _pyeng.vec4f_swigregister
-vec4f_swigregister(vec4f)
-
-
-def vec3_setf(*args):
-  return _pyeng.vec3_setf(*args)
-vec3_setf = _pyeng.vec3_setf
-MSAA_NONE = _pyeng.MSAA_NONE
-MSAA_2X = _pyeng.MSAA_2X
-MSAA_4X = _pyeng.MSAA_4X
-MSAA_8X = _pyeng.MSAA_8X
-TEXTURE_QUALITY_HIGH = _pyeng.TEXTURE_QUALITY_HIGH
-TEXTURE_QUALITY_NORMAL = _pyeng.TEXTURE_QUALITY_NORMAL
-TEXTURE_QUALITY_LOW = _pyeng.TEXTURE_QUALITY_LOW
-TEXTURE_QUALITY_HIGHEST = _pyeng.TEXTURE_QUALITY_HIGHEST
-TEXTURE_FILTER_TRILINEAR = _pyeng.TEXTURE_FILTER_TRILINEAR
-TEXTURE_FILTER_BILINEAR = _pyeng.TEXTURE_FILTER_BILINEAR
-TEXTURE_FILTER_ANISO2X = _pyeng.TEXTURE_FILTER_ANISO2X
-TEXTURE_FILTER_ANISO4X = _pyeng.TEXTURE_FILTER_ANISO4X
-TEXTURE_FILTER_ANISO8X = _pyeng.TEXTURE_FILTER_ANISO8X
-TEXTURE_FILTER_ANISO16X = _pyeng.TEXTURE_FILTER_ANISO16X
-SHADING_QUALITY_LOW = _pyeng.SHADING_QUALITY_LOW
-SHADING_QUALITY_NORMAL = _pyeng.SHADING_QUALITY_NORMAL
-SHADING_QUALITY_HIGH = _pyeng.SHADING_QUALITY_HIGH
-GFX_HWVER_UNKNOWN = _pyeng.GFX_HWVER_UNKNOWN
-GFX_HWVER_D3D11_0 = _pyeng.GFX_HWVER_D3D11_0
-GFX_HWVER_D3D10_1 = _pyeng.GFX_HWVER_D3D10_1
-GFX_HWVER_D3D10_0 = _pyeng.GFX_HWVER_D3D10_0
-GFX_HWVER_GL4_2 = _pyeng.GFX_HWVER_GL4_2
-GFX_HWVER_GL4_0 = _pyeng.GFX_HWVER_GL4_0
-GFX_HWVER_GL3_3 = _pyeng.GFX_HWVER_GL3_3
-GFX_HWVER_GL3_2 = _pyeng.GFX_HWVER_GL3_2
-GFX_HWVER_GL3_0 = _pyeng.GFX_HWVER_GL3_0
-GFX_FLAG_FULLSCREEN = _pyeng.GFX_FLAG_FULLSCREEN
-GFX_FLAG_VSYNC = _pyeng.GFX_FLAG_VSYNC
-GFX_FLAG_DEBUG = _pyeng.GFX_FLAG_DEBUG
-GFX_FLAG_FXAA = _pyeng.GFX_FLAG_FXAA
-GFX_FLAG_REBUILDSHADERS = _pyeng.GFX_FLAG_REBUILDSHADERS
-ENG_FLAG_DEBUG = _pyeng.ENG_FLAG_DEBUG
-ENG_FLAG_DEV = _pyeng.ENG_FLAG_DEV
-ENG_FLAG_EDITOR = _pyeng.ENG_FLAG_EDITOR
-ENG_FLAG_CONSOLE = _pyeng.ENG_FLAG_CONSOLE
-class dev_params(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, dev_params, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, dev_params, name)
-    __repr__ = _swig_repr
-    __swig_setmethods__["fpsgraph_max"] = _pyeng.dev_params_fpsgraph_max_set
-    __swig_getmethods__["fpsgraph_max"] = _pyeng.dev_params_fpsgraph_max_get
-    if _newclass:fpsgraph_max = _swig_property(_pyeng.dev_params_fpsgraph_max_get, _pyeng.dev_params_fpsgraph_max_set)
-    __swig_setmethods__["ftgraph_max"] = _pyeng.dev_params_ftgraph_max_set
-    __swig_getmethods__["ftgraph_max"] = _pyeng.dev_params_ftgraph_max_get
-    if _newclass:ftgraph_max = _swig_property(_pyeng.dev_params_ftgraph_max_get, _pyeng.dev_params_ftgraph_max_set)
-    __swig_setmethods__["webserver_port"] = _pyeng.dev_params_webserver_port_set
-    __swig_getmethods__["webserver_port"] = _pyeng.dev_params_webserver_port_get
-    if _newclass:webserver_port = _swig_property(_pyeng.dev_params_webserver_port_get, _pyeng.dev_params_webserver_port_set)
-    def __init__(self): 
-        this = _pyeng.new_dev_params()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _pyeng.delete_dev_params
-    __del__ = lambda self : None;
-dev_params_swigregister = _pyeng.dev_params_swigregister
-dev_params_swigregister(dev_params)
-
-class gfx_params(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, gfx_params, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, gfx_params, name)
-    __repr__ = _swig_repr
-    __swig_setmethods__["flags"] = _pyeng.gfx_params_flags_set
-    __swig_getmethods__["flags"] = _pyeng.gfx_params_flags_get
-    if _newclass:flags = _swig_property(_pyeng.gfx_params_flags_get, _pyeng.gfx_params_flags_set)
-    __swig_setmethods__["msaa"] = _pyeng.gfx_params_msaa_set
-    __swig_getmethods__["msaa"] = _pyeng.gfx_params_msaa_get
-    if _newclass:msaa = _swig_property(_pyeng.gfx_params_msaa_get, _pyeng.gfx_params_msaa_set)
-    __swig_setmethods__["tex_quality"] = _pyeng.gfx_params_tex_quality_set
-    __swig_getmethods__["tex_quality"] = _pyeng.gfx_params_tex_quality_get
-    if _newclass:tex_quality = _swig_property(_pyeng.gfx_params_tex_quality_get, _pyeng.gfx_params_tex_quality_set)
-    __swig_setmethods__["tex_filter"] = _pyeng.gfx_params_tex_filter_set
-    __swig_getmethods__["tex_filter"] = _pyeng.gfx_params_tex_filter_get
-    if _newclass:tex_filter = _swig_property(_pyeng.gfx_params_tex_filter_get, _pyeng.gfx_params_tex_filter_set)
-    __swig_setmethods__["shading_quality"] = _pyeng.gfx_params_shading_quality_set
-    __swig_getmethods__["shading_quality"] = _pyeng.gfx_params_shading_quality_get
-    if _newclass:shading_quality = _swig_property(_pyeng.gfx_params_shading_quality_get, _pyeng.gfx_params_shading_quality_set)
-    __swig_setmethods__["hwver"] = _pyeng.gfx_params_hwver_set
-    __swig_getmethods__["hwver"] = _pyeng.gfx_params_hwver_get
-    if _newclass:hwver = _swig_property(_pyeng.gfx_params_hwver_get, _pyeng.gfx_params_hwver_set)
-    __swig_setmethods__["adapter_id"] = _pyeng.gfx_params_adapter_id_set
-    __swig_getmethods__["adapter_id"] = _pyeng.gfx_params_adapter_id_get
-    if _newclass:adapter_id = _swig_property(_pyeng.gfx_params_adapter_id_get, _pyeng.gfx_params_adapter_id_set)
-    __swig_setmethods__["width"] = _pyeng.gfx_params_width_set
-    __swig_getmethods__["width"] = _pyeng.gfx_params_width_get
-    if _newclass:width = _swig_property(_pyeng.gfx_params_width_get, _pyeng.gfx_params_width_set)
-    __swig_setmethods__["height"] = _pyeng.gfx_params_height_set
-    __swig_getmethods__["height"] = _pyeng.gfx_params_height_get
-    if _newclass:height = _swig_property(_pyeng.gfx_params_height_get, _pyeng.gfx_params_height_set)
-    __swig_setmethods__["refresh_rate"] = _pyeng.gfx_params_refresh_rate_set
-    __swig_getmethods__["refresh_rate"] = _pyeng.gfx_params_refresh_rate_get
-    if _newclass:refresh_rate = _swig_property(_pyeng.gfx_params_refresh_rate_get, _pyeng.gfx_params_refresh_rate_set)
-    __swig_setmethods__["wnd"] = _pyeng.gfx_params_wnd_set
-    __swig_getmethods__["wnd"] = _pyeng.gfx_params_wnd_get
-    if _newclass:wnd = _swig_property(_pyeng.gfx_params_wnd_get, _pyeng.gfx_params_wnd_set)
-    def __init__(self): 
-        this = _pyeng.new_gfx_params()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _pyeng.delete_gfx_params
-    __del__ = lambda self : None;
-gfx_params_swigregister = _pyeng.gfx_params_swigregister
-gfx_params_swigregister(gfx_params)
-
-class init_params(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, init_params, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, init_params, name)
-    __repr__ = _swig_repr
-    __swig_setmethods__["flags"] = _pyeng.init_params_flags_set
-    __swig_getmethods__["flags"] = _pyeng.init_params_flags_get
-    if _newclass:flags = _swig_property(_pyeng.init_params_flags_get, _pyeng.init_params_flags_set)
-    __swig_setmethods__["lock_fps"] = _pyeng.init_params_lock_fps_set
-    __swig_getmethods__["lock_fps"] = _pyeng.init_params_lock_fps_get
-    if _newclass:lock_fps = _swig_property(_pyeng.init_params_lock_fps_get, _pyeng.init_params_lock_fps_set)
-    __swig_setmethods__["console_lines_max"] = _pyeng.init_params_console_lines_max_set
-    __swig_getmethods__["console_lines_max"] = _pyeng.init_params_console_lines_max_get
-    if _newclass:console_lines_max = _swig_property(_pyeng.init_params_console_lines_max_get, _pyeng.init_params_console_lines_max_set)
-    __swig_setmethods__["gfx"] = _pyeng.init_params_gfx_set
-    __swig_getmethods__["gfx"] = _pyeng.init_params_gfx_get
-    if _newclass:gfx = _swig_property(_pyeng.init_params_gfx_get, _pyeng.init_params_gfx_set)
-    __swig_setmethods__["dev"] = _pyeng.init_params_dev_set
-    __swig_getmethods__["dev"] = _pyeng.init_params_dev_get
-    if _newclass:dev = _swig_property(_pyeng.init_params_dev_get, _pyeng.init_params_dev_set)
-    __swig_setmethods__["data_dir"] = _pyeng.init_params_data_dir_set
-    __swig_getmethods__["data_dir"] = _pyeng.init_params_data_dir_get
-    if _newclass:data_dir = _swig_property(_pyeng.init_params_data_dir_get, _pyeng.init_params_data_dir_set)
-    def __init__(self): 
-        this = _pyeng.new_init_params()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _pyeng.delete_init_params
-    __del__ = lambda self : None;
-init_params_swigregister = _pyeng.init_params_swigregister
-init_params_swigregister(init_params)
-
-
-def eng_init(*args):
-  return _pyeng.eng_init(*args)
-eng_init = _pyeng.eng_init
-
-def eng_release():
-  return _pyeng.eng_release()
-eng_release = _pyeng.eng_release
-
-def eng_update():
-  return _pyeng.eng_update()
-eng_update = _pyeng.eng_update
-
-def eng_get_framealloc():
-  return _pyeng.eng_get_framealloc()
-eng_get_framealloc = _pyeng.eng_get_framealloc
-
-def eng_get_lsralloc():
-  return _pyeng.eng_get_lsralloc()
-eng_get_lsralloc = _pyeng.eng_get_lsralloc
-
-def eng_get_dataalloc():
-  return _pyeng.eng_get_dataalloc()
-eng_get_dataalloc = _pyeng.eng_get_dataalloc
-class camera(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, camera, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, camera, name)
-    __repr__ = _swig_repr
-    __swig_setmethods__["look"] = _pyeng.camera_look_set
-    __swig_getmethods__["look"] = _pyeng.camera_look_get
-    if _newclass:look = _swig_property(_pyeng.camera_look_get, _pyeng.camera_look_set)
-    __swig_setmethods__["pos"] = _pyeng.camera_pos_set
-    __swig_getmethods__["pos"] = _pyeng.camera_pos_get
-    if _newclass:pos = _swig_property(_pyeng.camera_pos_get, _pyeng.camera_pos_set)
-    __swig_setmethods__["fnear"] = _pyeng.camera_fnear_set
-    __swig_getmethods__["fnear"] = _pyeng.camera_fnear_get
-    if _newclass:fnear = _swig_property(_pyeng.camera_fnear_get, _pyeng.camera_fnear_set)
-    __swig_setmethods__["ffar"] = _pyeng.camera_ffar_set
-    __swig_getmethods__["ffar"] = _pyeng.camera_ffar_get
-    if _newclass:ffar = _swig_property(_pyeng.camera_ffar_get, _pyeng.camera_ffar_set)
-    __swig_setmethods__["fov"] = _pyeng.camera_fov_set
-    __swig_getmethods__["fov"] = _pyeng.camera_fov_get
-    if _newclass:fov = _swig_property(_pyeng.camera_fov_get, _pyeng.camera_fov_set)
-    __swig_setmethods__["aspect"] = _pyeng.camera_aspect_set
-    __swig_getmethods__["aspect"] = _pyeng.camera_aspect_get
-    if _newclass:aspect = _swig_property(_pyeng.camera_aspect_get, _pyeng.camera_aspect_set)
-    def __init__(self): 
-        this = _pyeng.new_camera()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _pyeng.delete_camera
-    __del__ = lambda self : None;
-camera_swigregister = _pyeng.camera_swigregister
-camera_swigregister(camera)
-
-
-def cam_init(*args):
-  return _pyeng.cam_init(*args)
-cam_init = _pyeng.cam_init
-
-def cam_set_pitchconst(*args):
-  return _pyeng.cam_set_pitchconst(*args)
-cam_set_pitchconst = _pyeng.cam_set_pitchconst
-
-def cam_set_viewsize(*args):
-  return _pyeng.cam_set_viewsize(*args)
-cam_set_viewsize = _pyeng.cam_set_viewsize
-
-def cam_update(*args):
-  return _pyeng.cam_update(*args)
-cam_update = _pyeng.cam_update
-
-def cam_pitch(*args):
-  return _pyeng.cam_pitch(*args)
-cam_pitch = _pyeng.cam_pitch
-
-def cam_yaw(*args):
-  return _pyeng.cam_yaw(*args)
-cam_yaw = _pyeng.cam_yaw
-
-def cam_roll(*args):
-  return _pyeng.cam_roll(*args)
-cam_roll = _pyeng.cam_roll
-
-def cam_fwd(*args):
-  return _pyeng.cam_fwd(*args)
-cam_fwd = _pyeng.cam_fwd
-
-def cam_strafe(*args):
-  return _pyeng.cam_strafe(*args)
-cam_strafe = _pyeng.cam_strafe
-
-def scn_create_scene(*args):
-  return _pyeng.scn_create_scene(*args)
-scn_create_scene = _pyeng.scn_create_scene
-
-def scn_destroy_scene(*args):
-  return _pyeng.scn_destroy_scene(*args)
-scn_destroy_scene = _pyeng.scn_destroy_scene
-
-def scn_setactive(*args):
-  return _pyeng.scn_setactive(*args)
-scn_setactive = _pyeng.scn_setactive
-
-def scn_getactive():
-  return _pyeng.scn_getactive()
-scn_getactive = _pyeng.scn_getactive
-
-def scn_setcam(*args):
-  return _pyeng.scn_setcam(*args)
-scn_setcam = _pyeng.scn_setcam
-
-def scn_getcam():
-  return _pyeng.scn_getcam()
-scn_getcam = _pyeng.scn_getcam
-
-def gfx_resize(*args):
-  return _pyeng.gfx_resize(*args)
-gfx_resize = _pyeng.gfx_resize
-
-def gfx_set_debug_renderfunc(*args):
-  return _pyeng.gfx_set_debug_renderfunc(*args)
-gfx_set_debug_renderfunc = _pyeng.gfx_set_debug_renderfunc
-gfx_render_grid = _pyeng.gfx_render_grid
-INPUT_MOUSEKEY_NONE = _pyeng.INPUT_MOUSEKEY_NONE
-INPUT_MOUSEKEY_LEFT = _pyeng.INPUT_MOUSEKEY_LEFT
-INPUT_MOUSEKEY_RIGHT = _pyeng.INPUT_MOUSEKEY_RIGHT
-INPUT_MOUSEKEY_MIDDLE = _pyeng.INPUT_MOUSEKEY_MIDDLE
-INPUT_MOUSEKEY_WHEELUP = _pyeng.INPUT_MOUSEKEY_WHEELUP
-INPUT_MOUSEKEY_WHEELDWN = _pyeng.INPUT_MOUSEKEY_WHEELDWN
-INPUT_KEY_ESC = _pyeng.INPUT_KEY_ESC
-INPUT_KEY_F1 = _pyeng.INPUT_KEY_F1
-INPUT_KEY_F2 = _pyeng.INPUT_KEY_F2
-INPUT_KEY_F3 = _pyeng.INPUT_KEY_F3
-INPUT_KEY_F4 = _pyeng.INPUT_KEY_F4
-INPUT_KEY_F5 = _pyeng.INPUT_KEY_F5
-INPUT_KEY_F6 = _pyeng.INPUT_KEY_F6
-INPUT_KEY_F7 = _pyeng.INPUT_KEY_F7
-INPUT_KEY_F8 = _pyeng.INPUT_KEY_F8
-INPUT_KEY_F9 = _pyeng.INPUT_KEY_F9
-INPUT_KEY_F10 = _pyeng.INPUT_KEY_F10
-INPUT_KEY_F11 = _pyeng.INPUT_KEY_F11
-INPUT_KEY_F12 = _pyeng.INPUT_KEY_F12
-INPUT_KEY_PRINTSCREEN = _pyeng.INPUT_KEY_PRINTSCREEN
-INPUT_KEY_BREAK = _pyeng.INPUT_KEY_BREAK
-INPUT_KEY_TILDE = _pyeng.INPUT_KEY_TILDE
-INPUT_KEY_1 = _pyeng.INPUT_KEY_1
-INPUT_KEY_2 = _pyeng.INPUT_KEY_2
-INPUT_KEY_3 = _pyeng.INPUT_KEY_3
-INPUT_KEY_4 = _pyeng.INPUT_KEY_4
-INPUT_KEY_5 = _pyeng.INPUT_KEY_5
-INPUT_KEY_6 = _pyeng.INPUT_KEY_6
-INPUT_KEY_7 = _pyeng.INPUT_KEY_7
-INPUT_KEY_8 = _pyeng.INPUT_KEY_8
-INPUT_KEY_9 = _pyeng.INPUT_KEY_9
-INPUT_KEY_0 = _pyeng.INPUT_KEY_0
-INPUT_KEY_DASH = _pyeng.INPUT_KEY_DASH
-INPUT_KEY_EQUAL = _pyeng.INPUT_KEY_EQUAL
-INPUT_KEY_BACKSPACE = _pyeng.INPUT_KEY_BACKSPACE
-INPUT_KEY_TAB = _pyeng.INPUT_KEY_TAB
-INPUT_KEY_Q = _pyeng.INPUT_KEY_Q
-INPUT_KEY_W = _pyeng.INPUT_KEY_W
-INPUT_KEY_E = _pyeng.INPUT_KEY_E
-INPUT_KEY_R = _pyeng.INPUT_KEY_R
-INPUT_KEY_T = _pyeng.INPUT_KEY_T
-INPUT_KEY_Y = _pyeng.INPUT_KEY_Y
-INPUT_KEY_U = _pyeng.INPUT_KEY_U
-INPUT_KEY_I = _pyeng.INPUT_KEY_I
-INPUT_KEY_O = _pyeng.INPUT_KEY_O
-INPUT_KEY_P = _pyeng.INPUT_KEY_P
-INPUT_KEY_BRACKET_OPEN = _pyeng.INPUT_KEY_BRACKET_OPEN
-INPUT_KEY_BEACKET_CLOSE = _pyeng.INPUT_KEY_BEACKET_CLOSE
-INPUT_KEY_BACKSLASH = _pyeng.INPUT_KEY_BACKSLASH
-INPUT_KEY_CAPS = _pyeng.INPUT_KEY_CAPS
-INPUT_KEY_A = _pyeng.INPUT_KEY_A
-INPUT_KEY_S = _pyeng.INPUT_KEY_S
-INPUT_KEY_D = _pyeng.INPUT_KEY_D
-INPUT_KEY_F = _pyeng.INPUT_KEY_F
-INPUT_KEY_G = _pyeng.INPUT_KEY_G
-INPUT_KEY_H = _pyeng.INPUT_KEY_H
-INPUT_KEY_J = _pyeng.INPUT_KEY_J
-INPUT_KEY_K = _pyeng.INPUT_KEY_K
-INPUT_KEY_L = _pyeng.INPUT_KEY_L
-INPUT_KEY_SEMICOLON = _pyeng.INPUT_KEY_SEMICOLON
-INPUT_KEY_QUOTE = _pyeng.INPUT_KEY_QUOTE
-INPUT_KEY_ENTER = _pyeng.INPUT_KEY_ENTER
-INPUT_KEY_LSHIFT = _pyeng.INPUT_KEY_LSHIFT
-INPUT_KEY_Z = _pyeng.INPUT_KEY_Z
-INPUT_KEY_X = _pyeng.INPUT_KEY_X
-INPUT_KEY_C = _pyeng.INPUT_KEY_C
-INPUT_KEY_V = _pyeng.INPUT_KEY_V
-INPUT_KEY_B = _pyeng.INPUT_KEY_B
-INPUT_KEY_N = _pyeng.INPUT_KEY_N
-INPUT_KEY_M = _pyeng.INPUT_KEY_M
-INPUT_KEY_COMMA = _pyeng.INPUT_KEY_COMMA
-INPUT_KEY_DOT = _pyeng.INPUT_KEY_DOT
-INPUT_KEY_SLASH = _pyeng.INPUT_KEY_SLASH
-INPUT_KEY_RSHIFT = _pyeng.INPUT_KEY_RSHIFT
-INPUT_KEY_LCTRL = _pyeng.INPUT_KEY_LCTRL
-INPUT_KEY_LALT = _pyeng.INPUT_KEY_LALT
-INPUT_KEY_SPACE = _pyeng.INPUT_KEY_SPACE
-INPUT_KEY_RALT = _pyeng.INPUT_KEY_RALT
-INPUT_KEY_RCTRL = _pyeng.INPUT_KEY_RCTRL
-INPUT_KEY_DELETE = _pyeng.INPUT_KEY_DELETE
-INPUT_KEY_INSERT = _pyeng.INPUT_KEY_INSERT
-INPUT_KEY_HOME = _pyeng.INPUT_KEY_HOME
-INPUT_KEY_END = _pyeng.INPUT_KEY_END
-INPUT_KEY_PGUP = _pyeng.INPUT_KEY_PGUP
-INPUT_KEY_PGDWN = _pyeng.INPUT_KEY_PGDWN
-INPUT_KEY_UP = _pyeng.INPUT_KEY_UP
-INPUT_KEY_DOWN = _pyeng.INPUT_KEY_DOWN
-INPUT_KEY_LEFT = _pyeng.INPUT_KEY_LEFT
-INPUT_KEY_RIGHT = _pyeng.INPUT_KEY_RIGHT
-INPUT_KEY_NUM_SLASH = _pyeng.INPUT_KEY_NUM_SLASH
-INPUT_KEY_NUM_MULTIPLY = _pyeng.INPUT_KEY_NUM_MULTIPLY
-INPUT_KEY_NUM_MINUS = _pyeng.INPUT_KEY_NUM_MINUS
-INPUT_KEY_NUM_PLUS = _pyeng.INPUT_KEY_NUM_PLUS
-INPUT_KEY_NUM_ENTER = _pyeng.INPUT_KEY_NUM_ENTER
-INPUT_KEY_NUM_DOT = _pyeng.INPUT_KEY_NUM_DOT
-INPUT_KEY_NUM_1 = _pyeng.INPUT_KEY_NUM_1
-INPUT_KEY_NUM_2 = _pyeng.INPUT_KEY_NUM_2
-INPUT_KEY_NUM_3 = _pyeng.INPUT_KEY_NUM_3
-INPUT_KEY_NUM_4 = _pyeng.INPUT_KEY_NUM_4
-INPUT_KEY_NUM_5 = _pyeng.INPUT_KEY_NUM_5
-INPUT_KEY_NUM_6 = _pyeng.INPUT_KEY_NUM_6
-INPUT_KEY_NUM_7 = _pyeng.INPUT_KEY_NUM_7
-INPUT_KEY_NUM_8 = _pyeng.INPUT_KEY_NUM_8
-INPUT_KEY_NUM_9 = _pyeng.INPUT_KEY_NUM_9
-INPUT_KEY_NUM_0 = _pyeng.INPUT_KEY_NUM_0
-INPUT_KEY_NUM_LOCK = _pyeng.INPUT_KEY_NUM_LOCK
-
-def input_get_kbhit(*args):
-  return _pyeng.input_get_kbhit(*args)
-input_get_kbhit = _pyeng.input_get_kbhit
-
-def input_get_mouse():
-  return _pyeng.input_get_mouse()
-input_get_mouse = _pyeng.input_get_mouse
-
-def input_update(*args):
-  return _pyeng.input_update(*args)
-input_update = _pyeng.input_update
-# This file is compatible with both classic and new-style classes.
-
-

src/engine/pybind/pyengine.i

  ***********************************************************************************/
 
 #if defined(SWIG)
-%module pyeng
+%module dheng
 
 %{
 #include "core/core.h"
 #include "core/hash.h"
 #include "core/vec-math.h"
 #include "core/std-math.h"
-#include "../engine.h"
-#include "../camera.h"
-#include "../scene-mgr.h"
-#include "../gfx.h"
-#include "../input.h"
-#include "pyalloc.h"
+#include "engine.h"
+#include "camera.h"
+#include "scene-mgr.h"
+#include "gfx.h"
+#include "input.h"
+#include "app.h"
+#include "script.h"
+#include "pybind/pyalloc.h"
 %}
 
 %include "typemaps.i"
 
-%import "../../core/types.h"
+%import "../../../include/core/types.h"
 #endif
 
 /* core.h */
     GFX_HWVER_D3D11_0 = 3,
     GFX_HWVER_D3D10_1 = 2,
     GFX_HWVER_D3D10_0 = 1,
+    GFX_HWVER_GL4_3 = 10,
     GFX_HWVER_GL4_2 = 9,
     GFX_HWVER_GL4_0 = 8,
     GFX_HWVER_GL3_3 = 7,
-    GFX_HWVER_GL3_2 = 6,
-    GFX_HWVER_GL3_0 = 5
+    GFX_HWVER_GL3_2 = 6
 };
 
 enum gfx_flags
     uint32 adapter_id;
     uint32 width;
     uint32 height;
-    void* wnd;
+};
+
+enum phx_flags
+{
+    PHX_FLAG_TRACKMEM = (1<<0),
+    PHX_FLAG_PROFILE = (1<<1)
+};
+
+struct phx_params
+{
+    uint32 flags;
+    uint32 mem_sz;
+    uint32 substeps_max;
+    uint32 scratch_sz;
+};
+
+struct sct_params
+{
+    uint32 mem_sz;
 };
 
 struct init_params
 {
     uint32 flags;
-    uint32 lock_fps;
     uint32 console_lines_max;
 
     struct gfx_params gfx;
     struct dev_params dev;
+    struct phx_params phx;
+    struct sct_params sct;
+
     char* data_dir;
 };
 
+/* app.h */
+typedef void* wnd_t;
+
+result_t app_init(const char* name, const struct init_params* params, wnd_t wnd_override);
+void app_release();
+struct init_params* app_load_config(const char* cfg_jsonfile);
+struct init_params* app_defaultconfig();
+char* app_query_displaymodes();
+void app_free_displaymodes(char* dispmodes);
+void app_swapbuffers();
+void app_set_rendertarget(const char* wnd_name);
+
 /* engine.h */
 result_t eng_init(const struct init_params* params);
 void eng_release();
 void eng_update();
+result_t app_resize_window(OPTIONAL const char* name, uint32 width, uint32 height);
 
 struct allocator* eng_get_framealloc();
 struct allocator* eng_get_lsralloc();
 	INPUT_KEY_NUM_8,
 	INPUT_KEY_NUM_9,
 	INPUT_KEY_NUM_0,
-	INPUT_KEY_NUM_LOCK
+	INPUT_KEY_NUM_LOCK,
+	INPUT_KEY_CNT   /* count of input key enums */
 };
 
 bool_t input_get_kbhit(enum input_key key);
 bool_t input_get_mouse(int *OUTPUT, int *OUTPUT, unsigned int *OUTPUT);
 void input_update(void* display, void* wnd);
 
+/* script.h */
+result_t sct_runfile(const char* lua_filepath);
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.