We argue the connection of Nekrasov's partition function in the \Omega background and the moduli space of D-branes, suggested by the idea of geometric engineering and Gopakumar-Vafa invariants. In the instanton expansion of N=2 SU(2) Yang-Mills theory the Nakrasov's partition function with equivariant parameters \epsilon_1, \epsilon_2 of toric action on C^2 factorizes correctly as the character of SU(2)_L \times SU(2)_R spin representation. We show that up to two instantons the spin contents are consistent with the Lefschetz action on the moduli space of D2-branes on (local) F_0. We also present an attempt at constructing a refined topological vertex in terms of the Macdonald function. The refined topological vertex with two parameters of T^2 action allows us to obtain the generating functions of equivariant \chi_y and elliptic genera of the Hilbert scheme of n points on C^2 by the method of topological vertex.