mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-14 15:46:19 +00:00
New code style refactor
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
#include "Common.hpp"
|
||||
#include <cmath>
|
||||
|
||||
namespace boo
|
||||
{
|
||||
namespace boo {
|
||||
|
||||
void UpdateGammaLUT(ITextureD* tex, float gamma)
|
||||
{
|
||||
void* data = tex->map(65536 * 2);
|
||||
for (int i=0 ; i<65536 ; ++i)
|
||||
{
|
||||
float level = std::pow(i / 65535.f, gamma);
|
||||
reinterpret_cast<uint16_t*>(data)[i] = level * 65535.f;
|
||||
}
|
||||
tex->unmap();
|
||||
void UpdateGammaLUT(ITextureD* tex, float gamma) {
|
||||
void* data = tex->map(65536 * 2);
|
||||
for (int i = 0; i < 65536; ++i) {
|
||||
float level = std::pow(i / 65535.f, gamma);
|
||||
reinterpret_cast<uint16_t*>(data)[i] = level * 65535.f;
|
||||
}
|
||||
tex->unmap();
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace boo
|
||||
|
||||
Reference in New Issue
Block a user