Subversion Repositories AndroidProjects

Rev

Rev 187 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.gebauz.Bauzoid.graphics.texture;

import com.gebauz.Bauzoid.graphics.GLUtil;
import com.gebauz.Bauzoid.graphics.Graphics;

public class RenderTexture extends Texture2D
{
        protected RenderTexture(Graphics graphics)
        {
                super(graphics);               
        }
       
        public static RenderTexture create(Graphics graphics, int w, int h)
        {
                RenderTexture result = null;
                if (GLUtil.checkExtension("GL_OES_framebuffer_object"))
                {
                        result = new RenderTextureFbo(graphics);
                }
                else
                {
                        //result = new RenderTextureBasic();
                        return null;
                }
                result.createTarget(w, h);
                return result;
        }
       
        public void createTarget(int w, int h)
        {
                width = w;
                height = h;
        }
       
        public void activate()
        {
               
        }
       
        public void deactivate()
        {
               
        }
}