Android: minor fixes

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8090 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
kim..ng 14 years ago
parent 263089b68f
commit 895e02f2a6
  1. 1009
      engine/src/android/com/jme3/renderer/android/OGLESRenderer.java
  2. 5
      engine/src/android/com/jme3/system/android/OGLESContext.java
  3. 2
      engine/src/android/jme3test/android/AboutActivity.java
  4. 17
      engine/src/android/jme3test/android/TestsActivity.java

@ -101,6 +101,8 @@ public class OGLESContext implements JmeContext, GLSurfaceView.Renderer
*/ */
protected int clientOpenGLESVersion = 1; protected int clientOpenGLESVersion = 1;
protected boolean verboseLogging = false;
final private String ESCAPE_EVENT = "TouchEscape"; final private String ESCAPE_EVENT = "TouchEscape";
public OGLESContext() { } public OGLESContext() { }
@ -141,6 +143,7 @@ public class OGLESContext implements JmeContext, GLSurfaceView.Renderer
{ {
// Start to set up the view // Start to set up the view
this.view = view; this.view = view;
verboseLogging = eglConfigVerboseLogging;
if (configType == ConfigType.LEGACY) if (configType == ConfigType.LEGACY)
{ {
@ -257,7 +260,7 @@ public class OGLESContext implements JmeContext, GLSurfaceView.Renderer
renderer = new OGLESShaderRenderer(); renderer = new OGLESShaderRenderer();
renderer.setUseVA(true); renderer.setUseVA(true);
renderer.setVerboseLogging(false); renderer.setVerboseLogging(verboseLogging);
renderer.initialize(); renderer.initialize();
listener.initialize(); listener.initialize();

@ -42,7 +42,7 @@ public class AboutActivity extends Activity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.about); //setContentView(R.layout.about);
} }
@Override @Override

@ -66,7 +66,7 @@ public class TestsActivity extends Activity {
new Test("helloworld.HelloTerrain", "jme3test.helloworld.HelloTerrain") new Test("helloworld.HelloTerrain", "jme3test.helloworld.HelloTerrain")
}; };
private CheckBox useVA = null; private boolean useVA;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
@ -74,13 +74,13 @@ public class TestsActivity extends Activity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.tests); //setContentView(R.layout.tests);
try { try {
useVA = (CheckBox) findViewById(R.id.useVA); useVA = true;
LinearLayout buttonsContainer = (LinearLayout) findViewById(R.id.buttonsContainer); //LinearLayout buttonsContainer = (LinearLayout) findViewById(R.id.buttonsContainer);
for (Test test: tests) { for (Test test: tests) {
@ -91,7 +91,7 @@ public class TestsActivity extends Activity {
button.setText(test.getName()); button.setText(test.getName());
// button.setTextSize(10.0f); // button.setTextSize(10.0f);
// button.setTextColor(Color.rgb(100, 200, 200)); // button.setTextColor(Color.rgb(100, 200, 200));
buttonsContainer.addView(button); //buttonsContainer.addView(button);
button.setOnClickListener( button.setOnClickListener(
new View.OnClickListener() { new View.OnClickListener() {
@ -99,7 +99,7 @@ public class TestsActivity extends Activity {
public void onClick(View view) { public void onClick(View view) {
Intent intent = new Intent(view.getContext(), AndroidActivity.class); Intent intent = new Intent(view.getContext(), AndroidActivity.class);
intent.putExtra(AndroidActivity.class.getName() + ".TEST_CLASS_NAME", finalClassName); intent.putExtra(AndroidActivity.class.getName() + ".TEST_CLASS_NAME", finalClassName);
intent.putExtra(AndroidActivity.class.getName() + ".USE_VA", useVA.isChecked()); intent.putExtra(AndroidActivity.class.getName() + ".USE_VA", useVA);
startActivityForResult(intent, 0); startActivityForResult(intent, 0);
} }
} }
@ -136,12 +136,13 @@ public class TestsActivity extends Activity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater(); MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.options, menu); //inflater.inflate(R.menu.options, menu);
return true; return true;
} }
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
/*
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.about_button: case R.id.about_button:
about(); about();
@ -152,6 +153,8 @@ public class TestsActivity extends Activity {
default: default:
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }
*/
return false;
} }
private void quit() { private void quit() {

Loading…
Cancel
Save