func BeginFrame(width, height int, devicePixelRatio float32) { w := C.GLsizei(float32(width) * devicePixelRatio) h := C.GLsizei(float32(height) * devicePixelRatio) C.glViewport(0, 0, w, h) C.glClearColor(0, 0, 0, 1) C.glClear(C.GL_COLOR_BUFFER_BIT | C.GL_DEPTH_BUFFER_BIT | C.GL_STENCIL_BUFFER_BIT) C.nvgBeginFrame(vg, C.int(width), C.int(height), C.float(devicePixelRatio)) }
func (c *Context) BeginFrame(windowWidth, windowHeight int, devicePixelRatio float32) { C.nvgBeginFrame(c.ctx, (C.int)(windowWidth), (C.int)(windowHeight), (C.float)(devicePixelRatio)) }