No longer requires GL_ARB_texture_rg (memory footprint increased by 512KB)
This commit is contained in:
parent
f4988bb030
commit
e0bdddc408
@ -56,10 +56,10 @@ namespace spades{
|
||||
|
||||
device->BindTexture(IGLDevice::Texture2D, coarseTexture);
|
||||
device->TexImage2D(IGLDevice::Texture2D, 0,
|
||||
IGLDevice::RG,
|
||||
IGLDevice::RGBA8,
|
||||
map->Width() / CoarseSize,
|
||||
map->Height() / CoarseSize,
|
||||
0, IGLDevice::RG, IGLDevice::UnsignedByte,
|
||||
0, IGLDevice::BGRA, IGLDevice::UnsignedByte,
|
||||
NULL);
|
||||
device->TexParamater(IGLDevice::Texture2D,
|
||||
IGLDevice::TextureMagFilter,
|
||||
@ -183,7 +183,7 @@ namespace spades{
|
||||
bmp += w;
|
||||
}
|
||||
|
||||
uint16_t out = minValue;
|
||||
uint32_t out = minValue << 16;
|
||||
out |= maxValue << 8;
|
||||
coarseBitmap[i] = out;
|
||||
|
||||
@ -202,7 +202,7 @@ namespace spades{
|
||||
0, 0, 0,
|
||||
w >> CoarseBits,
|
||||
h >> CoarseBits,
|
||||
IGLDevice::RG,
|
||||
IGLDevice::BGRA,
|
||||
IGLDevice::UnsignedByte,
|
||||
coarseBitmap.data());
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ namespace spades {
|
||||
std::vector<uint32_t> updateBitmap;
|
||||
|
||||
std::vector<uint32_t> bitmap;
|
||||
std::vector<uint16_t> coarseBitmap;
|
||||
std::vector<uint32_t> coarseBitmap;
|
||||
|
||||
uint32_t GeneratePixel(int x, int y);
|
||||
void MarkUpdate(int x, int y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user