Hey guys,

I've got a float array `camObjCoord` declared as..

`public static float camObjCoord[] = new float[8000];`

I'm then filling its indexes in a class that does something like the
following..

`camObjCoord[1] = 2.5;`

I'm then calling `makeview()`

        public void makeview() {
         Intent myIntent = new Intent(this, GLCamTest.class);

            Bundle b = new Bundle();
            b.putFloatArray("tweets", camObjCoord);
            myIntent.putExtras(b);
        this.startActivity(myIntent);
    }

and then in the new class it's doing...

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle b = this.getIntent().getExtras();
        float original[] = b.getFloatArray("tweets");
        camObjCoord = original;
        counter++;
    }

I then have another class `class GLLayer` and it looks like the
following..      http://pastebin.org/394884 inside this class I'm
drawing the cube(s) from the float array, I've check and the values
for the cube are indeed there and when I'm coding the array in it
works but when I'm dynamically building the array then passing it the
cube doesn't draw. I'm calling the class like so..

               glView=new GLLayer(this);
               mPreview = new CamLayer(this, glView);

Anyone have any idea why? How would I fix my problem? Just to add, I
am giving the exact same values to the exact same indexes when drawing
dynamically

 I've tried various things it's not the passing of the array causing
the problems if I was to declare the array like so...

              final static float camObjCoord[] = new float[] {
                                // FRONT
                                 -2.0f, -1.5f,  2.0f,
                                  2.0f, -1.5f,  2.0f,
                                 -2.0f,  1.5f,  2.0f,
                                  2.0f,  1.5f,  2.0f,
                                 // BACK
                                 -2.0f, -1.5f, -2.0f,
                                 -2.0f,  1.5f, -2.0f,
                                  2.0f, -1.5f, -2.0f,
                                  2.0f,  1.5f, -2.0f,
                                 // LEFT
                                 -2.0f, -1.5f,  2.0f,
                                 -2.0f,  1.5f,  2.0f,
                                 -2.0f, -1.5f, -2.0f,
                                 -2.0f,  1.5f, -2.0f,
                                 // RIGHT
                                  2.0f, -1.5f, -2.0f,
                                  2.0f,  1.5f, -2.0f,
                                  2.0f, -1.5f,  2.0f,
                                  2.0f,  1.5f,  2.0f,
                                 // TOP
                                 -2.0f,  1.5f,  2.0f,
                                  2.0f,  1.5f,  2.0f,
                                 -2.0f,  1.5f, -2.0f,
                                  2.0f,  1.5f, -2.0f,
                                 // BOTTOM
                                 -2.0f, -1.5f,  2.0f,
                                 -2.0f, -1.5f, -2.0f,
                                  2.0f, -1.5f,  2.0f,
                                  2.0f, -1.5f, -2.0f,
                        };

Then it will render this cube. It appears to not like that I'm making
the array and then dynamically adding indexes. Why? how do I fix this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to