Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
BIN
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/directx.ico
Normal file
BIN
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/directx.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
1143
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/main.cpp
Normal file
1143
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
276
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/readme.txt
Normal file
276
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/readme.txt
Normal file
@@ -0,0 +1,276 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: Volume Fog Direct3D Sample
|
||||
//
|
||||
// Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Description
|
||||
===========
|
||||
The Volume Fog sample shows the per-pixel density volumetric rendering
|
||||
technique. The fog volume is modeled as a polygonal mesh, and the
|
||||
density of the fog at every pixel is computed by subtracting the front
|
||||
side of the fog volume from the back side. The fog is mixed with the
|
||||
scene by accumulating an in/out test at every pixel -- that is, back-facing
|
||||
fog polygons will add, while front-facing ones will subtract. If the value
|
||||
is non zero, then the scene intersects the fog and the scene's depth value
|
||||
is used. In order to get better results, this demo uses 12 bits of precision
|
||||
by encoding high and low bits in different color channels.
|
||||
|
||||
|
||||
Path
|
||||
====
|
||||
Source: DXSDK\Samples\Multimedia\D3D\volumefog
|
||||
Executable: DXSDK\Samples\Multimedia\D3D\Bin
|
||||
|
||||
|
||||
User's Guide
|
||||
============
|
||||
The following keys are implemented.
|
||||
<J> Move object backward on the Z axis
|
||||
<M> Move Object forward on the z Axis
|
||||
<H> Move Object forward on the X axis
|
||||
<K> Move object backward on the X axis
|
||||
<N> Move object forward on the y axis
|
||||
<Y> Move object backward on the y axis
|
||||
|
||||
Camera Controls:
|
||||
<LEFT> Slide Left
|
||||
<RIGHT> Slide Right
|
||||
<DOWN> Slide Down
|
||||
<UP> Slide Up
|
||||
<W> Move forward
|
||||
<S> Move backward
|
||||
<NUMPAD8> Pitch Down
|
||||
<NUMPAD2> Pitch Up
|
||||
<NUMPAD4> Turn Right
|
||||
<NUMPAD6> Turn Left
|
||||
<NUMPAD9> Roll CW
|
||||
<NUMPAD7> Roll CCW
|
||||
|
||||
Mouse Controls:
|
||||
Rotates Fog Volume.
|
||||
|
||||
|
||||
Programming Notes
|
||||
=================
|
||||
Introduction
|
||||
The article "Volumetric Rendering in Real-Time," printed in the 2001 GDC
|
||||
Proceedings, covered the basis of volumetric depth rendering, but at the
|
||||
time of the writing, no pixel-shader-compliant hardware was available.
|
||||
This supplement describes a process designed to achieve two goals: to get
|
||||
more precision out of an 8 bit part, and to allow the creation of concave
|
||||
fog volumes.
|
||||
|
||||
|
||||
Handling Concavity
|
||||
Computing the distance of fog for the convex case was relatively simple.
|
||||
Recall that the front side of the fog volume was subtracted away from the
|
||||
back side (where the depth is measured in number of units from the camera).
|
||||
Unfortunately, this does not work with concave fog volumes because at any
|
||||
given pixel, it may have two back sides and two front sides. The solution
|
||||
is intuitive and has sound mathematical backing: sum all of the front
|
||||
sides and subtract them from the summed back sides.
|
||||
|
||||
So now, computing concavity is as simple as adding the multiple front
|
||||
sides and subtracting them from the multiple back sides. Clearly, a meager
|
||||
8 bits won<6F>t be enough for this. Every bit added would allow another
|
||||
summation and subtraction, and allow for more complex fog scenes.
|
||||
|
||||
There is an important assumption being made about the fog volume. Is must
|
||||
be a continuous, orientable hull. That is, it cannot have any holes in
|
||||
it. Every ray cast through the volume must enter through hull the same
|
||||
number of times it exits.
|
||||
|
||||
Getting Higher Precision
|
||||
Although most 3D hardware handle 32 bits, it is really four
|
||||
8-bit channels. The way most hardware works today, there is only one place
|
||||
where the fog depths could be summed up: the alpha blender. The alpha
|
||||
blender is typically used to blend on alpha textures by configuring the
|
||||
source destination to multiply against the source alpha, and the
|
||||
destination to multiply against the inverse alpha. However, they can also
|
||||
be used to add (or subtract) the source and destination color channels.
|
||||
Unfortunately, there is no way to perform a carry operation here: If one
|
||||
channel would exceed 255 for a color value, it simply saturates to 255.
|
||||
In order to perform higher bit precision additions on the alpha blending
|
||||
unit, the incoming data has to be formatted in a way which is compatible
|
||||
with the way the alpha blender adds. To do this, the color channels can
|
||||
hold different bits of the actual result, and most importantly, be allowed
|
||||
some overlap in their bits.
|
||||
|
||||
This sample uses the following scheme: The red channel will contain the
|
||||
upper 8 bits, and the blue channel will contain the lower 4 plus 3 carry
|
||||
spots. The upper bit should not be used for reasons which are discussed
|
||||
later. So the actual value encoded is Red*16+Blue. Now, the alpha blender
|
||||
will add multiple values in this format correctly up to 8 times before
|
||||
there is any possibility of a carry bit not propagating. This limits the
|
||||
fog hulls to ones which do not have concavity where looking on any
|
||||
direction a ray might pass in and out of the volume more than 8 times.
|
||||
Encoding the bits in which will be added cannot be done with a pixel
|
||||
shader. There are two primary limitations. First, the color interpolators
|
||||
are 8 bit as well. Since the depth is computed on a per vertex level, this
|
||||
won<6F>t let higher bit values into the independent color channels. Even if
|
||||
the color channel had a higher precision, the pixel shader has no
|
||||
instruction to capture the lower bits of a higher bit value.
|
||||
The alternative is to use a texture to hold the encoded depths. The
|
||||
advantage of this is twofold. First, texture interpolaters have much
|
||||
higher precision than color interpolaters, and second, no pixel shader is
|
||||
needed for initial step of summing the font and back sides of the fog
|
||||
volume. It should be possible, on parts with at least 12 bits precision in
|
||||
the pixel shader, to emded the precision in a texture registers instead.
|
||||
Unfortunately, most hardware limits the dimensions of textures. 4096 is a
|
||||
typical limitation. This amounts to 12 bits of precision to be encoded in
|
||||
the texture. 12 bits, however, is vastly superior to 8 bits and can make
|
||||
all the difference to making fog volumes practical. More precision could
|
||||
be obtained by making the texture a sliding window, and breaking the
|
||||
object into sizable chunks which would index into that depth, but this
|
||||
sample does not do this.
|
||||
|
||||
Setting it all Up
|
||||
Three important details remain: The actual summing of the fog sides,
|
||||
compensating for objects inside the fog, and the final subtraction.
|
||||
The summing is done in three steps.
|
||||
|
||||
First, the scene needs to be rendered
|
||||
to set a Z buffer. This will prevent fog pixels from being drawn which are
|
||||
behind some totally occluding objects. In a real application, this z could
|
||||
be shared from the pass which draws the geometry. The Z is then write
|
||||
disabled so that fog writes will not update the z buffer.
|
||||
|
||||
After this, the summing is exactly as expected. The app simply draws all
|
||||
the forward facing polygons in one buffer, adding up their results, and
|
||||
then draws all the backward facing polygons in another buffer. There is
|
||||
one potential problem, however. In order to sum the depths of the fog
|
||||
volume, the alpha blend constants need to be set to one for the
|
||||
destination and one for the source, thereby adding the incoming pixel with
|
||||
the one already in the buffer.
|
||||
Unfortunately, this does not take into account objects inside the fog that
|
||||
are acting as a surrogate fog cover. In this case, the scene itself must
|
||||
be added to scene since the far end of the fog would have been rejected by
|
||||
the Z test.
|
||||
|
||||
At first, this looks like an easy solution. In the previous article, the
|
||||
buffers were set up so that they were initialized to the scene<6E>s depth
|
||||
value. This way, fog depth values would replace any depth value in the
|
||||
scene if they were in front of it (i.e. the Z test succeeds) -- but if no
|
||||
fog was present the scene would act as the fog cover.
|
||||
|
||||
This cannot be done for general concavity, however. While technically
|
||||
correct in the convex case, in the concave case there may be pixels at
|
||||
which the fog volumes are rendered multiple times on the front side and
|
||||
multiple sides on the backside. For these pixels, if the there was part
|
||||
of an object in between fog layers than the front buffer would be the sum
|
||||
of n front sides, and the back side would be sum of n-1 back sides. But
|
||||
since the fog cover was replaced by the fog, there are now more entry
|
||||
points then exit points. The result is painfully obvious: parts of the
|
||||
scene suddenly loose all fog when they should have some.
|
||||
|
||||
The solution requires knowing which scenarios where the scene<6E>s w depth
|
||||
should be added and which scenarios the scene<6E>s w depth should be ignored.
|
||||
Fortunately, this is not difficult to find. The only situation where the
|
||||
scene<6E>s w depth should be added to the total fog depth are those pixels
|
||||
where the object is in between the front side of a fog volume and its
|
||||
corresponding backside.
|
||||
|
||||
The above question can be thought of as asking the question: did the ray ever
|
||||
leave the fog volume? Since the fog hulls are required to be continuous,
|
||||
then if the answer is no then part of the scene must have blocked the ray.
|
||||
This test can be performed by a standard inside outside test.
|
||||
|
||||
To perform an inside/outside test each time a fog pixel is rendered, the
|
||||
alpha value is incremented. If the alpha values of the far fog distances
|
||||
is subtracted to the corresponding point on the near fog distance, then
|
||||
values greater then 1 indicate the ray stopped inside the volume. Values
|
||||
of 0 indicate that the ray left the fog volume.
|
||||
|
||||
To set this test up, the alpha buffer of the near and far w depth buffers
|
||||
must be cleared to 0. Each time a fog pixel is rendered, the alpha will
|
||||
be incremented by the hex value 0x10. This value was used because the
|
||||
pixel shader must perform a 1 or 0 logical operation. A small positive
|
||||
value must be mapped to 1.0 in the pixel shader, a step which requires
|
||||
multiple shifts. Due to instruction count restraints the intial value
|
||||
has to be at least 0x10 for the shifts to saturate a non-zero value to one.
|
||||
The rest is straightforward: all the front sides and all the backsides
|
||||
are summed up in their independent buffers. The scene is also drawn in its
|
||||
own buffer. Then all three buffers are ran through the final pass where
|
||||
the scene<6E>s w depth is added on only if the differences of the alpha
|
||||
values is not 0.
|
||||
|
||||
This requires a lengthy pixel shader. A great deal of care must be taken
|
||||
to avoid potential precision pitfalls. The following pixel shader performs
|
||||
the required math, although it requires every instruction slot of the
|
||||
pixel shader and nearly every register. Unfortunately, with no carry bit,
|
||||
there is no way to achieve a full 8 bit value at the end of the
|
||||
computation, so it must settle for 8.
|
||||
|
||||
ps.1.1
|
||||
def c1, 1.0f,0.0f,0.0f,0.0f
|
||||
def c4, 0.0f,0.0f,1.0f,0.0f
|
||||
|
||||
tex t0 // near buffer B
|
||||
tex t1 // far buffer A
|
||||
tex t2 // scene buffer C
|
||||
|
||||
// input:
|
||||
// b = low bits (a) (4 bits)
|
||||
// r = high bits (b) (8 bits)
|
||||
// intermediate output:
|
||||
// r1.b = (a1 - a2) (can't be greater than 7 bits set )
|
||||
// r1.r = (b1 - b2)
|
||||
|
||||
sub r1.rgb,t1,t0
|
||||
+sub_4x r1.a,t0,t1 //If this value is non zero, then
|
||||
mov_4x r0.a,r1.a //the were not as many backs as
|
||||
mad r1.rgb,r0.a,t2,r1 //front and must add in the scene
|
||||
dp3 t0.rgba,r1,c4 // move red component into alpha
|
||||
|
||||
// Need to shift r1.rgb 6 bits. This could saturate
|
||||
// to 255 if any other bits are set, but that is fine
|
||||
// because in this case, the end result of the subtract
|
||||
// would have to be saturated since we can't be
|
||||
// subtracting more than 127
|
||||
mov_x4 r1.rgb,r1
|
||||
dp3_x4 t1.rgba,r1,c1 // move into the alpha
|
||||
add_x2 r0.a,t0.a,t1.a // the subtract was in 0-127
|
||||
mov_d2 r0.a,r0.a // chop off last bit else banding
|
||||
+mov r0.rgb,c3 // load the fog color
|
||||
|
||||
|
||||
This pixel shader gives an alpha value which represents the density of fog,
|
||||
and loads the fog color constant into the color channels. The Alpha
|
||||
Blending stage can now be used to blend on the fog.
|
||||
|
||||
Finally, there is one situation which can cause serious problems:
|
||||
clipping. If a part of the fog volume is clipped away by the camera
|
||||
because the camera is partially in the fog, then part of the scene might
|
||||
be in the fog. Previously, it was assumed the camera was either entirely
|
||||
all the way in, or all the way out of the fog. This may not always be the
|
||||
case.
|
||||
|
||||
An alternative solution is to not allow polygons to get clipped. The
|
||||
vertex shader can detect vertices which would get clipped away and snap
|
||||
them to the near clip plane. The following vertex shader clips w depths
|
||||
to the near clip plane, and z depths to zero.
|
||||
|
||||
// transform position into projection space
|
||||
m4x4 r0,v0,c8
|
||||
max r0.z,c40.z,r0.z //clamp to 0
|
||||
max r0.w,c12.x,r0.w //clamp to near clip plane
|
||||
mov oPos,r0
|
||||
|
||||
// Subtract the Near clipping plane
|
||||
add r0.w,r0.w,-c12.x
|
||||
|
||||
// Scale to give us the far clipping plane
|
||||
mul r0.w,r0.w,c12.y
|
||||
|
||||
// load depth into texture, don<6F>t care about y
|
||||
mov oT0.xy,r0.w
|
||||
|
||||
|
||||
|
||||
This sample makes use of common DirectX code (consisting of helper functions,
|
||||
etc.) that is shared with other samples on the DirectX SDK. All common
|
||||
headers and source code can be found in the following directory:
|
||||
DXSDK\Samples\Multimedia\Common
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by winmain.rc
|
||||
//
|
||||
#define IDI_MAIN_ICON 101
|
||||
#define IDR_MAIN_ACCEL 113
|
||||
#define IDR_MENU 141
|
||||
#define IDR_POPUP 142
|
||||
#define IDD_SELECTDEVICE 144
|
||||
#define IDC_DEVICE_COMBO 1000
|
||||
#define IDC_MODE_COMBO 1001
|
||||
#define IDC_ADAPTER_COMBO 1002
|
||||
#define IDC_FULLSCREENMODES_COMBO 1003
|
||||
#define IDC_MULTISAMPLE_COMBO 1005
|
||||
#define IDC_WINDOWED_CHECKBOX 1012
|
||||
#define IDC_FULLSCREEN_TEXT 1014
|
||||
#define IDC_WINDOW 1016
|
||||
#define IDC_FULLSCREEN 1018
|
||||
#define IDM_TOGGLEHELP 40001
|
||||
#define IDM_CHANGEDEVICE 40002
|
||||
#define IDM_TOGGLEFULLSCREEN 40003
|
||||
#define IDM_TOGGLESTART 40004
|
||||
#define IDM_SINGLESTEP 40005
|
||||
#define IDM_EXIT 40006
|
||||
#define IDM_ADDDROP 40012
|
||||
#define IDM_NEXT_TECHNIQUE 40013
|
||||
#define IDM_NEXT_TECHNIQUE_NOVALIDATE 40014
|
||||
#define IDM_PREV_TECHNIQUE 40015
|
||||
#define IDM_PREV_TECHNIQUE_NOVALIDATE 40016
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 146
|
||||
#define _APS_NEXT_COMMAND_VALUE 40017
|
||||
#define _APS_NEXT_CONTROL_VALUE 1027
|
||||
#define _APS_NEXT_SYMED_VALUE 102
|
||||
#endif
|
||||
#endif
|
||||
159
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/volumefog.dsp
Normal file
159
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/volumefog.dsp
Normal file
@@ -0,0 +1,159 @@
|
||||
# Microsoft Developer Studio Project File - Name="VolumeFog" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=VolumeFog - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "VolumeFog.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "VolumeFog.mak" CFG="VolumeFog - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "VolumeFog - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "VolumeFog - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "VolumeFog - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\common\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 d3dx8.lib d3d8.lib d3dxof.lib winmm.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /machine:I386 /stack:0x200000,0x200000
|
||||
|
||||
!ELSEIF "$(CFG)" == "VolumeFog - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\common\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 d3dx8dt.lib d3d8.lib d3dxof.lib winmm.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /stack:0x200000,0x200000
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "VolumeFog - Win32 Release"
|
||||
# Name "VolumeFog - Win32 Debug"
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\directx.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WinMain.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\d3dapp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\d3dapp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\d3dfile.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\d3dfile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\d3dfont.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\d3dfont.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\d3dutil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\d3dutil.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\dxutil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\dxutil.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\main.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "VolumeFog"=.\VolumeFog.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
220
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/volumefog.mak
Normal file
220
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/volumefog.mak
Normal file
@@ -0,0 +1,220 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on volumefog.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=volumefog - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to volumefog - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "volumefog - Win32 Release" && "$(CFG)" != "volumefog - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "volumefog.mak" CFG="volumefog - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "volumefog - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "volumefog - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "volumefog - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\volumefog.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\d3dapp.obj"
|
||||
-@erase "$(INTDIR)\d3dfont.obj"
|
||||
-@erase "$(INTDIR)\d3dutil.obj"
|
||||
-@erase "$(INTDIR)\dxutil.obj"
|
||||
-@erase "$(INTDIR)\main.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\volumefog.res"
|
||||
-@erase "$(OUTDIR)\volumefog.exe"
|
||||
-@erase "$(OUTDIR)\volumefog.map"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\volumefog.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\volumefog.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\volumefog.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib d3dx8.lib d3dxof.lib d3d8.lib winmm.lib dxguid.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\volumefog.pdb" /map:"$(INTDIR)\volumefog.map" /machine:I386 /out:"$(OUTDIR)\volumefog.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\d3dapp.obj" \
|
||||
"$(INTDIR)\d3dfont.obj" \
|
||||
"$(INTDIR)\d3dutil.obj" \
|
||||
"$(INTDIR)\dxutil.obj" \
|
||||
"$(INTDIR)\main.obj" \
|
||||
"$(INTDIR)\volumefog.res"
|
||||
|
||||
"$(OUTDIR)\volumefog.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "volumefog - Win32 Debug"
|
||||
|
||||
OUTDIR=.\volumefog___Win32_Debug
|
||||
INTDIR=.\volumefog___Win32_Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\volumefog___Win32_Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\volumefog.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\d3dapp.obj"
|
||||
-@erase "$(INTDIR)\d3dfont.obj"
|
||||
-@erase "$(INTDIR)\d3dutil.obj"
|
||||
-@erase "$(INTDIR)\dxutil.obj"
|
||||
-@erase "$(INTDIR)\main.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\volumefog.exe"
|
||||
-@erase "$(OUTDIR)\volumefog.ilk"
|
||||
-@erase "$(OUTDIR)\volumefog.pdb"
|
||||
-@erase ".\Debug\VolumeFog.res"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\volumefog.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC_PROJ=/l 0x409 /fo"Debug/VolumeFog.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\volumefog.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib d3dx8dt.lib d3dxof.lib d3d8.lib winmm.lib dxguid.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\volumefog.pdb" /debug /machine:I386 /out:"$(OUTDIR)\volumefog.exe" /pdbtype:sept
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\d3dapp.obj" \
|
||||
"$(INTDIR)\d3dfont.obj" \
|
||||
"$(INTDIR)\d3dutil.obj" \
|
||||
"$(INTDIR)\dxutil.obj" \
|
||||
"$(INTDIR)\main.obj" \
|
||||
".\Debug\VolumeFog.res"
|
||||
|
||||
"$(OUTDIR)\volumefog.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("volumefog.dep")
|
||||
!INCLUDE "volumefog.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "volumefog.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "volumefog - Win32 Release" || "$(CFG)" == "volumefog - Win32 Debug"
|
||||
SOURCE=.\winmain.rc
|
||||
|
||||
!IF "$(CFG)" == "volumefog - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\volumefog.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "volumefog - Win32 Debug"
|
||||
|
||||
|
||||
".\Debug\VolumeFog.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\..\common\src\d3dapp.cpp
|
||||
|
||||
"$(INTDIR)\d3dapp.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\..\common\src\d3dfont.cpp
|
||||
|
||||
"$(INTDIR)\d3dfont.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\..\common\src\d3dutil.cpp
|
||||
|
||||
"$(INTDIR)\d3dutil.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\..\common\src\dxutil.cpp
|
||||
|
||||
"$(INTDIR)\dxutil.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\main.cpp
|
||||
|
||||
"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
180
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/winmain.rc
Normal file
180
Library/dxx8/samples/Multimedia/Direct3D/VolumeFog/winmain.rc
Normal file
@@ -0,0 +1,180 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define IDC_STATIC -1
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_MAIN_ICON ICON DISCARDABLE "DirectX.ico"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define IDC_STATIC -1\r\n"
|
||||
"#include <windows.h>\r\n"
|
||||
"\r\n"
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accelerator
|
||||
//
|
||||
|
||||
IDR_MAIN_ACCEL ACCELERATORS DISCARDABLE
|
||||
BEGIN
|
||||
"D", IDM_ADDDROP, VIRTKEY, NOINVERT
|
||||
VK_ESCAPE, IDM_EXIT, VIRTKEY, NOINVERT
|
||||
VK_F1, IDM_TOGGLEHELP, VIRTKEY, NOINVERT
|
||||
VK_F2, IDM_CHANGEDEVICE, VIRTKEY, NOINVERT
|
||||
VK_RETURN, IDM_TOGGLESTART, VIRTKEY, NOINVERT
|
||||
VK_RETURN, IDM_TOGGLEFULLSCREEN, VIRTKEY, ALT, NOINVERT
|
||||
VK_SPACE, IDM_SINGLESTEP, VIRTKEY, NOINVERT
|
||||
"X", IDM_EXIT, VIRTKEY, ALT, NOINVERT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_SELECTDEVICE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 259
|
||||
TOPMARGIN, 7
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_SELECTDEVICE DIALOG DISCARDABLE 0, 0, 267, 138
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Select Device"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
GROUPBOX "Rendering device",IDC_STATIC,5,5,200,45
|
||||
LTEXT "&Adapter:",IDC_STATIC,22,17,65,10,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_ADAPTER_COMBO,90,15,105,100,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Device:",IDC_STATIC,22,32,65,10,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_DEVICE_COMBO,90,30,105,100,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Rendering mode",IDC_STATIC,5,52,200,45
|
||||
CONTROL "Use desktop &window",IDC_WINDOW,"Button",
|
||||
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,10,62,85,15
|
||||
CONTROL "&Fullscreen mode:",IDC_FULLSCREEN,"Button",
|
||||
BS_AUTORADIOBUTTON,10,77,75,15
|
||||
COMBOBOX IDC_FULLSCREENMODES_COMBO,90,77,105,204,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_GROUP | WS_TABSTOP
|
||||
GROUPBOX "Multisample",IDC_STATIC,5,101,200,28
|
||||
LTEXT "&Multisample Type:",IDC_STATIC,22,113,62,10,
|
||||
SS_CENTERIMAGE
|
||||
COMBOBOX IDC_MULTISAMPLE_COMBO,90,111,105,100,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,210,10,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,210,30,50,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
BEGIN
|
||||
MENUITEM "&Go/stop\tEnter", IDM_TOGGLESTART
|
||||
MENUITEM "&Single step\tSpace", IDM_SINGLESTEP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Change device...\tF2", IDM_CHANGEDEVICE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&xit\tESC", IDM_EXIT
|
||||
END
|
||||
END
|
||||
|
||||
IDR_POPUP MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Popup"
|
||||
BEGIN
|
||||
MENUITEM "&Go/stop", IDM_TOGGLESTART
|
||||
MENUITEM "&Single step", IDM_SINGLESTEP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Change device...", IDM_CHANGEDEVICE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&xit", IDM_EXIT
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
Reference in New Issue
Block a user