├── Media
├── UI
│ └── Font.dds
└── sph_shader.fx
├── DXUT
├── Core
│ ├── ScreenGrab.cpp
│ ├── CMakeLists.txt
│ ├── ScreenGrab.h
│ ├── dxerr.h
│ ├── WICTextureLoader.h
│ ├── DDSTextureLoader.h
│ ├── DXUTDevice11.h
│ ├── DXUTmisc.h
│ ├── DXUT.h
│ └── WICTextureLoader.cpp
├── Optional
│ ├── directx.ico
│ ├── DXUTres.h
│ ├── CMakeLists.txt
│ ├── ImeUi.h
│ ├── SDKmisc.h
│ ├── DXUTguiIME.h
│ ├── DXUTsettingsdlg.h
│ ├── DXUTLockFreePipe.h
│ ├── SDKmesh.h
│ └── DXUTcamera.h
├── CMakeLists.txt
└── ReadMe.txt
├── libsph
├── sph_fluid_system.h
├── sph_point_buffer.h
├── sph_fluid_system.cpp
├── sph_stdafx.cpp
├── sph_stdafx.h
├── sph_interface.h
├── CMakeLists.txt
├── sph_grid_container.h
├── sph_neighbor_table.h
├── sph_point_buffer.cpp
├── sph_math.h
├── sph_neighbor_table.cpp
└── sph_grid_container.cpp
├── README.md
├── CMakeLists.txt
└── sph
├── CMakeLists.txt
└── sph_main.cpp
/Media/UI/Font.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejinchao/fluid/HEAD/Media/UI/Font.dds
--------------------------------------------------------------------------------
/DXUT/Core/ScreenGrab.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejinchao/fluid/HEAD/DXUT/Core/ScreenGrab.cpp
--------------------------------------------------------------------------------
/DXUT/Optional/directx.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejinchao/fluid/HEAD/DXUT/Optional/directx.ico
--------------------------------------------------------------------------------
/libsph/sph_fluid_system.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejinchao/fluid/HEAD/libsph/sph_fluid_system.h
--------------------------------------------------------------------------------
/libsph/sph_point_buffer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejinchao/fluid/HEAD/libsph/sph_point_buffer.h
--------------------------------------------------------------------------------
/libsph/sph_fluid_system.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejinchao/fluid/HEAD/libsph/sph_fluid_system.cpp
--------------------------------------------------------------------------------
/DXUT/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | #Copyright(C) thecodeway.com
3 | #
4 |
5 | add_subdirectory(Core)
6 | add_subdirectory(Optional)
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | fluid
2 | =====
3 |
4 | souce code for the my blog(http://thecodeway.com/blog/?p=204)
5 |
6 |
7 |
--------------------------------------------------------------------------------
/libsph/sph_stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // libWorld.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "sph_stdafx.h"
6 |
7 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | #Copyright(C) thecodeway.com
3 | #
4 |
5 | cmake_minimum_required (VERSION 2.8)
6 | project(fluid)
7 |
8 | add_definitions(-DUNICODE -D_UNICODE)
9 |
10 | set_property(GLOBAL PROPERTY USE_FOLDERS ON)
11 | add_subdirectory(libsph)
12 | add_subdirectory(DXUT)
13 | add_subdirectory(sph)
14 |
--------------------------------------------------------------------------------
/sph/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | #Copyright(C) thecodeway.com
3 | #
4 |
5 | include_directories(
6 | ../DXUT/Core
7 | ../DXUT/Optional
8 | ../Effects11/inc
9 | ../libsph
10 | )
11 |
12 | add_definitions(-DUSE_DIRECT3D11_2)
13 |
14 | add_executable(sph WIN32
15 | sph_main.cpp
16 | )
17 |
18 | target_link_libraries(sph
19 | libsph
20 | DXUT_Core
21 | DXUT_Optional
22 | d3dcompiler.lib
23 | usp10.lib
24 | dxguid.lib
25 | winmm.lib
26 | comctl32.lib
27 | )
28 |
--------------------------------------------------------------------------------
/DXUT/Core/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | #Copyright(C) thecodeway.com
3 | #
4 |
5 | add_library(DXUT_Core
6 | DDSTextureLoader.cpp
7 | DDSTextureLoader.h
8 | dxerr.cpp
9 | dxerr.h
10 | DXUT.cpp
11 | DXUT.h
12 | DXUTDevice11.cpp
13 | DXUTDevice11.h
14 | DXUTmisc.cpp
15 | DXUTmisc.h
16 | ScreenGrab.cpp
17 | ScreenGrab.h
18 | WICTextureLoader.cpp
19 | WICTextureLoader.h
20 | )
21 |
--------------------------------------------------------------------------------
/DXUT/Optional/DXUTres.h:
--------------------------------------------------------------------------------
1 | //----------------------------------------------------------------------------
2 | // File: dxutres.h
3 | //
4 | // Functions to create DXUT media from arrays in memory
5 | //
6 | // Copyright (c) Microsoft Corporation. All rights reserved.
7 | // Licensed under the MIT License.
8 | //
9 | // http://go.microsoft.com/fwlink/?LinkId=320437
10 | //-----------------------------------------------------------------------------
11 | #pragma once
12 |
13 | HRESULT WINAPI DXUTCreateGUITextureFromInternalArray( _In_ ID3D11Device* pd3dDevice, _Outptr_ ID3D11Texture2D** ppTexture );
14 |
--------------------------------------------------------------------------------
/libsph/sph_stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 |
8 | // C Runtime library
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 |
15 | // CPP Runtime library
16 | #include
17 | #include
18 | #include
19 | #include