lights FAQ Forum github.com/luapower/cairo.wglpanel
winapi.wglpanel

Native OS APIs
winapi
winapi.wglpanel
winapi.cairopanel
objc
xlib

wglpanel

OpenGL panels


require'winapi.wglpanel'

This module implements the WGLPanel class which allows drawing on a panel using OpenGL.

WGLPanel

Hierarchy

Events

painting description reference
on_render() panel needs repainting WM_PAINT
on_set_viewport() window was resized

Usage

local winapi = require'winapi'
require'winapi.wglpanel'

local main = winapi.Window{
  autoquit = true,
}

local panel = winapi.WGLPanel{
  anchors = {left = true, top = true, right = true, bottom = true},
  w = main.client_w,
  h = main.client_h,
  parent = main,
}

local gl = require'winapi.gl21'

function panel:on_render()
  gl.glMatrixMode(gl.GL_MODELVIEW)
  gl.glLoadIdentity()
  --render model...
end

Last updated: 8 months ago | Edit on GitHub

Pkg type:Lua+ffi
Version: r1-0-ged9cade
Last commit:
License: PD
Requires: +opengl  +winapi  +glue  +luajit 
Required by: opengl 

Top