|
wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
|
wxPython-style App/Frame/MainLoop API for Python, Pascal, and simple C programs. More...

Typedefs | |
| typedef void(BGI_CALL * | WxbgiFrameCallback) (void) |
| Callback type for animation / per-frame update. | |
Functions | |
| BGI_API void BGI_CALL | wxbgi_wx_app_create (void) |
| Create the wx application instance. | |
| BGI_API void BGI_CALL | wxbgi_wx_app_main_loop (void) |
| Run the wx event loop. | |
| BGI_API void BGI_CALL | wxbgi_wx_close_after_ms (int ms) |
Schedule the frame to close after ms milliseconds. | |
| BGI_API void BGI_CALL | wxbgi_wx_close_frame (void) |
| Close the standalone frame immediately. | |
| BGI_API void BGI_CALL | wxbgi_wx_frame_create (int width, int height, const char *title) |
| Create a top-level wxFrame with an embedded WxBgiCanvas. | |
| BGI_API void BGI_CALL | wxbgi_wx_refresh (void) |
| Request an immediate canvas repaint. | |
| BGI_API void BGI_CALL | wxbgi_wx_set_frame_rate (int fps) |
| Set the auto-refresh rate in frames per second (default 0 = no auto-refresh). | |
| BGI_API void BGI_CALL | wxbgi_wx_set_idle_callback (WxbgiFrameCallback fn) |
| Register a per-frame callback. | |
wxPython-style App/Frame/MainLoop API for Python, Pascal, and simple C programs.
These functions create and run a wxWidgets window with an embedded WxBgiCanvas without requiring the caller to write any C++ wxFrame subclass.
Typical usage (analogous to wxPython):
| typedef void(BGI_CALL * WxbgiFrameCallback) (void) |
Callback type for animation / per-frame update.
Create the wx application instance.
Analogous to wx.App() in wxPython. Must be called once before wxbgi_wx_frame_create(). Safe to call multiple times (idempotent if a wxApp already exists).
Run the wx event loop.
Analogous to app.MainLoop() in wxPython. Blocks until all top-level windows are closed. Returns only after cleanup.
Schedule the frame to close after ms milliseconds.
Useful for automated tests that need a short visible window.
Create a top-level wxFrame with an embedded WxBgiCanvas.
Analogous to wx.Frame() in wxPython. Also initialises the BGI CPU page buffers (calls wxbgi_wx_init_for_canvas internally) so that BGI drawing functions can be called before wxbgi_wx_app_main_loop().
Set the auto-refresh rate in frames per second (default 0 = no auto-refresh).
Must be called after wxbgi_wx_frame_create().
| BGI_API void BGI_CALL wxbgi_wx_set_idle_callback | ( | WxbgiFrameCallback | fn | ) |
Register a per-frame callback.
Called on each timer tick set by wxbgi_wx_set_frame_rate(). Draw your scene here; the canvas is automatically refreshed after the callback returns. Pass NULL to deregister.