<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../docs.xsl"?>

<docs type="symbol" project="SIEGE" version="0.8.2" rpath="../..">
	<file root="siege/core" name="core.DONE.h">
		<group key="Core" name="Core">
			<symbol id="10" kind="function" internal="false" cname="sgRun">
				<index>
					<entry key="Run">sgRun</entry>
				</index>
				<section name="Name">
					<names>
						<name>sgRun</name>
						<descr>Start and run the SIEGE main loop</descr>
					</names>
				</section>
				<section name="Synopsis">
					<code-block lang="C"><ref local="false" path=".." file="common" group="Common" name="SGbyte" id="3">SGint</ref> <ref local="true" path="." file="core.DONE" group="Core" name="sgRun" id="10">sgRun</ref>(void);</code-block>
				</section>
				<section name="Description">
					<p>
						This function is roughly equivalent to calling sgDrawClear(), <ref local="false" path="." file="core.DONE" group="Core" name="sgLoop" id="11">sgLoop</ref>() and <ref local="false" path="." file="window.DONE" group="Window" name="sgWindowSwapBuffers" id="21">sgWindowSwapBuffers</ref>() repetitively. Please note that the function blocks until the game exits.
					</p>
					<p>
						An exit can be requested in user code by either closing the window or calling <ref local="false" path="." file="core.DONE" group="Core" name="sgStop" id="12">sgStop</ref>().
					</p>
				</section>
				<section name="Return Values">
					<p>
						The value returned is the engine's exit status; it would typically be returned from the main() function.
					</p>
				</section>
				<section name="Examples">
					<code-block lang="C">int main(void)
{
    <ref local="false" path="." file="core.DONE" group="Core" name="sgInit" id="8">sgInit</ref>(0);
    <ref local="false" path="." file="window.DONE" group="Window" name="sgWindow*Open" id="14">sgWindowOpen</ref>(...);
    ...
    <ref local="false" path=".." file="common" group="Common" name="SGbyte" id="3">SGint</ref> ret = <ref local="true" path="." file="core.DONE" group="Core" name="sgRun" id="10">sgRun</ref>();
    <ref local="false" path="." file="core.DONE" group="Core" name="sgDeinit" id="9">sgDeinit</ref>();
    return ret;
}</code-block>
				</section>
				<section name="See Also">
					<sees>
						<see><ref local="false" path="." file="core.DONE" group="Core" name="sgLoop" id="11">sgLoop</ref></see>
						<see><ref local="false" path="." file="core.DONE" group="Core" name="sgStop" id="12">sgStop</ref></see>
					</sees>
					<sees>
						<see><ref local="false" path="." file="core.DONE" group="Core" name="sgGetTick" id="13">sgGetTick</ref></see>
					</sees>
				</section>
			</symbol>
		</group>
	</file>
</docs>
