Catalyzes the rate-limiting step of the oxidative pentose-phosphate pathway, which represents a route for the dissimilation of carbohydrates besides glycolysis. The main function of this enzyme is to provide reducing power (NADPH) and pentose phosphates for fatty acid and nucleic acid synthesis (By similarity). D-glucose 6-phosphate + NADP(+) = 6-phospho-D-glucono-1,5-lactone + H(+) + NADPH Carbohydrate degradation; pentose phosphate pathway; D-ribulose 5-phosphate from D-glucose 6-phosphate (oxidative stage): step 1/3. Expressed in late sporogonial stages. Belongs to the glucose-6-phosphate dehydrogenase family.