check float texture extension, use float32 or float16 if available, show extension on title bar, add thread and render task for lightmap rendering
This commit is contained in:
@@ -1494,15 +1494,24 @@ void Canvas::resize(int width, int height)
|
||||
m_size = { width, height };
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
//#if defined(__IOS__) || defined(__ANDROID__)
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tex[i].create(width, height, GL_RGBA8);
|
||||
//#else
|
||||
// m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||
// m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
||||
// m_tex[i].create(width, height, GL_RGBA32F);
|
||||
//#endif
|
||||
if (ShaderManager::ext_texture_float)
|
||||
{
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
||||
m_tex[i].create(width, height, GL_RGBA32F);
|
||||
}
|
||||
else if (ShaderManager::ext_half_float_pixel)
|
||||
{
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA16F);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA16F);
|
||||
m_tex[i].create(width, height, GL_RGBA16F);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tex[i].create(width, height, GL_RGBA8);
|
||||
}
|
||||
m_tex2[i].create(width, height, GL_RGBA8);
|
||||
}
|
||||
for (auto& l : m_layers)
|
||||
@@ -1539,15 +1548,24 @@ bool Canvas::create(int width, int height)
|
||||
m_size = { width, height };
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
//#if defined(__IOS__) || defined(__ANDROID__)
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tex[i].create(width, height, GL_RGBA8);
|
||||
//#else
|
||||
// m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||
// m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
||||
// m_tex[i].create(width, height, GL_RGBA32F);
|
||||
//#endif
|
||||
if (ShaderManager::ext_texture_float)
|
||||
{
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
||||
m_tex[i].create(width, height, GL_RGBA32F);
|
||||
}
|
||||
else if (ShaderManager::ext_half_float_pixel)
|
||||
{
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA16F);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA16F);
|
||||
m_tex[i].create(width, height, GL_RGBA16F);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tex[i].create(width, height, GL_RGBA8);
|
||||
}
|
||||
m_tex2[i].create(width, height, GL_RGBA8);
|
||||
}
|
||||
#if defined(__IOS__) || defined(__ANDROID__)
|
||||
|
||||
Reference in New Issue
Block a user