A power moved upon the face of the deep before the existence of time and space, causing the formation of the cosmos, coalescing the nothingness into two halves of reality, Limbo, the building blocks of creation, and the Astral sea, realm of thought and will.
The primordials and gods came into existence from the essence Limbo and the Astral Sea, respectively. Ma'at, the living spirit of the Astral sea, brought forth the races of the dragons from astral spirits and the forces of the elements.
Ptah, one of the mightiest of the primordials, created a race of titans to assist him in creation of a third realm, the material world. With the assistance of other primordials and their servants, and the dragons, the world was created.
One god was not content with the power of the Astral sea, he wanted control over the entire universe. He punctured a hole in the fabric of the cosmos, in an attempt to summon raw power from another realm. This power coalesced into the form of a great red crystalline gem (the Ruby Heart of Corruption).
Tharizdun started a war for dominion over the cosmos, waging battle with both primordial and god alike. After a long and costly war he was defeated and imprisoned within the material world, the only place where his sources of power could be cut off from him.
Ptah and the other primordials continued to build and construct the worlds of the cosmos over the eons. Seeing the creation of the primordials, the gods became intrigued with it, modifying it's structure, and creating beings and places within it of their own.
As the gods began to take more and more control over the world, the primordials became angered by the interference of the gods. A war erupted between primordials and the gods for control of the world. The war raged for eons, costing the existence of many primordials and gods alike. Soon it began to threaten the stability of the material world.
Ptah and a few other primordials who had refused to join the "Dawn War" saw that it would eventually cause the destruction of the world and the release of Tharizdun. They reluctantly joined forces with the gods, causing the tides of war to shift in favor of the gods. Eventually many of the remaining primordials were slain or imprisoned.
The fabric of reality had been damaged by the dawn war. Ptah and Shekinester (a draconic power of balance and fate) created a great pattern in the center of the cosmos, repairing the damage of the Dawn War, and ensuring the stability of the world. The other two draconic powers, Bahamut and Tiamat were entrusted with the guardianship of the material world.