Tabnine Logo
LittleEndianDataInput.readInt
Code IndexAdd Tabnine to your IDE (free)

How to use
readInt
method
in
com.ardor3d.util.LittleEndianDataInput

Best Java code snippets using com.ardor3d.util.LittleEndianDataInput.readInt (Showing top 10 results out of 315)

origin: com.ardor3d/ardor3d-core

  static DdsPixelFormat read(final LittleEndianDataInput in) throws IOException {
    final DdsPixelFormat format = new DdsPixelFormat();
    format.dwSize = in.readInt();
    if (format.dwSize != 32) {
      throw new Error("invalid pixel format size: " + format.dwSize);
    }
    format.dwFlags = in.readInt();
    format.dwFourCC = in.readInt();
    format.dwRGBBitCount = in.readInt();
    format.dwRBitMask = in.readInt();
    format.dwGBitMask = in.readInt();
    format.dwBBitMask = in.readInt();
    format.dwABitMask = in.readInt();
    return format;
  }
}
origin: Renanse/Ardor3D

  static DdsPixelFormat read(final LittleEndianDataInput in) throws IOException {
    final DdsPixelFormat format = new DdsPixelFormat();
    format.dwSize = in.readInt();
    if (format.dwSize != 32) {
      throw new Error("invalid pixel format size: " + format.dwSize);
    }
    format.dwFlags = in.readInt();
    format.dwFourCC = in.readInt();
    format.dwRGBBitCount = in.readInt();
    format.dwRBitMask = in.readInt();
    format.dwGBitMask = in.readInt();
    format.dwBBitMask = in.readInt();
    format.dwABitMask = in.readInt();
    return format;
  }
}
origin: Renanse/Ardor3D

public final float readFloat() throws IOException {
  return Float.intBitsToFloat(readInt());
}
origin: com.ardor3d/ardor3d-core

public final float readFloat() throws IOException {
  return Float.intBitsToFloat(readInt());
}
origin: com.ardor3d/ardor3d-core

  static DdsHeaderDX10 read(final LittleEndianDataInput in) throws IOException {
    final DdsHeaderDX10 header = new DdsHeaderDX10();
    header.dxgiFormat = DxgiFormat.forInt(in.readInt());
    header.resourceDimension = D3d10ResourceDimension.forInt(in.readInt());
    header.miscFlag = in.readInt();
    header.arraySize = in.readInt();
    header.reserved = in.readInt();
    return header;
  }
}
origin: Renanse/Ardor3D

  static DdsHeaderDX10 read(final LittleEndianDataInput in) throws IOException {
    final DdsHeaderDX10 header = new DdsHeaderDX10();
    header.dxgiFormat = DxgiFormat.forInt(in.readInt());
    header.resourceDimension = D3d10ResourceDimension.forInt(in.readInt());
    header.miscFlag = in.readInt();
    header.arraySize = in.readInt();
    header.reserved = in.readInt();
    return header;
  }
}
origin: Renanse/Ardor3D

static DdsHeader read(final LittleEndianDataInput in) throws IOException {
  final DdsHeader header = new DdsHeader();
  header.dwSize = in.readInt();
  if (header.dwSize != 124) {
    throw new Error("invalid dds header size: " + header.dwSize);
  header.dwFlags = in.readInt();
  header.dwHeight = in.readInt();
  header.dwWidth = in.readInt();
  header.dwLinearSize = in.readInt();
  header.dwDepth = in.readInt();
  header.dwMipMapCount = in.readInt();
  header.dwAlphaBitDepth = in.readInt();
  for (int i = 0; i < header.dwReserved1.length; i++) {
    header.dwReserved1[i] = in.readInt();
  header.dwCaps = in.readInt();
  header.dwCaps2 = in.readInt();
  header.dwCaps3 = in.readInt();
  header.dwCaps4 = in.readInt();
  header.dwTextureStage = in.readInt();
origin: com.ardor3d/ardor3d-core

static DdsHeader read(final LittleEndianDataInput in) throws IOException {
  final DdsHeader header = new DdsHeader();
  header.dwSize = in.readInt();
  if (header.dwSize != 124) {
    throw new Error("invalid dds header size: " + header.dwSize);
  header.dwFlags = in.readInt();
  header.dwHeight = in.readInt();
  header.dwWidth = in.readInt();
  header.dwLinearSize = in.readInt();
  header.dwDepth = in.readInt();
  header.dwMipMapCount = in.readInt();
  header.dwAlphaBitDepth = in.readInt();
  for (int i = 0; i < header.dwReserved1.length; i++) {
    header.dwReserved1[i] = in.readInt();
  header.dwCaps = in.readInt();
  header.dwCaps2 = in.readInt();
  header.dwCaps3 = in.readInt();
  header.dwCaps4 = in.readInt();
  header.dwTextureStage = in.readInt();
origin: Renanse/Ardor3D

public Image load(final InputStream is, final boolean flipVertically) throws IOException {
  final LittleEndianDataInput in = new LittleEndianDataInput(is);
  // Read and check magic word...
  final int dwMagic = in.readInt();
  if (dwMagic != getInt("DDS ")) {
    throw new Error("Not a dds file.");
  }
  logger.finest("Reading DDS file.");
  // Create our data store;
  final DdsImageInfo info = new DdsImageInfo();
  info.flipVertically = flipVertically;
  // Read standard dds header
  info.header = DdsHeader.read(in);
  // if applicable, read DX10 header
  info.headerDX10 = info.header.ddpf.dwFourCC == getInt("DX10") ? DdsHeaderDX10.read(in) : null;
  // Create our new image
  final Image image = new Image();
  image.setWidth(info.header.dwWidth);
  image.setHeight(info.header.dwHeight);
  // update depth based on flags / header
  updateDepth(image, info);
  // add our format and image data.
  populateImage(image, info, in);
  // return the loaded image
  return image;
}
origin: com.ardor3d/ardor3d-core

public Image load(final InputStream is, final boolean flipVertically) throws IOException {
  final LittleEndianDataInput in = new LittleEndianDataInput(is);
  // Read and check magic word...
  final int dwMagic = in.readInt();
  if (dwMagic != getInt("DDS ")) {
    throw new Error("Not a dds file.");
  }
  logger.finest("Reading DDS file.");
  // Create our data store;
  final DdsImageInfo info = new DdsImageInfo();
  info.flipVertically = flipVertically;
  // Read standard dds header
  info.header = DdsHeader.read(in);
  // if applicable, read DX10 header
  info.headerDX10 = info.header.ddpf.dwFourCC == getInt("DX10") ? DdsHeaderDX10.read(in) : null;
  // Create our new image
  final Image image = new Image();
  image.setWidth(info.header.dwWidth);
  image.setHeight(info.header.dwHeight);
  // update depth based on flags / header
  updateDepth(image, info);
  // add our format and image data.
  populateImage(image, info, in);
  // return the loaded image
  return image;
}
com.ardor3d.utilLittleEndianDataInputreadInt

Popular methods of LittleEndianDataInput

  • <init>
    Creates a new LittleEndian reader from the given input stream. The stream is wrapped in a BufferedIn
  • readFully
  • readLong
  • readUnsignedShort

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now