* TSX ends up 34.79 points, or 0.3 percent, at 12,145.85 * Weak earnings from Goldcorp, Potash weigh By Claire Sibonney TORONTO, April 26 (Reuters) - Toronto's main stock index ended moderately higher o n T hursday as stronger energy prices lifted oil and natural gas companies, though gains were capped by weak materials shares, hit by disappointing earnings. The powerhouse energy sector climbed 1.5 percent, despite the first stream of earnings in the group mostly missing expectations. Encana Corp advanced nearly 6 percent to C$19.44 a day after reporting a rise in first-quarter profits. It benefited from its hedging program as gas prices slumped to 10-year lows, while its price target was upgraded on Thursday. MEG Energy, a Canadian oil sands developer, surged 8.6 percent to C$41.97 after reporting an 18 percent rise in first-quarter profits on lower costs and higher price realizations. "You have oil up ... natural gas has popped 10 percent in the past week or so, so outside influences are more of an impact than the specific company reports unless in the case of Potash Corp for instance where it's a significant miss," said Levente Mady, market strategist at Union Securities, in Vancouver. Potash Corp of Saskatchewan, the world's largest fertilizer maker, was in fact one of the heaviest decliners on the index. It dropped 3.2 percent to C$42.25 after reporting a 33 percent profit drop due to lower sales and production, which in turn led to higher costs. Goldcorp, which reported late on Wednesday, led the key names on the downside. Canada's No.2 gold miner plunged 6 percent to C$38.05 after announced a slim increase in operating profit as its most prolific mine was hit by operational problems that reduced output and offset most of the gains from a surge in bullion prices. "Obviously the materials and natural resources have been struggling mightily, especially on a relative basis," added Mady, citing the TSX's poor performance compared with rallying U.S. markets. The Toronto Stock Exchange's S&P/TSX composite index ended up 34.79 points, or 0.29 percent, at 12,145.85. Paul Taylor, chief investment officer at BMO Harris Private Banking and BMO Asset Management, was modestly optimistic about the Canadian earnings picture and its impact on the market, expecting earnings over the next 12 months to be up in the high single digits. "If your view is as ours is, that we get a little bit of firming on the commodity front, the banks are doing the right thing in terms of expense management, I think that that trajectory of six to eight percent earnings growth year over year is very doable," said Taylor. In other earnings and individual company news, Shoppers Drug Mart Corp lost 0.8 percent to C$42 after Canada's biggest pharmacy chain reported lackluster profit and sales growth, feeling the squeeze from government reforms that have cut prescription drug margins. Precision Drilling Corp's, Canada's top oil and gas driller, dropped 2.6 percent to C$9.37 after reporting quarterly profit that narrowly missed analysts' expectations. On the upside, Research in Motion was up 3.6 percent to C$13.90 after value investor Prem Watsa said that the BlackBerry maker is a good buy at current levels, though it may take four to five years to turn around.