Catalyzes the phosphorylation of glucose using polyphosphate or ATP as the phosphoryl donor (PubMed:8381043, PubMed:8703950). Polyphosphate, rather than ATP, seems to be the major phosphate donor for the enzyme in M.tuberculosis (PubMed:8703950). GTP, UTP and CTP can replace ATP as phosphoryl donor (PubMed:8381043). [phosphate](n) + D-glucose = [phosphate](n-1) + D-glucose 6-phosphate + H(+) ATP + D-glucose = ADP + D-glucose 6-phosphate + H(+) kcat is 199 sec(-1) with polyphosphate type 35 (Sigma) as substrate at pH 7.5. kcat is 208 sec(-1) with polyphosphate type 35 (Sigma) as substrate at pH 8.6. kcat is 108 sec(-1) with ATP as substrate at pH 7.5. kcat is 116 sec(-1) with ATP as substrate at pH 8.6 (PubMed:8703950). kcat is 149 sec(-1) with poly(P)(32) as substrate at pH 8.6. kcat is 60 sec(-1) with ATP as substrate at pH 8.6. kcat is 60 sec(-1) with GTP as substrate at pH 8.6. kcat is 61 sec(-1) with dATP as substrate at pH 8.6. kcat is 37 sec(-1) with UTP as substrate at pH 8.6. kcat is 19 sec(-1) with CTP as substrate at pH 8.6 (PubMed:8381043). Optimum pH is 9.5 and 9.6-9.5 with poly(P)(32) and ATP as the phosphoryl donors, respectively. Optimum temperature is 50 degrees Celsius for both activities. Homodimer. The poly(P)- and ATP-dependent glucokinase reactions both follow an ordered Bi-Bi mechanism, with glucose being the second substrate to bind and glucose 6-phosphate being released last. The mechanism of poly(P) utilization is not strictly processive and is most likely nonprocessive, where there is dissociation of poly(P) prior to complete utilization. Belongs to the ROK (NagC/XylR) family.