Package com.googlecode.gwtgl.binding

Examples of com.googlecode.gwtgl.binding.WebGLTexture


    textureRight = createTexture(Resources.INSTANCE.textureSkyboxRt());
    checkErrors();
  }

  private WebGLTexture createTexture(ImageResource imageResource) {
    final WebGLTexture texture = glContext.createTexture();
   
    final Image img = new Image();
    img.addLoadHandler(new LoadHandler() {
      @Override
      public void onLoad(LoadEvent event) {
View Full Code Here


    mGlContext.drawArrays(WebGLRenderingContext.TRIANGLE_STRIP, 0, 4);
  }
   
  WebGLTexture createEmptyTexture()
  {
    WebGLTexture texture = mGlContext.createTexture();
    bindTexture(texture);
    mGlContext.texParameteri(WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_MAG_FILTER, WebGLRenderingContext.LINEAR);
    mGlContext.texParameteri(WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_MIN_FILTER, WebGLRenderingContext.LINEAR);
    mGlContext.texParameteri(WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_WRAP_S, WebGLRenderingContext.CLAMP_TO_EDGE);
    mGlContext.texParameteri(WebGLRenderingContext.TEXTURE_2D, WebGLRenderingContext.TEXTURE_WRAP_T, WebGLRenderingContext.CLAMP_TO_EDGE);
View Full Code Here

    loadFont(Fonts.FONT_ARIALBLK_BOLD_14_OUTLINE, (ImageResource) Fonts.INSTANCE.arialBlk14OutlineBitmap(), Fonts.INSTANCE.arialBlk14OutlineInfo().getText());
  }
 
  public void loadFont(final int fontId, ImageResource imageResource, final String fontInfo)
  {
    final WebGLTexture texture = PUWeb.engine().createEmptyTexture();
    final ImageElement image = PUWeb.engine().getImageElement(imageResource);
    loadImage(new ImageLoadEvent()
    {
      @Override
      public void loaded()
View Full Code Here

    mGuiImages = new PU_Image[resources.length];
    for(int i = 0; i < resources.length; i++)
    {
      final int id = i;
     
      final WebGLTexture texture = PUWeb.engine().createEmptyTexture();
      final ImageElement image = PUWeb.engine().getImageElement(resources[i]);
      loadImage(new ImageLoadEvent()
      {
        @Override
        public void loaded()
View Full Code Here

      {
        // Now draw our pokemon icons in a batch
        int pokemonCount = self.getPokemonCount();
        if(pokemonCount > 0)
        {
          WebGLTexture pokemonTexture = PUWeb.resources().getPokemonTexture();
          if(pokemonTexture != null)
          {
            PUWeb.engine().beginTextureBatch(pokemonTexture, 2048, pokemonCount, 255, 255, 255, 255);
            for(int i = 0; i < 6; i++)
            {
View Full Code Here

TOP

Related Classes of com.googlecode.gwtgl.binding.WebGLTexture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.