Opengl Texture working on Emulator but not on HTC HERO

by Robert Green » Thu, 15 Jul 2010 04:11:51 GMT


Sponsored Links
 You're binding to texture 0.  That's incorrect - you need to generate
the texture IDs and use those to bind when uploading and drawing.

Beyond that, you should ask:
Is your texture a power of two?  Does the Hero support the texture
crop extension?




--



Opengl Texture working on Emulator but not on HTC HERO

by Sundog » Thu, 15 Jul 2010 04:48:10 GMT


 My vote's on the texture power of 2. Did it myself - works in the
emulator sometimes.





--


Sponsored Links


Other Threads

1. Saving Pictures from /drawable in a app to SD Card

I kind of confussed and hope one of you nice people will help me.

I have written a app, and I have pictures which are stored in the /
drawable directory.  My app makes a sliding gallery across the top,
(id gallery1) and as you select the picture in the gallery it load the
picture bigger underneath, (id image1). These a layed out in a XML
file.  What I would like to do is be able to is when the image1 is
pressed it gives the option to save the picture on the SD Card.

My Whole Code is:

*********************************************************************************************
public class PicViews extends Activity
{
    //---the images to display---
    Integer[] imageIDs = {
            R.drawable.pic01,
            R.drawable.pic02,
            R.drawable.pic03,
            R.drawable.pic04,
            R.drawable.pic05


    };

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.displayview);

        Gallery gallery = (Gallery) findViewById(R.id.gallery1);

        gallery.setAdapter(new ImageAdapter(this));
        gallery.setOnItemClickListener(new OnItemClickListener()
        {
                 public void onItemClick(AdapterView parent,
                            View v, int position, long id)
                            {
                                //---display the images selected---
                                ImageView imageView = (ImageView)
findViewById(R.id.image1);
 
imageView.setImageResource(imageIDs[position]);
                            }
        });
    }

    public class ImageAdapter extends BaseAdapter
    {
        private Context context;
        private int itemBackground;

        public ImageAdapter(Context c)
        {
            context = c;
            //---setting the style---
            TypedArray a =
obtainStyledAttributes(R.styleable.Gallery1);
            itemBackground = a.getResourceId(
                R.styleable.Gallery1_android_galleryItemBackground,
0);
            a.recycle();
        }

        //---returns the number of images---
        public int getCount() {
            return imageIDs.length;
        }

        //---returns the ID of an item---
        public Object getItem(int position) {
            return position;
        }

        public long getItemId(int position) {
            return position;
        }

        //---returns an ImageView view---
        public View getView(int position, View convertView, ViewGroup
parent) {
            ImageView imageView = new ImageView(context);
            imageView.setImageResource(imageIDs[position]);
            imageView.setScaleType(ImageView.ScaleType.FIT_XY);
            imageView.setLayoutParams(new Gallery.LayoutParams(150,
120));
            imageView.setBackgroundResource(itemBackground);
            return imageView;
        }
    }
}


*********************************************************************************************

The Section of code which pulls up the image and makes the bigger
picture show is:

*********************************************************************************************
 gallery.setOnItemClickListener(new OnItemClickListener()
        {
                 public void onItemClick(AdapterView parent,
                            View v, int position, long id)
                            {
                                //---display the images selected---
                                ImageView imageView = (ImageView)
findViewById(R.id.image1);
 
imageView.setImageResource(imageIDs[position]);
                            }
        });
**********************************************************************************************

Its at this point I want to be able to have a option to save the
picture either by pressing a button or ideally pressing the picture
which will bring up options.

Also what alterations in the manifest do I need to make to be able to
access the SD Card Storage?

Please help, I'm only learning.



-- 

2. Unmarshal Parcleable in Broadcast Reviever



Don't use custom Parcelables in Intents used with alarms. Whatever you
are putting in the Parcelable is hopefully backed by a database or
other persistent storage. If so, put the key to the data in the Intent
as a primitive extra (e.g., string, integer), and load in the rest of
the data as needed.

-- 
Mark Murphy
CommonsWare
mmur...@commonsware.com
http://commonsware.com

-- 

3. Video: Skyfire 2.0 for Android is Fast

4. Flash 10.1 final available for smartphones with Android 2.2 - GSMArena.com news

5. yang mau ikut mirink di green cafe bandung daftar disini

6. It is possible to monitor and block network?

7. Kok sering gak bisa preview attachment ya?