Examples of WebGLTexture


Examples of com.google.gwt.webgl.client.WebGLTexture

  @Override
  public void glDeleteTextures (int n, IntBuffer textures) {
    for (int i = 0; i < n; i++) {
      int id = textures.get();
      WebGLTexture texture = this.textures.get(id);
      deallocateTextureId(id);
      gl.deleteTexture(texture);
    }
  }
View Full Code Here

Examples of com.google.gwt.webgl.client.WebGLTexture

    gl.frontFace(mode);
  }

  @Override
  public void glGenTextures (int n, IntBuffer textures) {
    WebGLTexture texture = gl.createTexture();
    int id = allocateTextureId(texture);
    textures.put(id);
  }
View Full Code Here

Examples of com.google.gwt.webgl.client.WebGLTexture

  @Override
  public void glDeleteTextures (int n, IntBuffer textures) {
    for (int i = 0; i < n; i++) {
      int id = textures.get();
      WebGLTexture texture = this.textures.get(id);
      deallocateTextureId(id);
      gl.deleteTexture(texture);
    }
  }
View Full Code Here

Examples of com.google.gwt.webgl.client.WebGLTexture

    gl.frontFace(mode);
  }

  @Override
  public void glGenTextures (int n, IntBuffer textures) {
    WebGLTexture texture = gl.createTexture();
    int id = allocateTextureId(texture);
    textures.put(id);
  }
View Full Code Here

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

Examples of com.googlecode.gwtgl.binding.WebGLTexture

    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

Examples of com.googlecode.gwtgl.binding.WebGLTexture

    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

Examples of com.googlecode.gwtgl.binding.WebGLTexture

    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

Examples of com.googlecode.gwtgl.binding.WebGLTexture

      {
        // 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
Copyright © 2018 www.massapi.com. 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.