Skip to content

Commit

Permalink
Samples: AndroidTextureOES - properly convert enum and use RGN_DEFAULT
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Nov 26, 2018
1 parent 508457f commit cd35204
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Samples/AndroidTextureOES/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,15 @@ private void initializeScene() {
cameraNode.attachObject(camera);
cameraNode.setPosition(0f, 0f, 15f);

final MaterialPtr material = MaterialManager.getSingleton().create(
"PlaneMat",
ResourceGroupManager.getDEFAULT_RESOURCE_GROUP_NAME()
);
final MaterialPtr material = MaterialManager.getSingleton().create("PlaneMat", Ogre.getRGN_DEFAULT());

final Pass pass = material.getTechniques().get(0).getPass(0);
pass.setDepthCheckEnabled(false);
pass.setDepthWriteEnabled(false);
pass.setLightingEnabled(false);

final TexturePtr texturePtr = TextureManager.getSingleton().createManual(
"SomeTexture",
"General",
"SomeTexture", Ogre.getRGN_DEFAULT(),
TextureType.TEX_TYPE_EXTERNAL_OES,
1080,
1920,
Expand All @@ -125,7 +121,7 @@ private void initializeScene() {
// 90 deg rotate:
rect.setUVs(new Vector2(0, 1), new Vector2(1, 1), new Vector2(0, 0), new Vector2(1, 0));
rect.setMaterial(material);
rect.setRenderQueueGroup((short) OgreJNI.RENDER_QUEUE_BACKGROUND_get());
rect.setRenderQueueGroup((short)RenderQueueGroupID.RENDER_QUEUE_BACKGROUND.swigValue());
rect.setBoundingBox(bb);

final SceneNode rectNode = scnMgr.getRootSceneNode().createChildSceneNode();
Expand Down

0 comments on commit cd35204

Please sign in to comment.