disable glBufferSubData for all Adreno 330/320
- use more specific test to work around buggy driver
This commit is contained in:
parent
51b2773ef2
commit
3d1cc6fe36
@ -59,12 +59,6 @@ public class MapView extends RelativeLayout {
|
||||
AndroidAssets.init(context);
|
||||
GLAdapter.init(new AndroidGL());
|
||||
|
||||
/* Use workaround for adreno driver bug in some
|
||||
* samsung S4 and Note3 models */
|
||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT
|
||||
&& "samsung".equals(Build.MANUFACTURER))
|
||||
GLAdapter.NO_BUFFER_SUB_DATA = true;
|
||||
|
||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||
CanvasAdapter.dpi = (int) Math.max(metrics.xdpi, metrics.ydpi);
|
||||
|
||||
|
@ -307,6 +307,15 @@ public class MapRenderer {
|
||||
public void onSurfaceCreated() {
|
||||
GL = GLAdapter.get();
|
||||
// log.debug(GL.glGetString(GL20.GL_EXTENSIONS));
|
||||
String vendor = GL.glGetString(GL20.GL_VENDOR);
|
||||
String renderer = GL.glGetString(GL20.GL_RENDERER);
|
||||
String version = GL.glGetString(GL20.GL_VERSION);
|
||||
log.debug("{}/{}/{}", vendor, renderer, version);
|
||||
|
||||
if ("Adreno (TM) 330".equals(renderer) || "Adreno (TM) 320".equals(renderer)) {
|
||||
log.debug("==> not using glBufferSubData");
|
||||
GLAdapter.NO_BUFFER_SUB_DATA = true;
|
||||
}
|
||||
|
||||
GLState.init(GL);
|
||||
GLUtils.init(GL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user