We present experimental investigation of cross sections for processes crucial in view of prompt-gamma imaging. The prompt-gamma rays were produced from an interaction of a proton beam with different phantom materials composed of carbon, oxygen and hydrogen. The used target setup allowed precise selection of the investigated depth in the phantom. We studied details of the dependence of prompt-gamma yields on beam energy, detection angle and elemental composition of irradiated phantom. The analysis was focused on the discrete transitions with the largest cross sections: 4.44 MeV in 12C and 6.13 MeV in 16O. The results are presented in form of profiles of the prompt-gamma yield as a function of depth. They are compared to calculations including different cross-section models. Obtained results are in agreement with the model exploiting cross-section data collected from the literature, but the comparison with the TALYS model shows discrepancies. In the latest experiment, special attention was paid to the shape of the distal fall-off. The width of that fall-off is directly linked to the resolution of prompt-gamma based methods of range verification. Preliminary results on the beam-energy dependence of this quantity are presented. [ABSTRACT FROM AUTHOR]