<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://inside.digipen.edu/index.php?action=history&amp;feed=atom&amp;title=GSDP%3AGAM100%2FCProcessing%2FCP_Engine_Run%28%29</id>
	<title>GSDP:GAM100/CProcessing/CP Engine Run() - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://inside.digipen.edu/index.php?action=history&amp;feed=atom&amp;title=GSDP%3AGAM100%2FCProcessing%2FCP_Engine_Run%28%29"/>
	<link rel="alternate" type="text/html" href="https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Engine_Run()&amp;action=history"/>
	<updated>2026-04-05T22:01:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Engine_Run()&amp;diff=61493&amp;oldid=prev</id>
		<title>&gt;Justin.chambers: New page: {{GSDP:GAM100API.css}} = CP_Engine_Run() = == Description == This function is what starts the CProcessing engine. Before calling '''CP_Engine_Run()''', [[GSDP:GAM100/CProcessing/CP_Engine_...</title>
		<link rel="alternate" type="text/html" href="https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Engine_Run()&amp;diff=61493&amp;oldid=prev"/>
		<updated>2020-09-20T06:38:08Z</updated>

		<summary type="html">&lt;p&gt;New page: {{GSDP:GAM100API.css}} = CP_Engine_Run() = == Description == This function is what starts the CProcessing engine. Before calling &amp;#039;&amp;#039;&amp;#039;CP_Engine_Run()&amp;#039;&amp;#039;&amp;#039;, [[GSDP:GAM100/CProcessing/CP_Engine_...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{GSDP:GAM100API.css}}&lt;br /&gt;
= CP_Engine_Run() =&lt;br /&gt;
== Description ==&lt;br /&gt;
This function is what starts the CProcessing engine. Before calling '''CP_Engine_Run()''', [[GSDP:GAM100/CProcessing/CP_Engine_SetNextGameState()|CP_Engine_SetNextGameState()]] or [[GSDP:GAM100/CProcessing/CP_Engine_SetNextGameStateForced()|CP_Engine_SetNextGameStateForced()]] must be called to set the initial state of the program. Failing to do so will cause the program to end immediately.&lt;br /&gt;
&lt;br /&gt;
== Example Usage ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang='c'&amp;gt;&lt;br /&gt;
void init(void)&lt;br /&gt;
{&lt;br /&gt;
  /* Set the size of the window */&lt;br /&gt;
  CP_System_Size(500, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void update(void)&lt;br /&gt;
{&lt;br /&gt;
  /* Set the background color to black every frame */&lt;br /&gt;
  CP_Settings_Background(CP_Color_Create(0, 0, 0, 255));&lt;br /&gt;
&lt;br /&gt;
  /* Draw a rectangle at the mouse position */&lt;br /&gt;
  CP_Graphics_DrawRect(CP_Input_GetMouseX(), CP_Input_GetMouseY(), 50, 50);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
  // Set the initial game state&lt;br /&gt;
  CP_Engine_SetNextGameState(init, update, NULL);&lt;br /&gt;
&lt;br /&gt;
  // Run the program&lt;br /&gt;
  CP_Engine_Run();    &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related ==&lt;br /&gt;
* [[GSDP:GAM100/CProcessing                                   |Main Page]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Engine_Terminate()             |CP_Engine_Terminate()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Engine_SetNextGameState()      |CP_Engine_SetNextGameState()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Engine_SetNextGameStateForced()|CP_Engine_SetNextGameStateForced()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_System_Size()|CP_System_Size()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Settings_Background()|CP_Settings_Background()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Color_Create()|CP_Color_Create()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Graphics_DrawRect()|CP_Graphics_DrawRect()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Input_GetMouseX()|CP_Input_GetMouseX()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Input_GetMouseY()|CP_Input_GetMouseY()]]&lt;/div&gt;</summary>
		<author><name>&gt;Justin.chambers</name></author>
	</entry>
</feed>