better support for gles2
This commit is contained in:
@@ -57,6 +57,7 @@ void Map::resize(uint32_t width, uint32_t height, uint32_t fb_width, uint32_t fb
|
||||
transform.fb_width = fb_width;
|
||||
transform.fb_height = fb_height;
|
||||
transform.pixelRatio = pixel_ratio;
|
||||
painter.resize(fb_width, fb_height);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@ void Painter::setupShaders() {
|
||||
pointShader = std::make_unique<PointShader>();
|
||||
}
|
||||
|
||||
void Painter::resize(int width, int height) {
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
void Painter::useProgram(uint32_t program) {
|
||||
if (gl_program != program) {
|
||||
glUseProgram(program);
|
||||
|
||||
Reference in New Issue
Block a user