OpenGL ES compatibility

This commit is contained in:
2019-01-19 23:00:30 +01:00
parent 3b41cbe365
commit 0a0e3a18c6

View File

@@ -145,6 +145,10 @@ void NodePanelGrid::init_controls()
if (texres == m_texture.size().x)
return;
#if defined(__IOS__) || defined(__ANDROID__)
m_texture.create(texres, texres);
m_texture.create_mipmaps();
#else
// get the texture data and resize it
m_texture.bind();
Image img;
@@ -154,6 +158,7 @@ void NodePanelGrid::init_controls()
Image resized = img.resize(texres, texres);
m_texture.create(resized);
m_texture.create_mipmaps();
#endif //
};
int rexres = get_texres();
m_texture.create(rexres, rexres);
@@ -164,7 +169,7 @@ void NodePanelGrid::init_controls()
TextureManager::load("data/sun.png");
glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, m_line_range);
//glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, m_line_range);
//glGetFloatv(GL_ALIASED_LINE_WIDTH_GRANULARITY, &m_line_granularity);
}