Android AndEngine导入GLES2项目未运行

Android AndEngine导入GLES2项目未运行,android,opengl-es-2.0,andengine,Android,Opengl Es 2.0,Andengine,我正在尝试更新我的项目,使其使用AndEngine GLES2运行,但我遇到了一些问题。我发现有一篇文章显示了要改变什么,但它仍然不起作用。这正是我正在做的: onCreateEngineOptions() onCreateResources() onCreateSecene() 问题是,当我开始这个活动时,它不会显示精灵的任何部分,即使我将其更改为白色,屏幕也会保持黑色 所以任何关于我的错误和我做错了什么的想法。(在迁移到安卓GLES2之前,除了安卓蜂巢,其他一切都正常工作,现在我正在运行安卓

我正在尝试更新我的项目,使其使用AndEngine GLES2运行,但我遇到了一些问题。我发现有一篇文章显示了要改变什么,但它仍然不起作用。这正是我正在做的:

onCreateEngineOptions()

onCreateResources()

onCreateSecene()

问题是,当我开始这个活动时,它不会显示精灵的任何部分,即使我将其更改为白色,屏幕也会保持黑色

所以任何关于我的错误和我做错了什么的想法。(在迁移到安卓GLES2之前,除了安卓蜂巢,其他一切都正常工作,现在我正在运行安卓2.3.4的HTC EVO 3d上测试这个项目)


提前谢谢

我不确定这是否是您的问题-在添加此内容之前,我也遇到过类似的问题

    @Override
public void onPopulateScene(Scene pScene, OnPopulateSceneCallback pOnPopulateSceneCallback) throws Exception { //
    // TODO Auto-generated method stub

    pOnPopulateSceneCallback.onPopulateSceneFinished();
}
public void onCreateResources() {

    this.mBitmapTextureAtlas = new BitmapTextureAtlas(4096, 4096, TextureOptions.BILINEAR_PREMULTIPLYALPHA);

    this.mFont = new Font(this.mBitmapTextureAtlas, Typeface.create(Typeface.DEFAULT, Typeface.NORMAL), 25, true, Color.BLACK);

    this.mEngine.getTextureManager().loadTexture(this.mBitmapTextureAtlas);
    this.mEngine.getFontManager().loadFont(this.mFont);


    this.firstSprite =  BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mBitmapTextureAtlas, this, "1.png", 0, 113); // 113x100
           // 36 other sprites, that's why I'm creating BitmapTextureAtlas with these size

    this.mEngine.getTextureManager().loadTexture(this.mBitmapTextureAtlas);
}
@Override
public Scene onCreateScene() {
    this.mEngine.registerUpdateHandler(new FPSLogger());

    this.mScene = new Scene();
    this.mScene.setBackground(new Background(4, 4, 4));
    this.mScene.setOnSceneTouchListener(this);

    this.mPhysicsWorld = new PhysicsWorld(new Vector2(0, SensorManager.GRAVITY_EARTH), false);

    CAMERA_WIDTH = getWindow().getWindowManager().getDefaultDisplay().getWidth();
    CAMERA_HEIGHT = getWindow().getWindowManager().getDefaultDisplay().getHeight();

    final IAreaShape ground = new Rectangle(0, CAMERA_HEIGHT - 2, CAMERA_WIDTH, 2);
    final IAreaShape roof = new Rectangle(0, 0, CAMERA_WIDTH, 2);
    final IAreaShape left = new Rectangle(0, 0, 2, CAMERA_HEIGHT);
    final IAreaShape right = new Rectangle(CAMERA_WIDTH - 2, 0, 2, CAMERA_HEIGHT);

    final FixtureDef wallFixtureDef = PhysicsFactory.createFixtureDef(0, 0.5f, 0.5f);
    PhysicsFactory.createBoxBody(this.mPhysicsWorld, ground, BodyType.KinematicBody, wallFixtureDef);
    PhysicsFactory.createBoxBody(this.mPhysicsWorld, roof, BodyType.KinematicBody, wallFixtureDef);
    PhysicsFactory.createBoxBody(this.mPhysicsWorld, left, BodyType.KinematicBody, wallFixtureDef);
    PhysicsFactory.createBoxBody(this.mPhysicsWorld, right, BodyType.KinematicBody, wallFixtureDef);

    this.mScene.attachChild(ground);
    this.mScene.attachChild(roof);
    this.mScene.attachChild(left);
    this.mScene.attachChild(right);

    this.mScene.registerUpdateHandler(this.mPhysicsWorld);
    this.mScene.setOnAreaTouchListener(this);

    final FixtureDef objectFixtureDef = PhysicsFactory.createFixtureDef(1, 0.5f, 1);

    //Sprite 1
    Sprite face = new Sprite(CAMERA_WIDTH/2, 50, this.firstSprite);
    face.setUserData("petrol");
    Body body = PhysicsFactory.createCircleBody(this.mPhysicsWorld, face, BodyType.DynamicBody, objectFixtureDef);
    this.mScene.registerTouchArea(face);
    this.mScene.attachChild(face);
    this.mPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(face, body, true, true));
            // 36 sprites....
return this.mScene;
    }
    @Override
public void onPopulateScene(Scene pScene, OnPopulateSceneCallback pOnPopulateSceneCallback) throws Exception { //
    // TODO Auto-generated method stub

    pOnPopulateSceneCallback.onPopulateSceneFinished();
}