Starts rendering graphics.

bool Gfx_BeginScene(
  HTARGET target = 0


Optional render target handle to use for rendering. If 0 or omitted - the screen surface is used.

Return value

If successful, returns true. Otherwise returns false.


Gfx_BeginScene function must be called before call to any HGE rendering functions or helper classes' render methods.

If the function fails, you may obtain error message with System_GetErrorMessage function. Also if HGE_LOGFILE system state was set, the error message is written to log.

To finish rendering you must call Gfx_EndScene. Nested Gfx_BeginScene / Gfx_EndScene calls are not allowed.


Header: hge.h
Import library: hge.lib

See also

Gfx_EndScene, Target_Create