Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GVRCubeSceneObject with texture array throw invocation exception #1722

Open
jeanpul opened this issue Jan 31, 2018 · 3 comments
Open

GVRCubeSceneObject with texture array throw invocation exception #1722

jeanpul opened this issue Jan 31, 2018 · 3 comments
Labels

Comments

@jeanpul
Copy link

jeanpul commented Jan 31, 2018

Hi,

I'm trying to create a GVRCubeSceneObject with 6 textures as
GVRCubeSceneObject mCubeEvironment = new GVRCubeSceneObject(gvrContext, false, textures);
the SDK raise an exception on :
vbuf.setFloatArray("a_texcoord", SIMPLE_INWARD_TEXCOORDS);
of createSimpleCubeSixMeshes(). Looking at the vertexDesc string parameters maybe there's some missing comas between the attribute declarations ?

Here's the exception message:
java.lang.IllegalArgumentException: Attribute name a_texcoord cannot be updated

Version: 4.0.1-SNAPSHOT

Best regards,

Jeanpul

@bohuang3d
Copy link

bohuang3d commented Jan 31, 2018

Not necessarily on needing comas. In generateVariantDefines() in GVRShaderTemplate.java for example, vertexDesc is searched for containing key words, thus punctuations don't matter.

Edit:
Please send an adb device log to up to the exception occuring

@liaxim liaxim added the bug label Feb 1, 2018
@liaxim
Copy link
Contributor

liaxim commented Feb 1, 2018

The vertex descriptor in the corresponding constructor must be "float3 a_position float2 a_texcoord float3 a_normal" instead of "float a_position float a_texcoord float a_normal". But then there is a bug in vertex descriptor setFloatVec in the number of vertices calculation.

liaxim added a commit to liaxim/GearVRf that referenced this issue Feb 1, 2018
liaxim added a commit to liaxim/GearVRf that referenced this issue Feb 1, 2018
liaxim added a commit that referenced this issue Feb 7, 2018
…cation exception (#1723)

* Fixing issue #1722, GVRCubeSceneObject with texture array throw invocation exception

* Ensure the right buffers are bound
@liaxim
Copy link
Contributor

liaxim commented Feb 7, 2018

@jeanpul The fix was merged in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants