#Include Once "windows.bi"
#Include "OurDream2D.bi"



Function FrameFunc() As Integer
	FrameFunc = -1
End Function



Function RenderFunc() As Integer
	Render_BeginScene()
		Render_Clear(&H00FF0000)
		Render_RenderFont("FPS : " & Str(System_GetFPS()),2,2,&H000000FF,0,100)
	Render_EndScene()
	RenderFunc = -1
End Function



If System_CreateOD2D(1,0,-1,-1,-1,0,-1,-1,-1,800,600,32,-1,0,40,NULL,"OurDream2D Test",ExePath & "\Debug.log",-1) Then
	System_SetFrameFunction(@FrameFunc)
	System_SetRenderFunction(@RenderFunc)
	Resource_LoadFont(100,"黑体",10,25,20,0)
	System_OD2DRun()
	System_OD2DStop()
Else
	MessageBox(0,"OurDream引擎初始化失败！","Error",MB_ICONERROR)
EndIf