001/**
002 * Copyright (c) 2008-2014 Ardor Labs, Inc.
003 *
004 * This file is part of Ardor3D.
005 *
006 * Ardor3D is free software: you can redistribute it and/or modify it 
007 * under the terms of its license which may be found in the accompanying
008 * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
009 */
010
011package com.ardor3d.image.util.dds;
012
013import java.io.IOException;
014
015import com.ardor3d.util.LittleEndianDataInput;
016
017class DdsHeaderDX10 {
018    final static int D3D10_RESOURCE_MISC_GENERATE_MIPS = 0x1;
019    final static int D3D10_RESOURCE_MISC_SHARED = 0x2;
020    final static int D3D10_RESOURCE_MISC_TEXTURECUBE = 0x4;
021    final static int D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x10;
022    final static int D3D10_RESOURCE_MISC_GDI_COMPATIBLE = 0x20;
023
024    DxgiFormat dxgiFormat;
025    D3d10ResourceDimension resourceDimension;
026    int miscFlag;
027    int arraySize;
028    int reserved;
029
030    static DdsHeaderDX10 read(final LittleEndianDataInput in) throws IOException {
031        final DdsHeaderDX10 header = new DdsHeaderDX10();
032        header.dxgiFormat = DxgiFormat.forInt(in.readInt());
033        header.resourceDimension = D3d10ResourceDimension.forInt(in.readInt());
034        header.miscFlag = in.readInt();
035        header.arraySize = in.readInt();
036        header.reserved = in.readInt();
037        return header;
038    }
039}