Tuesday morning, BP (NYSE:BP) gave investors a sneak peak at second-quarter results. As you might imagine, pricing for oil and gas was quite strong in the quarter. Prices for Brent oil (a North Sea variety that trades alongside the more common bellwether New York Mercantile Exchange crude) climbed 8% from the previous quarter and 46% from the prior year, while gas prices rose 7% and 12%, respectively. On the production side, BP announced that results were, as expected, more or less flat.

Elsewhere, the refining business at BP seemed to pick up in the quarter. Refining margins were better across the board on a sequential basis, and overall margins were up slightly from the year-ago levels. That said, the company announced that those margins won't be directly comparable to the actual margins for the quarter, in part because of a narrowing of heavy/sour discounts.

Finally, BP announced that the company had repurchased 203 million shares of stock for $2.1 billion. Along with the dividend and last quarter's $2 billion stock repurchase, it's clear to me that BP remains committed to returning capital to shareholders so long as circumstances permit it.

While the market reacted well to this news, energy prices also were trading higher early Tuesday. With Tropical Storm Cindy approaching Louisiana and another potential storm forming in the Caribbean, oil prices ticked higher. This is pretty standard stuff, though -- when storms threaten the Gulf of Mexico, energy prices are often bid up in anticipation that the weather may interfere with production.

BP's results don't constitute a major surprise -- anybody could have looked at energy prices and seen that oil had gone up for the quarter -- but it should still be seen as some incremental positive news for the sector. What's more, if BP's experience in refining holds true across the board, that should be good news for the likes of ExxonMobil (NYSE:XOM), Chevron (NYSE:CVX), and Total SA (NYSE:TOT) as well.

Click below for more takes on the oil industry:

Total SA is a recommendation of the Motley Fool Income Investor newsletter. Take a free trial to find out what other dividend-paying stocks Mathew Emmert likes.

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned.