Class Texture

java.lang.Object
engine.textures.Texture

public class Texture extends Object
  • Constructor Details

    • Texture

      public Texture(int width, int heigh, ByteBuffer image)
  • Method Details

    • getTextureID

      public int getTextureID()
      Returns:
      the ID of the Texture as stored in OpenGL
    • getBuffer

      public ByteBuffer getBuffer()
      Returns:
      the buffer created from the image
    • getWidth

      public int getWidth()
      Returns:
      the width of the texture
    • getHeight

      public int getHeight()
      Returns:
      the height of the texture
    • loadTexture

      public static Texture loadTexture(String path)
      Converts the texture image to a byteBuffer
      Parameters:
      path - is the name of the texture image
      Returns:
      a Texture object