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

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

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

Loading…
Cancel
Save