---
name: "dtk_update_screen"
section: "3"
platform: "linux"
package: "libdrawtk-dev"
version: "2.0-2.1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/dtk_update_screen"
---

# dtk\_update\_screen(3)

screen buffer manipulation

## NAME

dtk\_update\_screen, dtk\_clear\_screen, dtk\_bgcolor - screen buffer manipulation

## SYNOPSIS

**#include \<drawtk.h\>**

**void dtk\_update\_screen(dtk\_hwnd** *wnd***);**\
 **void dtk\_clear\_screen(dtk\_hwnd** *wnd***);**\
 **void dtk\_bgcolor(float \****bgcolor***);**\

## DESCRIPTION

**dtk\_bgcolor**() set *bgcolor* as the background color of the current rendering context. *bgcolor* should point to an array of 4 float corresponding to an normalized RGBA value. If unspecified, the background color is black.

**dtk\_clear\_screen**() fills the frame buffer with the background color of the window *wnd*.

**dtk\_update\_screen**() swaps the front and back frame buffers of the window *wnd*. Rendering is performed through double buffering, i.e. the draws are rendered on the back buffer which will be displayed on screen when a call to **dtk\_update\_screen**() will be performed. After an update, the content of the back buffer is undefined. So if the rendered scene does not rewrite the whole frame buffer, it is safer to call **dtk\_clear\_screen**() after an update of the screen.

## RETURN VALUE

These functions return no value.

## SEE ALSO
