We extend the direct integration method of the holomorphic anomalyequations to general $\Omega$ backgrounds $\epsilon_1\neq -\epsilon_2$for pure SU(2) $N=2$ Super-Yang-Mills theory and topological stringtheory on non-compact Calabi-Yau threefolds. We find that anextension of the holomorphic anomaly equation, modularity and boundary conditions provided by the perturbative terms as well as by the gap condition at the conifold are sufficient to solve the generalized theory in the above cases. In particular, we use the method to solve the topological string for the general $\Omega$ backgrounds on non-compact toric Calabi-Yau spaces. The conifold boundary condition follows from that the $N=2$ Schwinger-loop calculation with Bogomol'nyi-Prasad-Sommerfield (BPS) states coupled to a self-dual and an anti-self-dual field strength. We calculate such BPS states also for the large base decompactification limit of Calabi-Yau spaces with regular $K3$ fibrations and half $K3$s embedded in Calabi-Yau backgrounds.
"Direct integration for general $\Omega$ backgrounds." Adv. Theor. Math. Phys. 16 (3) 805 - 849, June 2012.