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 013enum D3d10ResourceDimension { 014 D3D10_RESOURCE_DIMENSION_UNKNOWN(0), // 015 D3D10_RESOURCE_DIMENSION_BUFFER(1), // 016 D3D10_RESOURCE_DIMENSION_TEXTURE1D(2), // 017 D3D10_RESOURCE_DIMENSION_TEXTURE2D(3), // 018 D3D10_RESOURCE_DIMENSION_TEXTURE3D(4); // 019 020 int _value; 021 022 D3d10ResourceDimension(final int value) { 023 _value = value; 024 } 025 026 static D3d10ResourceDimension forInt(final int value) { 027 for (final D3d10ResourceDimension dim : values()) { 028 if (dim._value == value) { 029 return dim; 030 } 031 } 032 throw new Error("unknown D3D10ResourceDimension: " + value); 033 } 034}