Mipmaps work with animations now

This commit is contained in:
UnknownShadow200 2017-08-28 09:23:26 +10:00
parent e28d029e39
commit f430c9508c
6 changed files with 411 additions and 398 deletions

View file

@ -1,379 +1,379 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{BEB1C785-5CAD-48FF-A886-876BF0A318D4}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace>ClassicalSharp</RootNamespace>
<AssemblyName>ClassicalSharp</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<AppDesignerFolder>Properties</AppDesignerFolder>
<NoWin32Manifest>False</NoWin32Manifest>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WarningLevel>4</WarningLevel>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<BaseAddress>4194304</BaseAddress>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\output\debug\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<StartAction>Project</StartAction>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>..\output\release\</OutputPath>
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug_D3D' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>..\output\debug\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE;USE_DX</DefineConstants>
<StartAction>Project</StartAction>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release_D3D' ">
<OutputPath>..\output\release\</OutputPath>
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;USE_DX;</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="SharpWave">
<HintPath>SharpWave.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="2D\Drawing\CanvasDrawer2D.cs" />
<Compile Include="2D\Drawing\CanvasDrawer2D.Text.cs" />
<Compile Include="2D\Drawing\GdiPlusDrawer2D.Text.cs" />
<Compile Include="2D\Drawing\IDrawer2D.TextMC.cs" />
<Compile Include="2D\GuiElement.cs" />
<Compile Include="2D\IsometricBlockDrawer.cs" />
<Compile Include="2D\Drawing\DrawTextArgs.cs" />
<Compile Include="2D\Drawing\GdiPlusDrawer2D.cs" />
<Compile Include="2D\Drawing\IDrawer2D.cs" />
<Compile Include="2D\Screens\ChatScreen.cs" />
<Compile Include="2D\Screens\ClickableScreen.cs" />
<Compile Include="2D\Screens\DeathScreen.cs" />
<Compile Include="2D\Screens\DisconnectScreen.cs" />
<Compile Include="2D\Screens\Overlays\Overlay.cs" />
<Compile Include="2D\Screens\Overlays\TexIdsOverlay.cs" />
<Compile Include="2D\Screens\Overlays\WarningOverlay.cs" />
<Compile Include="2D\Screens\StatusScreen.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.Input.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.Scrolling.cs" />
<Compile Include="2D\Screens\LoadingMapScreen.cs" />
<Compile Include="2D\Screens\MenuScreen.cs" />
<Compile Include="2D\Screens\Menu\ClassicOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\EditHotkeyScreen.cs" />
<Compile Include="2D\Screens\Menu\EnvSettingsScreen.cs" />
<Compile Include="2D\Screens\Menu\FilesScreen.cs" />
<Compile Include="2D\Screens\Menu\GenLevelScreen.cs" />
<Compile Include="2D\Screens\Menu\GraphicsOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\GuiOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\HacksSettingsScreen.cs" />
<Compile Include="2D\Screens\Menu\HotkeyListScreen.cs" />
<Compile Include="2D\Screens\Menu\KeyBindingsScreen.cs" />
<Compile Include="2D\Screens\Menu\KeyBindingsScreens.cs" />
<Compile Include="2D\Screens\Menu\LoadLevelScreen.cs" />
<Compile Include="2D\Screens\Menu\MenuOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\NostalgiaScreen.cs" />
<Compile Include="2D\Screens\Menu\OptionsGroupScreen.cs" />
<Compile Include="2D\Screens\Menu\PauseScreen.cs" />
<Compile Include="2D\Screens\Menu\MiscOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\SaveLevelScreen.cs" />
<Compile Include="2D\Screens\Menu\TexturePackScreen.cs" />
<Compile Include="2D\Screens\HudScreen.cs" />
<Compile Include="2D\Screens\Screen.cs" />
<Compile Include="2D\Texture.cs" />
<Compile Include="2D\Utils\FastBitmap.cs" />
<Compile Include="2D\Utils\FastColour.cs" />
<Compile Include="2D\Utils\TextAtlas.cs" />
<Compile Include="2D\Widgets\HotbarWidget.cs" />
<Compile Include="2D\Widgets\Chat\AltTextInputWidget.Types.cs" />
<Compile Include="2D\Widgets\Chat\ChatInputWidget.cs" />
<Compile Include="2D\Widgets\Chat\AltTextInputWidget.cs" />
<Compile Include="2D\Widgets\Chat\TextGroupWidget.cs" />
<Compile Include="2D\Widgets\Chat\TextGroupWidget.Formatter.cs" />
<Compile Include="2D\Widgets\InputWidget.cs" />
<Compile Include="2D\Widgets\Menu\MenuInputValidator.cs" />
<Compile Include="2D\Widgets\Menu\MenuInputWidget.cs" />
<Compile Include="2D\Widgets\ButtonWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\ClassicPlayerListWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\ExtPlayerListWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\NormalPlayerListWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\PlayerListWidget.cs" />
<Compile Include="2D\Widgets\SurvivalHotbarWidget.cs" />
<Compile Include="2D\Widgets\TextWidget.cs" />
<Compile Include="2D\Widgets\Widget.cs" />
<Compile Include="Audio\AudioPlayer.cs" />
<Compile Include="Audio\AudioPlayer.Sounds.cs" />
<Compile Include="Audio\Soundboard.cs" />
<Compile Include="Blocks\AutoRotate.cs" />
<Compile Include="Blocks\Block.cs" />
<Compile Include="Blocks\BlockInfo.BoundsBox.cs" />
<Compile Include="Blocks\BlockInfo.cs" />
<Compile Include="Blocks\BlockInfo.Culling.cs" />
<Compile Include="Blocks\BlockInfo.Atlas.cs" />
<Compile Include="Blocks\DefaultSet.cs" />
<Compile Include="Commands\SinglePlayerCommands.cs" />
<Compile Include="Entities\Components\IInterpComponent.cs" />
<Compile Include="Entities\Mobs\AI.cs" />
<Compile Include="Entities\Components\AnimatedComponent.cs" />
<Compile Include="Entities\Components\HacksComponent.cs" />
<Compile Include="Entities\Components\InputComponent.cs" />
<Compile Include="Entities\Components\CollisionsComponent.cs" />
<Compile Include="Entities\Components\NewCollisionsComponent.cs" />
<Compile Include="Entities\Components\PhysicsComponent.cs" />
<Compile Include="Entities\Components\ShadowComponent.cs" />
<Compile Include="Entities\Components\SoundComponent.cs" />
<Compile Include="Entities\Entity.cs" />
<Compile Include="Entities\EntityList.cs" />
<Compile Include="Entities\LocalPlayer.cs" />
<Compile Include="Entities\LocationUpdate.cs" />
<Compile Include="Entities\Mobs\MobEntity.cs" />
<Compile Include="Entities\NetPlayer.cs" />
<Compile Include="Entities\TabList.cs" />
<Compile Include="Events\EntityEvents.cs" />
<Compile Include="Events\Events.cs" />
<Compile Include="Events\UserEvents.cs" />
<Compile Include="Events\WorldEvents.cs" />
<Compile Include="Game\Game.Init.cs" />
<Compile Include="Game\Game.Properties.cs" />
<Compile Include="Game\GuiInterface.cs" />
<Compile Include="Game\PickingHandler.cs" />
<Compile Include="Game\Plugin.cs" />
<Compile Include="Generator\FlatGrassGenerator.cs" />
<Compile Include="Generator\IMapGenerator.cs" />
<Compile Include="Generator\Noise.cs" />
<Compile Include="Generator\NotchyGenerator.cs" />
<Compile Include="Generator\NotchyGenerator.Utils.cs" />
<Compile Include="GraphicsAPI\IGraphicsAPI.Core.cs" />
<Compile Include="GraphicsAPI\OpenGLESApi.cs" />
<Compile Include="Map\Formats\MapSchematic.Exporter.cs" />
<Compile Include="Map\Formats\MapLvl.Importer.cs" />
<Compile Include="Map\Formats\NbtFile.cs" />
<Compile Include="Map\Lighting\BasicLighting.Updater.cs" />
<Compile Include="Map\Lighting\IWorldLighting.cs" />
<Compile Include="Map\Lighting\BasicLighting.cs" />
<Compile Include="Map\Lighting\BasicLighting.Heightmap.cs" />
<Compile Include="Map\WorldEnv.cs" />
<Compile Include="Math\Physics\AABB.cs" />
<Compile Include="Math\Physics\IntersectionUtils.cs" />
<Compile Include="Math\Physics\Searcher.cs" />
<Compile Include="Math\RayTracer.cs" />
<Compile Include="Entities\Model\CustomModel.cs" />
<Compile Include="Entities\Model\HumanModels.cs" />
<Compile Include="Entities\Model\ModelBuilder.cs" />
<Compile Include="MeshBuilder\Builder.cs" />
<Compile Include="MeshBuilder\FloodFill.cs" />
<Compile Include="MeshBuilder\CuboidDrawer.cs" />
<Compile Include="MeshBuilder\NormalBuilder.cs" />
<Compile Include="MeshBuilder\AdvLightingBuilder.cs" />
<Compile Include="MeshBuilder\TileDrawer.cs" />
<Compile Include="Mode\Creative.cs" />
<Compile Include="Mode\IGameMode.cs" />
<Compile Include="Mode\Survival.cs" />
<Compile Include="Network\CPESupport.cs" />
<Compile Include="Network\Protocols\BlockDefs.cs" />
<Compile Include="Network\Protocols\Classic.cs" />
<Compile Include="Network\Protocols\CPE.cs" />
<Compile Include="Network\Protocols\IProtocol.cs" />
<Compile Include="Network\Protocols\WoM.cs" />
<Compile Include="Network\Utils\PingList.cs" />
<Compile Include="Particles\CollidableParticle.cs" />
<Compile Include="Particles\Particle.cs" />
<Compile Include="Particles\ParticleManager.cs" />
<Compile Include="Particles\ParticleSpawner.cs" />
<Compile Include="Entities\Player.cs" />
<Compile Include="Game\ChatLog.cs" />
<Compile Include="Game\Game.cs" />
<Compile Include="Game\InputHandler.cs" />
<Compile Include="Game\Inventory.cs" />
<Compile Include="Game\KeyMap.cs" />
<Compile Include="GraphicsAPI\Direct3D9Api.cs" />
<Compile Include="GraphicsAPI\IGraphicsApi.cs" />
<Compile Include="GraphicsAPI\OpenGLApi.cs" />
<Compile Include="Commands\Command.cs" />
<Compile Include="Commands\DefaultCommands.cs" />
<Compile Include="GraphicsAPI\VertexFormats.cs" />
<Compile Include="Hotkeys\HotkeyList.cs" />
<Compile Include="Hotkeys\LwjglToKey.cs" />
<Compile Include="Ionic.Zlib\DeflateStream.cs" />
<Compile Include="Ionic.Zlib\Inflate.cs" />
<Compile Include="Ionic.Zlib\InfTree.cs" />
<Compile Include="Ionic.Zlib\ZlibCodec.cs" />
<Compile Include="Map\Formats\IMapFormat.cs" />
<Compile Include="Map\Formats\MapCw.Exporter.cs" />
<Compile Include="Map\Formats\MapCw.Importer.cs" />
<Compile Include="Map\Formats\MapDat.Importer.cs" />
<Compile Include="Map\Formats\MapFcm3.Importer.cs" />
<Compile Include="Map\World.cs" />
<Compile Include="Entities\Model\BlockModel.cs" />
<Compile Include="Entities\Model\ChickenModel.cs" />
<Compile Include="Entities\Model\CreeperModel.cs" />
<Compile Include="Entities\Model\IModel.cs" />
<Compile Include="Entities\Model\ModelCache.cs" />
<Compile Include="Entities\Model\ModelPart.cs" />
<Compile Include="Entities\Model\PigModel.cs" />
<Compile Include="Entities\Model\HumanoidModel.cs" />
<Compile Include="Entities\Model\SheepModel.cs" />
<Compile Include="Entities\Model\SkeletonModel.cs" />
<Compile Include="Entities\Model\SpiderModel.cs" />
<Compile Include="Entities\Model\ZombieModel.cs" />
<Compile Include="Network\Enums.cs" />
<Compile Include="Network\IServerConnection.cs" />
<Compile Include="Network\NetworkProcessor.cs" />
<Compile Include="Network\NetworkProcessor.Helpers.cs" />
<Compile Include="Network\Utils\AsyncDownloader.cs" />
<Compile Include="Network\Utils\NetReader.cs" />
<Compile Include="Network\Utils\FixedBufferStream.cs" />
<Compile Include="Network\Utils\GZipHeaderReader.cs" />
<Compile Include="Commands\CommandList.cs" />
<Compile Include="Network\Utils\NetWriter.cs" />
<Compile Include="Math\PickedPos.cs" />
<Compile Include="Math\Picking.cs" />
<Compile Include="Platform\DesktopWindow.cs" />
<Compile Include="Platform\Font.cs" />
<Compile Include="Platform\IPlatformWindow.cs" />
<Compile Include="Platform\Platform.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rendering\HeldBlockRenderer.cs" />
<Compile Include="Rendering\ChunkSorter.cs" />
<Compile Include="Rendering\ChunkUpdater.cs" />
<Compile Include="Rendering\Env\EnvRenderer.cs" />
<Compile Include="Rendering\Env\MapBordersRenderer.cs" />
<Compile Include="Rendering\Env\SkyboxRenderer.cs" />
<Compile Include="Rendering\Env\StandardEnvRenderer.cs" />
<Compile Include="Rendering\Env\WeatherRenderer.cs" />
<Compile Include="Rendering\MapRenderer.Occlusion.cs" />
<Compile Include="Rendering\FrustumCulling.cs" />
<Compile Include="Rendering\MapRenderer.cs" />
<Compile Include="Selections\AxisLinesRenderer.cs" />
<Compile Include="Selections\PickedPosRenderer.cs" />
<Compile Include="Selections\SelectionBox.cs" />
<Compile Include="Selections\SelectionBoxComparer.cs" />
<Compile Include="Selections\SelectionManager.cs" />
<Compile Include="Singleplayer\FallingPhysics.cs" />
<Compile Include="Singleplayer\FoliagePhysics.cs" />
<Compile Include="Singleplayer\LiquidPhysics.cs" />
<Compile Include="Singleplayer\OtherPhysics.cs" />
<Compile Include="Singleplayer\Physics.cs" />
<Compile Include="Singleplayer\Server.cs" />
<Compile Include="Singleplayer\TNTPhysics.cs" />
<Compile Include="TexturePack\EntryList.cs" />
<Compile Include="TexturePack\Animations.cs" />
<Compile Include="TexturePack\LiquidAnimations.cs" />
<Compile Include="TexturePack\Side.cs" />
<Compile Include="TexturePack\TextureCache.cs" />
<Compile Include="TexturePack\TerrainAtlas1D.cs" />
<Compile Include="TexturePack\TerrainAtlas2D.cs" />
<Compile Include="TexturePack\TexturePack.cs" />
<Compile Include="TexturePack\ZipReader.cs" />
<Compile Include="Utils\Camera.cs" />
<Compile Include="Utils\ErrorHandler.cs" />
<Compile Include="Utils\Options.cs" />
<Compile Include="Utils\ReadOnlyStream.cs" />
<Compile Include="Utils\Respawn.cs" />
<Compile Include="Utils\TextureRectangle.cs" />
<Compile Include="Utils\StringBuffer.cs" />
<Compile Include="Utils\Utils.cs" />
<Compile Include="Utils\Utils.Math.cs" />
<Compile Include="Utils\Vector3I.cs" />
<Compile Include="Utils\WrappableStringBuffer.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\credits.txt">
<Link>credits.txt</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="app.config" />
<None Include="..\readme.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SharpWave.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="2D\Drawing" />
<Folder Include="2D\Screens\Inventory" />
<Folder Include="2D\Screens\Overlays" />
<Folder Include="2D\Utils" />
<Folder Include="2D\Screens" />
<Folder Include="2D\Screens\Menu" />
<Folder Include="2D\Widgets" />
<Folder Include="2D\Widgets\Menu" />
<Folder Include="2D\Widgets\Chat" />
<Folder Include="2D\Widgets\PlayerList" />
<Folder Include="Blocks" />
<Folder Include="Entities\Components" />
<Folder Include="Entities\Mobs" />
<Folder Include="Events" />
<Folder Include="Generator" />
<Folder Include="Map\Lighting" />
<Folder Include="Math\Physics" />
<Folder Include="MeshBuilder" />
<Folder Include="Network\Protocols" />
<Folder Include="Mode" />
<Folder Include="Platform" />
<Folder Include="Particles" />
<Folder Include="GraphicsAPI" />
<Folder Include="Entities" />
<Folder Include="Ionic.Zlib" />
<Folder Include="Map" />
<Folder Include="Game" />
<Folder Include="Map\Formats" />
<Folder Include="Entities\Model" />
<Folder Include="Network\Utils" />
<Folder Include="Hotkeys" />
<Folder Include="Audio" />
<Folder Include="Rendering\Env" />
<Folder Include="TexturePack" />
<Folder Include="Singleplayer" />
<Folder Include="Utils" />
<Folder Include="Math" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenTK\OpenTK.csproj">
<Project>{35FEE071-2DE6-48A1-9343-B5C1F202A12B}</Project>
<Name>OpenTK</Name>
</ProjectReference>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{BEB1C785-5CAD-48FF-A886-876BF0A318D4}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace>ClassicalSharp</RootNamespace>
<AssemblyName>ClassicalSharp</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<AppDesignerFolder>Properties</AppDesignerFolder>
<NoWin32Manifest>False</NoWin32Manifest>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WarningLevel>4</WarningLevel>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<BaseAddress>4194304</BaseAddress>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\output\debug\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<StartAction>Project</StartAction>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>..\output\release\</OutputPath>
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug_D3D' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>..\output\debug\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE;USE_DX</DefineConstants>
<StartAction>Project</StartAction>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release_D3D' ">
<OutputPath>..\output\release\</OutputPath>
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;USE_DX;</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="SharpWave">
<HintPath>SharpWave.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="2D\Drawing\CanvasDrawer2D.cs" />
<Compile Include="2D\Drawing\CanvasDrawer2D.Text.cs" />
<Compile Include="2D\Drawing\GdiPlusDrawer2D.Text.cs" />
<Compile Include="2D\Drawing\IDrawer2D.TextMC.cs" />
<Compile Include="2D\GuiElement.cs" />
<Compile Include="2D\IsometricBlockDrawer.cs" />
<Compile Include="2D\Drawing\DrawTextArgs.cs" />
<Compile Include="2D\Drawing\GdiPlusDrawer2D.cs" />
<Compile Include="2D\Drawing\IDrawer2D.cs" />
<Compile Include="2D\Screens\ChatScreen.cs" />
<Compile Include="2D\Screens\ClickableScreen.cs" />
<Compile Include="2D\Screens\DeathScreen.cs" />
<Compile Include="2D\Screens\DisconnectScreen.cs" />
<Compile Include="2D\Screens\Overlays\Overlay.cs" />
<Compile Include="2D\Screens\Overlays\TexIdsOverlay.cs" />
<Compile Include="2D\Screens\Overlays\WarningOverlay.cs" />
<Compile Include="2D\Screens\StatusScreen.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.Input.cs" />
<Compile Include="2D\Screens\Inventory\InventoryScreen.Scrolling.cs" />
<Compile Include="2D\Screens\LoadingMapScreen.cs" />
<Compile Include="2D\Screens\MenuScreen.cs" />
<Compile Include="2D\Screens\Menu\ClassicOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\EditHotkeyScreen.cs" />
<Compile Include="2D\Screens\Menu\EnvSettingsScreen.cs" />
<Compile Include="2D\Screens\Menu\FilesScreen.cs" />
<Compile Include="2D\Screens\Menu\GenLevelScreen.cs" />
<Compile Include="2D\Screens\Menu\GraphicsOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\GuiOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\HacksSettingsScreen.cs" />
<Compile Include="2D\Screens\Menu\HotkeyListScreen.cs" />
<Compile Include="2D\Screens\Menu\KeyBindingsScreen.cs" />
<Compile Include="2D\Screens\Menu\KeyBindingsScreens.cs" />
<Compile Include="2D\Screens\Menu\LoadLevelScreen.cs" />
<Compile Include="2D\Screens\Menu\MenuOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\NostalgiaScreen.cs" />
<Compile Include="2D\Screens\Menu\OptionsGroupScreen.cs" />
<Compile Include="2D\Screens\Menu\PauseScreen.cs" />
<Compile Include="2D\Screens\Menu\MiscOptionsScreen.cs" />
<Compile Include="2D\Screens\Menu\SaveLevelScreen.cs" />
<Compile Include="2D\Screens\Menu\TexturePackScreen.cs" />
<Compile Include="2D\Screens\HudScreen.cs" />
<Compile Include="2D\Screens\Screen.cs" />
<Compile Include="2D\Texture.cs" />
<Compile Include="2D\Utils\FastBitmap.cs" />
<Compile Include="2D\Utils\FastColour.cs" />
<Compile Include="2D\Utils\TextAtlas.cs" />
<Compile Include="2D\Widgets\HotbarWidget.cs" />
<Compile Include="2D\Widgets\Chat\AltTextInputWidget.Types.cs" />
<Compile Include="2D\Widgets\Chat\ChatInputWidget.cs" />
<Compile Include="2D\Widgets\Chat\AltTextInputWidget.cs" />
<Compile Include="2D\Widgets\Chat\TextGroupWidget.cs" />
<Compile Include="2D\Widgets\Chat\TextGroupWidget.Formatter.cs" />
<Compile Include="2D\Widgets\InputWidget.cs" />
<Compile Include="2D\Widgets\Menu\MenuInputValidator.cs" />
<Compile Include="2D\Widgets\Menu\MenuInputWidget.cs" />
<Compile Include="2D\Widgets\ButtonWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\ClassicPlayerListWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\ExtPlayerListWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\NormalPlayerListWidget.cs" />
<Compile Include="2D\Widgets\PlayerList\PlayerListWidget.cs" />
<Compile Include="2D\Widgets\SurvivalHotbarWidget.cs" />
<Compile Include="2D\Widgets\TextWidget.cs" />
<Compile Include="2D\Widgets\Widget.cs" />
<Compile Include="Audio\AudioPlayer.cs" />
<Compile Include="Audio\AudioPlayer.Sounds.cs" />
<Compile Include="Audio\Soundboard.cs" />
<Compile Include="Blocks\AutoRotate.cs" />
<Compile Include="Blocks\Block.cs" />
<Compile Include="Blocks\BlockInfo.BoundsBox.cs" />
<Compile Include="Blocks\BlockInfo.cs" />
<Compile Include="Blocks\BlockInfo.Culling.cs" />
<Compile Include="Blocks\BlockInfo.Atlas.cs" />
<Compile Include="Blocks\DefaultSet.cs" />
<Compile Include="Commands\SinglePlayerCommands.cs" />
<Compile Include="Entities\Components\IInterpComponent.cs" />
<Compile Include="Entities\Mobs\AI.cs" />
<Compile Include="Entities\Components\AnimatedComponent.cs" />
<Compile Include="Entities\Components\HacksComponent.cs" />
<Compile Include="Entities\Components\InputComponent.cs" />
<Compile Include="Entities\Components\CollisionsComponent.cs" />
<Compile Include="Entities\Components\NewCollisionsComponent.cs" />
<Compile Include="Entities\Components\PhysicsComponent.cs" />
<Compile Include="Entities\Components\ShadowComponent.cs" />
<Compile Include="Entities\Components\SoundComponent.cs" />
<Compile Include="Entities\Entity.cs" />
<Compile Include="Entities\EntityList.cs" />
<Compile Include="Entities\LocalPlayer.cs" />
<Compile Include="Entities\LocationUpdate.cs" />
<Compile Include="Entities\Mobs\MobEntity.cs" />
<Compile Include="Entities\NetPlayer.cs" />
<Compile Include="Entities\TabList.cs" />
<Compile Include="Events\EntityEvents.cs" />
<Compile Include="Events\Events.cs" />
<Compile Include="Events\UserEvents.cs" />
<Compile Include="Events\WorldEvents.cs" />
<Compile Include="Game\Game.Init.cs" />
<Compile Include="Game\Game.Properties.cs" />
<Compile Include="Game\GuiInterface.cs" />
<Compile Include="Game\PickingHandler.cs" />
<Compile Include="Game\Plugin.cs" />
<Compile Include="Generator\FlatGrassGenerator.cs" />
<Compile Include="Generator\IMapGenerator.cs" />
<Compile Include="Generator\Noise.cs" />
<Compile Include="Generator\NotchyGenerator.cs" />
<Compile Include="Generator\NotchyGenerator.Utils.cs" />
<Compile Include="GraphicsAPI\IGraphicsAPI.Core.cs" />
<Compile Include="GraphicsAPI\OpenGLESApi.cs" />
<Compile Include="Map\Formats\MapSchematic.Exporter.cs" />
<Compile Include="Map\Formats\MapLvl.Importer.cs" />
<Compile Include="Map\Formats\NbtFile.cs" />
<Compile Include="Map\Lighting\BasicLighting.Updater.cs" />
<Compile Include="Map\Lighting\IWorldLighting.cs" />
<Compile Include="Map\Lighting\BasicLighting.cs" />
<Compile Include="Map\Lighting\BasicLighting.Heightmap.cs" />
<Compile Include="Map\WorldEnv.cs" />
<Compile Include="Math\Physics\AABB.cs" />
<Compile Include="Math\Physics\IntersectionUtils.cs" />
<Compile Include="Math\Physics\Searcher.cs" />
<Compile Include="Math\RayTracer.cs" />
<Compile Include="Entities\Model\CustomModel.cs" />
<Compile Include="Entities\Model\HumanModels.cs" />
<Compile Include="Entities\Model\ModelBuilder.cs" />
<Compile Include="MeshBuilder\Builder.cs" />
<Compile Include="MeshBuilder\FloodFill.cs" />
<Compile Include="MeshBuilder\CuboidDrawer.cs" />
<Compile Include="MeshBuilder\NormalBuilder.cs" />
<Compile Include="MeshBuilder\AdvLightingBuilder.cs" />
<Compile Include="MeshBuilder\TileDrawer.cs" />
<Compile Include="Mode\Creative.cs" />
<Compile Include="Mode\IGameMode.cs" />
<Compile Include="Mode\Survival.cs" />
<Compile Include="Network\CPESupport.cs" />
<Compile Include="Network\Protocols\BlockDefs.cs" />
<Compile Include="Network\Protocols\Classic.cs" />
<Compile Include="Network\Protocols\CPE.cs" />
<Compile Include="Network\Protocols\IProtocol.cs" />
<Compile Include="Network\Protocols\WoM.cs" />
<Compile Include="Network\Utils\PingList.cs" />
<Compile Include="Particles\CollidableParticle.cs" />
<Compile Include="Particles\Particle.cs" />
<Compile Include="Particles\ParticleManager.cs" />
<Compile Include="Particles\ParticleSpawner.cs" />
<Compile Include="Entities\Player.cs" />
<Compile Include="Game\ChatLog.cs" />
<Compile Include="Game\Game.cs" />
<Compile Include="Game\InputHandler.cs" />
<Compile Include="Game\Inventory.cs" />
<Compile Include="Game\KeyMap.cs" />
<Compile Include="GraphicsAPI\Direct3D9Api.cs" />
<Compile Include="GraphicsAPI\IGraphicsApi.cs" />
<Compile Include="GraphicsAPI\OpenGLApi.cs" />
<Compile Include="Commands\Command.cs" />
<Compile Include="Commands\DefaultCommands.cs" />
<Compile Include="GraphicsAPI\VertexFormats.cs" />
<Compile Include="Hotkeys\HotkeyList.cs" />
<Compile Include="Hotkeys\LwjglToKey.cs" />
<Compile Include="Ionic.Zlib\DeflateStream.cs" />
<Compile Include="Ionic.Zlib\Inflate.cs" />
<Compile Include="Ionic.Zlib\InfTree.cs" />
<Compile Include="Ionic.Zlib\ZlibCodec.cs" />
<Compile Include="Map\Formats\IMapFormat.cs" />
<Compile Include="Map\Formats\MapCw.Exporter.cs" />
<Compile Include="Map\Formats\MapCw.Importer.cs" />
<Compile Include="Map\Formats\MapDat.Importer.cs" />
<Compile Include="Map\Formats\MapFcm3.Importer.cs" />
<Compile Include="Map\World.cs" />
<Compile Include="Entities\Model\BlockModel.cs" />
<Compile Include="Entities\Model\ChickenModel.cs" />
<Compile Include="Entities\Model\CreeperModel.cs" />
<Compile Include="Entities\Model\IModel.cs" />
<Compile Include="Entities\Model\ModelCache.cs" />
<Compile Include="Entities\Model\ModelPart.cs" />
<Compile Include="Entities\Model\PigModel.cs" />
<Compile Include="Entities\Model\HumanoidModel.cs" />
<Compile Include="Entities\Model\SheepModel.cs" />
<Compile Include="Entities\Model\SkeletonModel.cs" />
<Compile Include="Entities\Model\SpiderModel.cs" />
<Compile Include="Entities\Model\ZombieModel.cs" />
<Compile Include="Network\Enums.cs" />
<Compile Include="Network\IServerConnection.cs" />
<Compile Include="Network\NetworkProcessor.cs" />
<Compile Include="Network\NetworkProcessor.Helpers.cs" />
<Compile Include="Network\Utils\AsyncDownloader.cs" />
<Compile Include="Network\Utils\NetReader.cs" />
<Compile Include="Network\Utils\FixedBufferStream.cs" />
<Compile Include="Network\Utils\GZipHeaderReader.cs" />
<Compile Include="Commands\CommandList.cs" />
<Compile Include="Network\Utils\NetWriter.cs" />
<Compile Include="Math\PickedPos.cs" />
<Compile Include="Math\Picking.cs" />
<Compile Include="Platform\DesktopWindow.cs" />
<Compile Include="Platform\Font.cs" />
<Compile Include="Platform\IPlatformWindow.cs" />
<Compile Include="Platform\Platform.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rendering\HeldBlockRenderer.cs" />
<Compile Include="Rendering\ChunkSorter.cs" />
<Compile Include="Rendering\ChunkUpdater.cs" />
<Compile Include="Rendering\Env\EnvRenderer.cs" />
<Compile Include="Rendering\Env\MapBordersRenderer.cs" />
<Compile Include="Rendering\Env\SkyboxRenderer.cs" />
<Compile Include="Rendering\Env\StandardEnvRenderer.cs" />
<Compile Include="Rendering\Env\WeatherRenderer.cs" />
<Compile Include="Rendering\MapRenderer.Occlusion.cs" />
<Compile Include="Rendering\FrustumCulling.cs" />
<Compile Include="Rendering\MapRenderer.cs" />
<Compile Include="Selections\AxisLinesRenderer.cs" />
<Compile Include="Selections\PickedPosRenderer.cs" />
<Compile Include="Selections\SelectionBox.cs" />
<Compile Include="Selections\SelectionBoxComparer.cs" />
<Compile Include="Selections\SelectionManager.cs" />
<Compile Include="Singleplayer\FallingPhysics.cs" />
<Compile Include="Singleplayer\FoliagePhysics.cs" />
<Compile Include="Singleplayer\LiquidPhysics.cs" />
<Compile Include="Singleplayer\OtherPhysics.cs" />
<Compile Include="Singleplayer\Physics.cs" />
<Compile Include="Singleplayer\Server.cs" />
<Compile Include="Singleplayer\TNTPhysics.cs" />
<Compile Include="TexturePack\EntryList.cs" />
<Compile Include="TexturePack\Animations.cs" />
<Compile Include="TexturePack\LiquidAnimations.cs" />
<Compile Include="TexturePack\Side.cs" />
<Compile Include="TexturePack\TextureCache.cs" />
<Compile Include="TexturePack\TerrainAtlas1D.cs" />
<Compile Include="TexturePack\TerrainAtlas2D.cs" />
<Compile Include="TexturePack\TexturePack.cs" />
<Compile Include="TexturePack\ZipReader.cs" />
<Compile Include="Utils\Camera.cs" />
<Compile Include="Utils\ErrorHandler.cs" />
<Compile Include="Utils\Options.cs" />
<Compile Include="Utils\ReadOnlyStream.cs" />
<Compile Include="Utils\Respawn.cs" />
<Compile Include="Utils\TextureRectangle.cs" />
<Compile Include="Utils\StringBuffer.cs" />
<Compile Include="Utils\Utils.cs" />
<Compile Include="Utils\Utils.Math.cs" />
<Compile Include="Utils\Vector3I.cs" />
<Compile Include="Utils\WrappableStringBuffer.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\credits.txt">
<Link>credits.txt</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="app.config" />
<None Include="..\readme.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SharpWave.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="2D\Drawing" />
<Folder Include="2D\Screens\Inventory" />
<Folder Include="2D\Screens\Overlays" />
<Folder Include="2D\Utils" />
<Folder Include="2D\Screens" />
<Folder Include="2D\Screens\Menu" />
<Folder Include="2D\Widgets" />
<Folder Include="2D\Widgets\Menu" />
<Folder Include="2D\Widgets\Chat" />
<Folder Include="2D\Widgets\PlayerList" />
<Folder Include="Blocks" />
<Folder Include="Entities\Components" />
<Folder Include="Entities\Mobs" />
<Folder Include="Events" />
<Folder Include="Generator" />
<Folder Include="Map\Lighting" />
<Folder Include="Math\Physics" />
<Folder Include="MeshBuilder" />
<Folder Include="Network\Protocols" />
<Folder Include="Mode" />
<Folder Include="Platform" />
<Folder Include="Particles" />
<Folder Include="GraphicsAPI" />
<Folder Include="Entities" />
<Folder Include="Ionic.Zlib" />
<Folder Include="Map" />
<Folder Include="Game" />
<Folder Include="Map\Formats" />
<Folder Include="Entities\Model" />
<Folder Include="Network\Utils" />
<Folder Include="Hotkeys" />
<Folder Include="Audio" />
<Folder Include="Rendering\Env" />
<Folder Include="TexturePack" />
<Folder Include="Singleplayer" />
<Folder Include="Utils" />
<Folder Include="Math" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenTK\OpenTK.csproj">
<Project>{35FEE071-2DE6-48A1-9343-B5C1F202A12B}</Project>
<Name>OpenTK</Name>
</ProjectReference>
</ItemGroup>
</Project>

View file

@ -175,7 +175,7 @@ namespace ClassicalSharp.GraphicsAPI {
texture = device.CreateTexture(width, height, levels, Usage.None, Format.A8R8G8B8, Pool.Managed);
texture.SetData(0, LockFlags.None, scan0, width * height * 4);
if (mipmaps) DoMipmaps(texture, width, height, scan0);
if (mipmaps) DoMipmaps(texture, 0, 0, width, height, scan0, false);
} else {
D3D.Texture sys = device.CreateTexture(width, height, levels, Usage.None, Format.A8R8G8B8, Pool.SystemMemory);
sys.SetData(0, LockFlags.None, scan0, width * height * 4);
@ -187,28 +187,34 @@ namespace ClassicalSharp.GraphicsAPI {
return GetOrExpand(ref textures, texture, texBufferSize);
}
unsafe void DoMipmaps(D3D.Texture texture, int width, int height, IntPtr scan0) {
unsafe void DoMipmaps(D3D.Texture texture, int x, int y, int width,
int height, IntPtr scan0, bool partial) {
IntPtr prev = scan0;
int lvls = MipmapsLevels(width, height);
for (int lvl = 1; lvl <= lvls; lvl++) {
width /= 2; height /= 2;
x /= 2; y /= 2; width /= 2; height /= 2;
int size = width * height * 4;
IntPtr cur = Marshal.AllocHGlobal(size);
GenMipmaps(width, height, cur, prev);
texture.SetData(lvl, LockFlags.None, cur, size);
if (prev != scan0) Marshal.FreeHGlobal(prev);
if (partial) {
texture.SetPartData(lvl, LockFlags.None, cur, x, y, width, height);
} else {
texture.SetData(lvl, LockFlags.None, cur, size);
}
if (prev != scan0) Marshal.FreeHGlobal(prev);
prev = cur;
}
if (prev != scan0) Marshal.FreeHGlobal(prev);
}
public override void UpdateTexturePart(int texId, int texX, int texY, FastBitmap part) {
public override void UpdateTexturePart(int texId, int x, int y, FastBitmap part, bool mipmaps) {
D3D.Texture texture = textures[texId];
texture.SetPartData(0, LockFlags.None, part.Scan0, texX, texY, part.Width, part.Height);
texture.SetPartData(0, LockFlags.None, part.Scan0, x, y, part.Width, part.Height);
if (Mipmaps) DoMipmaps(texture, x, y, part.Width, part.Height, part.Scan0, true);
}
public override void BindTexture(int texId) {

View file

@ -74,9 +74,9 @@ namespace ClassicalSharp.GraphicsAPI {
/// because otherwise they will not display properly on certain graphics cards. </remarks>
protected abstract int CreateTexture(int width, int height, IntPtr scan0, bool managedPool, bool mipmaps);
/// <summary> Updates the sub-rectangle (texX, texY) -> (texX + part.Width, texY + part.Height)
/// <summary> Updates the sub-rectangle (x, y) -> (x + part.Width, y + part.Height)
/// of the native texture associated with the given ID, with the pixels encapsulated in the 'part' instance. </summary>
public abstract void UpdateTexturePart(int texId, int texX, int texY, FastBitmap part);
public abstract void UpdateTexturePart(int texId, int x, int y, FastBitmap part, bool mipmaps);
/// <summary> Binds the given texture id so that it can be used for rasterization. </summary>
public abstract void BindTexture(int texId);

View file

@ -177,25 +177,31 @@ namespace ClassicalSharp.GraphicsAPI {
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, width, height,
GlPixelFormat.Bgra, PixelType.UnsignedByte, scan0);
if (mipmaps) DoMipmaps(texId, width, height, scan0);
if (mipmaps) DoMipmaps(texId, 0, 0, width, height, scan0, false);
return texId;
}
unsafe void DoMipmaps(int texture, int width, int height, IntPtr scan0) {
unsafe void DoMipmaps(int texId, int x, int y, int width,
int height, IntPtr scan0, bool partial) {
IntPtr prev = scan0;
int lvls = MipmapsLevels(width, height);
for (int lvl = 1; lvl <= lvls; lvl++) {
width /= 2; height /= 2;
x /= 2; y /= 2; width /= 2; height /= 2;
int size = width * height * 4;
IntPtr cur = Marshal.AllocHGlobal(size);
GenMipmaps(width, height, cur, prev);
GL.TexImage2D(TextureTarget.Texture2D, lvl, PixelInternalFormat.Rgba, width, height,
GlPixelFormat.Bgra, PixelType.UnsignedByte, cur);
if (prev != scan0) Marshal.FreeHGlobal(prev);
if (partial) {
GL.TexSubImage2D(TextureTarget.Texture2D, lvl, x, y, width, height,
GlPixelFormat.Bgra, PixelType.UnsignedByte, cur);
} else {
GL.TexImage2D(TextureTarget.Texture2D, lvl, PixelInternalFormat.Rgba, width, height,
GlPixelFormat.Bgra, PixelType.UnsignedByte, cur);
}
if (prev != scan0) Marshal.FreeHGlobal(prev);
prev = cur;
}
if (prev != scan0) Marshal.FreeHGlobal(prev);
@ -205,10 +211,11 @@ namespace ClassicalSharp.GraphicsAPI {
GL.BindTexture(TextureTarget.Texture2D, texture);
}
public override void UpdateTexturePart(int texId, int texX, int texY, FastBitmap part) {
public override void UpdateTexturePart(int texId, int x, int y, FastBitmap part, bool mipmaps) {
GL.BindTexture(TextureTarget.Texture2D, texId);
GL.TexSubImage2D(TextureTarget.Texture2D, 0, texX, texY, part.Width, part.Height,
GL.TexSubImage2D(TextureTarget.Texture2D, 0, x, y, part.Width, part.Height,
GlPixelFormat.Bgra, PixelType.UnsignedByte, part.Scan0);
if (mipmaps) DoMipmaps(texId, x, y, part.Width, part.Height, part.Scan0, true);
}
public override void DeleteTexture(ref int texId) {

View file

@ -138,9 +138,9 @@ namespace ClassicalSharp.GraphicsAPI {
GL.BindTexture(All.Texture2D, texture);
}
public override void UpdateTexturePart(int texId, int texX, int texY, FastBitmap part) {
public override void UpdateTexturePart(int texId, int x, int y, FastBitmap part) {
GL.BindTexture(All.Texture2D, texId);
GL.TexSubImage2D(All.Texture2D, 0, texX, texY, part.Width, part.Height,
GL.TexSubImage2D(All.Texture2D, 0, x, y, part.Width, part.Height,
All.BgraExt, All.UnsignedByte, part.Scan0);
}

View file

@ -160,7 +160,7 @@ namespace ClassicalSharp.Textures {
FastBitmap.MovePortion(data.FrameX + data.State * size,
data.FrameY, 0, 0, animsBuffer, animPart, size);
}
gfx.UpdateTexturePart(atlas.TexIds[index], 0, rowNum * game.TerrainAtlas.TileSize, animPart);
gfx.UpdateTexturePart(atlas.TexIds[index], 0, rowNum * game.TerrainAtlas.TileSize, animPart, game.Graphics.Mipmaps);
}
bool IsDefaultZip() {