1/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.replica.replicaisland;
18
19/**
20 * Simple container class for textures.  Serves as a mapping between Android resource ids and
21 * OpenGL texture names, and also as a placeholder object for textures that may or may not have
22 * been loaded into vram.  Objects can cache Texture objects but should *never* cache the texture
23 * name itself, as it may change at any time.
24 */
25public class Texture extends AllocationGuard {
26    public int resource;
27    public int name;
28    public int width;
29    public int height;
30    public boolean loaded;
31
32    public Texture() {
33        super();
34        reset();
35    }
36
37    public void reset() {
38        resource = -1;
39        name = -1;
40        width = 0;
41        height = 0;
42        loaded = false;
43    }
44}
45