A wxGLCanvas that hosts the wx_bgi BGI drawing surface.
More...
#include <wx_bgi_canvas.h>
|
| void | Render () |
| | Render the BGI buffer immediately.
|
| |
| void | SetAutoRefreshHz (int hz) |
| | Enable idle-driven auto-refresh at the requested frame rate.
|
| |
| | WxBgiCanvas (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxASCII_STR("WxBgiCanvas")) |
| |
| | ~WxBgiCanvas () override |
| |
|
| virtual void | PostBlit (int pageW, int pageH, int vpW, int vpH) |
| | Called AFTER wxbgi_wx_render_page_gl_vp() and all 3-D solid GL passes, but BEFORE SwapBuffers().
|
| |
| virtual void | PreBlit (int w, int h) |
| | Called inside Render() after the GL context is current and BGI is initialised, but before the BGI pixel buffer is blitted to this canvas's OpenGL surface.
|
| |
A wxGLCanvas that hosts the wx_bgi BGI drawing surface.
Drop this panel into any wxFrame or wxPanel. After the first paint the BGI state is initialised and you can call any BGI drawing function.
Typical usage:
wxDefaultPosition, wxSize(800, 600));
m_canvas->SetAutoRefreshHz(60);
A wxGLCanvas that hosts the wx_bgi BGI drawing surface.
Definition wx_bgi_canvas.h:32
BGI_API void BGI_CALL circle(int x, int y, int radius)
Draws a circle outline.
BGI_API void BGI_CALL setbkcolor(int color)
Sets background color index used by clear operations.
◆ WxBgiCanvas()
| wxbgi::WxBgiCanvas::WxBgiCanvas |
( |
wxWindow * |
parent, |
|
|
wxWindowID |
id = wxID_ANY, |
|
|
const wxPoint & |
pos = wxDefaultPosition, |
|
|
const wxSize & |
size = wxDefaultSize, |
|
|
long |
style = 0, |
|
|
const wxString & |
name = wxASCII_STR("WxBgiCanvas") |
|
) |
| |
|
explicit |
◆ ~WxBgiCanvas()
| wxbgi::WxBgiCanvas::~WxBgiCanvas |
( |
| ) |
|
|
override |
◆ PostBlit()
| virtual void wxbgi::WxBgiCanvas::PostBlit |
( |
int |
pageW, |
|
|
int |
pageH, |
|
|
int |
vpW, |
|
|
int |
vpH |
|
) |
| |
|
inlineprotectedvirtual |
Called AFTER wxbgi_wx_render_page_gl_vp() and all 3-D solid GL passes, but BEFORE SwapBuffers().
Override in subclasses to composite overlays (concentric circles, grid, UCS axes) on top of 3-D solid geometry. Typically implemented by calling wxbgi_wx_render_overlays_for_camera() for this panel's camera.
- Parameters
-
| pageW | Logical BGI page width. |
| pageH | Logical BGI page height. |
| vpW | Physical framebuffer width (may differ on HiDPI). |
| vpH | Physical framebuffer height (may differ on HiDPI). |
◆ PreBlit()
| virtual void wxbgi::WxBgiCanvas::PreBlit |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inlineprotectedvirtual |
Called inside Render() after the GL context is current and BGI is initialised, but before the BGI pixel buffer is blitted to this canvas's OpenGL surface.
Override in subclasses to render a specific camera's scene into the shared BGI scratch buffer. Because wx paint events are sequential on the main thread, the scratch buffer is safe to reuse across panels.
- Parameters
-
| w | Logical pixel width of this canvas. |
| h | Logical pixel height of this canvas. |
◆ Render()
| void wxbgi::WxBgiCanvas::Render |
( |
| ) |
|
Render the BGI buffer immediately.
◆ SetAutoRefreshHz()
| void wxbgi::WxBgiCanvas::SetAutoRefreshHz |
( |
int |
hz | ) |
|
Enable idle-driven auto-refresh at the requested frame rate.
- Parameters
-
| hz | Target refresh rate. Pass 0 to disable. |
The documentation for this class was generated from the following file: