Class OGL13Graphics

All Implemented Interfaces:
OGLVersioned
Direct Known Subclasses:
OGL14Graphics

public class OGL13Graphics extends OGL12Graphics
OpenGL 1.3 Graphics Implementation.
Author:
Matthew Tropiano
  • Constructor Details

  • Method Details

    • getVersion

      public OGLVersion getVersion()
      Specified by:
      getVersion in interface OGLVersioned
      Overrides:
      getVersion in class OGL12Graphics
      Returns:
      the version that this object or value is available for (and higher).
    • createInfo

      protected OGLGraphics.Info createInfo()
      Description copied from class: OGLGraphics
      Called once in order to fetch context info.
      Overrides:
      createInfo in class OGL11Graphics
      Returns:
      the info object.
    • getCurrentActiveTextureUnitState

      protected int getCurrentActiveTextureUnitState()
      Overrides:
      getCurrentActiveTextureUnitState in class OGL11Graphics
      Returns:
      the current "active" texture unit.
    • setCurrentActiveTextureUnitState

      protected void setCurrentActiveTextureUnitState(int unit)
      Description copied from class: OGL11Graphics
      Sets the current texture unit state.
      Overrides:
      setCurrentActiveTextureUnitState in class OGL11Graphics
      Parameters:
      unit - the current "active" texture unit to set.
    • createTextureBuilder

      public TextureBuilder createTextureBuilder()
      Creates a texture builder.

      This texture builder aids in building texture objects, and its TextureBuilder.create() method will bind a new texture to its required target, send the data, set the filtering and build mipmaps, unbind the target, and return the new object.

      Limitations on this implementation version are: No auto mipmapgen.

      Overrides:
      createTextureBuilder in class OGL12Graphics
      Returns:
      a new texture builder.
    • getActiveTextureUnit

      public int getActiveTextureUnit()
      Returns:
      the current active texture unit.
      See Also:
    • setActiveTextureUnit

      public void setActiveTextureUnit(int unit)
      Sets the current "active" texture unit for texture bindings and texture environment settings. This texture unit is the one used for all subsequent calls to texture target binding, until it is changed.
      Parameters:
      unit - the texture unit to switch to.
    • setTextureData

      public void setTextureData(TextureCubeFace cubeFace, ByteBuffer imageData, ColorFormat colorFormat, TextureFormat format, int texlevel, int width, int height, int border)
      Sends a texture into OpenGL's memory for the current texture bound to TextureTargetType.TEXTURE_CUBE.
      Parameters:
      cubeFace - the texture cube face.
      imageData - the image to send.
      colorFormat - the pixel storage format of the buffer data.
      format - the internal format.
      texlevel - the mipmapping level to copy this into (0 is topmost).
      width - the texture width in texels.
      height - the texture height in texels.
      border - the texel border to add, if any.
      Throws:
      UnsupportedOperationException - if any provided type or format is unavailable in this version.
      GraphicsException - if the buffer provided is not direct, or if no current cube texture.
    • setTextureSubData

      public void setTextureSubData(TextureCubeFace cubeFace, ByteBuffer imageData, ColorFormat colorFormat, int texlevel, int width, int height, int xoffs, int yoffs)
      Sends a subset of data to the current texture bound to TextureTargetType.TEXTURE_CUBE already in OpenGL's memory.
      Parameters:
      cubeFace - the texture cube face.
      imageData - the image to send.
      colorFormat - the pixel storage format of the buffer data.
      texlevel - the mipmapping level to copy this into (0 is topmost).
      width - the texture width in texels.
      height - the texture height in texels.
      xoffs - the texel offset.
      yoffs - the texel offset.
      Throws:
      UnsupportedOperationException - if the provided format is unavailable in this version.
      GraphicsException - if the buffer provided is not direct, or if no current cube texture.
    • setCurrentActiveTextureCoordArray

      public void setCurrentActiveTextureCoordArray(int unit)
      Sets the current client active texture (for coordinates submission).
      Parameters:
      unit - the texture unit for binding.