func Viewport(x, y, width, height int) { defer func() { errstr := errDrain() log.Printf("gl.Viewport(%v, %v, %v, %v) %v", x, y, width, height, errstr) }() C.glViewport(C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height)) }
func Viewport( x int32, y int32, width Sizei, height Sizei) { C.glViewport( C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height)) }
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 initialize() { // if !initialized { initialized = true scr.Switch(scr.XGA) // (scr.MaxMode()) C.glViewport(0, 0, C.GLsizei(scr.NX()), C.GLsizei(scr.NY())) } }
func Viewport(x, y, width, height int) { C.glViewport(C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height)) }
// Viewport calls glViewport func Viewport(x int, y int, w int, h int) { C.glViewport(C.GLint(x), C.GLint(y), C.GLsizei(w), C.GLsizei(h)) }
func (game *game) resize(width, height int) { game.width = width game.height = height C.glViewport(0, 0, C.GLsizei(width), C.GLsizei(height)) }
//void glViewport (int x, int y, int width, int height) func Viewport(x int, y int, width int, height int) { C.glViewport(C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height)) }
func Viewport(x, y, with, height int) { C.glViewport( (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(with), (C.GLsizei)(height)) }