Merged from trunk, revisions 3300-3365. Another large bugfix merge.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@3369 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
7bae34bc61
commit
ab5739f571
165
changes.txt
165
changes.txt
|
@ -1,3 +1,153 @@
|
||||||
|
Changes in 1.8 (??.0?.2010)
|
||||||
|
|
||||||
|
- Add IGUIElement::bringToBack (patch written by DtD, although I'm to blame for the function-name)
|
||||||
|
|
||||||
|
- BurningVideo
|
||||||
|
- add Normalmap Rendering (one light only), pushed Burningvideo to 0.46
|
||||||
|
- add Stencil Shadow Rendering (one color only and 32 bit only),
|
||||||
|
pushed Burningvideo to 0.47
|
||||||
|
- internal vertexformat changed
|
||||||
|
- changed fixpoint from 9 to 10 bit fract resolution
|
||||||
|
- renamed createBurningVideoDriver to createBurningVideoDriver and uses SIrrlichtCreationParameters like opengl
|
||||||
|
- internal interfaces for the trianglerenders unified.
|
||||||
|
|
||||||
|
- Example 11, changed the light billboards to use the light color.
|
||||||
|
allow to disable the bump/parallax on the earth like in the room ( with transparency )
|
||||||
|
|
||||||
|
- added DDS Image files, DXT2, DXT3, DXT4, DXT5, based on code from nvidia and Randy Reddig
|
||||||
|
|
||||||
|
- added Halflife 1 Model Loader (based on code by Fabio Concas)
|
||||||
|
Halflife 1.1.0.8, Counter-Strike 1.6 working
|
||||||
|
-> Load all Textures ( can even optimize it to texture atlas ), all bone animation, all submodels.
|
||||||
|
-> But to make use of the values (named animation, mouth animation)
|
||||||
|
the Interface for IAnimatedMeshSceneNode has to be redone.
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
->can handle float frames numbers, the interface for getMesh should be reworked
|
||||||
|
This is my idea of a new getMesh interface for IAnimatedMesh
|
||||||
|
|
||||||
|
//! Returns the IMesh interface for a frame.
|
||||||
|
/** \param frameA: Frame number as zero based index.
|
||||||
|
The Blend Factor is in the fractional part of frameA
|
||||||
|
The Mesh will be calculated as
|
||||||
|
frame = integer(frameA) * (1-fractional(frameA )) + frameB * fractional(frameA)
|
||||||
|
FrameNr KeyFrameA KeyFrameB
|
||||||
|
40.0 1 0
|
||||||
|
40.1 0.9 0.1
|
||||||
|
40.5 0.5 0.5
|
||||||
|
40.9 0.1 0.9
|
||||||
|
41.0 0 1
|
||||||
|
\param frameB: Frame number as zero based index. The other KeyFrame which is blended with FrameA.
|
||||||
|
\param userParam: for Example Level of detail, or something else
|
||||||
|
*/
|
||||||
|
virtual IMesh* getMesh(f32 frameA, s32 frameB = 0,s32 param = 0) = 0;
|
||||||
|
|
||||||
|
For now i used the (unused, always 255) detail level parameter and set a blend percentage as
|
||||||
|
s32 frameNr = (s32) getFrameNr();
|
||||||
|
s32 frameBlend = (s32) (core::fract ( getFrameNr() ) * 1000.f);
|
||||||
|
return Mesh->getMesh(frameNr, frameBlend, StartFrame, EndFrame);
|
||||||
|
|
||||||
|
So no interface is affected.
|
||||||
|
|
||||||
|
-> TODO: Quaternion Rotation is done private hand made and should be done with irrlicht quaternions
|
||||||
|
|
||||||
|
- Included 357kb Yodan.mdl mesh and copyright info file from Doug Hillyer
|
||||||
|
to the media directory, used in example 7. collision as 4th model.
|
||||||
|
|
||||||
|
- added Halflife 1 Texture Loader
|
||||||
|
Valve uses WAL archive types like quake2. textures are inside model files
|
||||||
|
I reworked the existing ImageloaderWAL and added named Halflife textures to wal2 ( they have no extension )
|
||||||
|
and an LMP (palette/texture) loader into the same file (all using 32bit now)
|
||||||
|
|
||||||
|
- added WAD Archive Loader (Quake2 (WAL2) and Halflife (WAL3) are supported)
|
||||||
|
|
||||||
|
- CFileList
|
||||||
|
added Offset Parameter to SFileListEntry and removed the private array from the archive loaders.
|
||||||
|
CFileList::addItem now uses automatic incremental id if id = 0
|
||||||
|
|
||||||
|
- added void splitFilename, splits a path into components
|
||||||
|
|
||||||
|
- added parameter make_lower to substring ( copy just lower case )
|
||||||
|
string<T> subString(u32 begin, s32 length, bool make_lower = false ) const
|
||||||
|
|
||||||
|
- ColorConverter added
|
||||||
|
//! converts a 8 bit palettized or non palettized image (A8) into R8G8B8
|
||||||
|
static void convert8BitTo24Bit(const u8* in, s16* out, s32 width, s32 height, const s32* palette, s32 linepad = 0, bool flip=false);
|
||||||
|
//! converts a 8 bit palettized or non palettized image (A8) into A8R8G8B8
|
||||||
|
static void convert8BitTo32Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad = 0, bool flip=false);
|
||||||
|
|
||||||
|
- In IGUITreeView "clearChilds" and "hasChilds" deprecated for "clearChildren" and "hasChildren" (thx @Greenya for noticing)
|
||||||
|
|
||||||
|
- add dimension2d::operator-
|
||||||
|
|
||||||
|
- add CGUIEditBox::getOverrideColor and CGUIEditBox::isOverrideColorEnabled
|
||||||
|
|
||||||
|
- Add logging level ELL_DEBUG
|
||||||
|
|
||||||
|
- Add parameter DisplayAdapter to creation params to allow selecting the card when more than one card is in the system.
|
||||||
|
|
||||||
|
- Add parameter to line2d::intersectWith to allow getting intersections outside the segments (thx Yoran).
|
||||||
|
|
||||||
|
- Added support for custom cursors
|
||||||
|
|
||||||
|
- Avoid argument lookup ambiguity in swap when used in combination with stl. Using same trick as boost now and use 2 different template parameters in it.
|
||||||
|
|
||||||
|
- Fixed bug causing memory access violation in string::replace found and patched by Nalin.
|
||||||
|
|
||||||
|
- WM_SYSCOMMAND - SC_KEYMENU message is now ignored (F10 and ALT in Win32 windowed mode)
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
Changes in 1.7.2 (??.??.2010)
|
||||||
|
|
||||||
|
- Fix crashes when taking Screenhots for DirectX in Windowed mode (thx to agamemnus for reporting)
|
||||||
|
|
||||||
|
- StaticText does now serialize the background color
|
||||||
|
|
||||||
|
- Fix gui-elements which didn't care when skin-colors changed. That made it impossible to make the gui slowly transparent (thx to PI for reporting).
|
||||||
|
Note that it couldn't be completely fixed for the SpinBox without breaking the interface, so for that element you have to enforce this by calling for example element->setValue(element->getValue()) once.
|
||||||
|
|
||||||
|
- Fix CXMLReaderImpl::getAttributeValueAsInt which returned wrong values with large integers (thx to squisher for finding)
|
||||||
|
|
||||||
|
- Add EGET_TREEVIEW_NODE_COLLAPSE and deprecate EGET_TREEVIEW_NODE_COLLAPS (found by greenya)
|
||||||
|
|
||||||
|
- Fix compile problem in swap when using irrlicht in combination with stl (backport from trunk r3281)
|
||||||
|
|
||||||
|
- Fix serialization in CParticleSystemSceneNode (found by B@z)
|
||||||
|
|
||||||
|
- Prevent crash in BillboardTextSceneNode when a custom font is used. Found and fixed by Nalin (bugtracker id: 3020487)
|
||||||
|
|
||||||
|
- Fix problem in animation system that currentFrame got messed up after long pauses (especially when not starting at frame 0).
|
||||||
|
See forum thread (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?p=210537#210537) and bug id 2898876.
|
||||||
|
Also remove BeginFrameTime in CAnimatedMeshSceneNode as it hasn't been used anymore since some time.
|
||||||
|
|
||||||
|
- Add framerate and current frame information for animations in example 09 and do some minor cleanup.
|
||||||
|
|
||||||
|
- Added another test for xml-reader.
|
||||||
|
|
||||||
|
- Fix serialization in several particle emitters and affectors (thx to Ion Dune for reporting).
|
||||||
|
|
||||||
|
- Fix compile-error on VS for vector2d::getAngleTrig when used with integers. (thx to greenya for reporting)
|
||||||
|
|
||||||
|
- Fix bug in dimension2d::getInterpolated that caused wrong results when used with integers as template parameter. (thx to Greenya for noticing a warning which made me look over this code).
|
||||||
|
|
||||||
|
- Remove 2 minor memory leaks in meshloaders (found by tool cppcheck-1.43)
|
||||||
|
|
||||||
|
- reduce file dependencies for IGUIEventReceiver.h (thx ngc92)
|
||||||
|
|
||||||
|
- Initialize GUIEvent.Element in several places (found by greenya)
|
||||||
|
|
||||||
|
- Add EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH and deprecated EGDS_MESSAGE_BOX_MAX_TEST_WIDTH (thx to greenya for reporting).
|
||||||
|
|
||||||
|
- Fix several places where "used" in core::string was used wrongly preventing some memory corruption
|
||||||
|
|
||||||
|
- Remove additional slash in pathnames in X-Loader
|
||||||
|
|
||||||
|
- Fix crash in CGUIListBox when environment was cleared on events
|
||||||
|
|
||||||
|
- Bugfix: Clear up depth-textures which could not be attached in OpenGL to prevent crashes.
|
||||||
|
|
||||||
|
- Fix arrowMesh boundingbox.
|
||||||
|
|
||||||
-----------------------------
|
-----------------------------
|
||||||
Changes in 1.7.1 (17.02.2010)
|
Changes in 1.7.1 (17.02.2010)
|
||||||
|
|
||||||
|
@ -46,6 +196,7 @@ Changes in 1.7.1 (17.02.2010)
|
||||||
- mem leak in OBJ loader fixed
|
- mem leak in OBJ loader fixed
|
||||||
|
|
||||||
- Removed some default parameters to reduce ambigious situations
|
- Removed some default parameters to reduce ambigious situations
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
Changes in 1.7 (03.02.2010)
|
Changes in 1.7 (03.02.2010)
|
||||||
|
|
||||||
|
@ -166,12 +317,12 @@ Changes in 1.7 (03.02.2010)
|
||||||
- Let maya-cam animator react on a setTarget call to the camera which happened outside it's own control
|
- Let maya-cam animator react on a setTarget call to the camera which happened outside it's own control
|
||||||
|
|
||||||
- New contextmenue features:
|
- New contextmenue features:
|
||||||
automatic checking for checked flag.
|
automatic checking for checked flag.
|
||||||
close handling now customizable
|
close handling now customizable
|
||||||
serialization can handle incomplete xml's
|
serialization can handle incomplete xml's
|
||||||
setEventParent now in public interface
|
setEventParent now in public interface
|
||||||
New function findItemWithCommandId
|
New function findItemWithCommandId
|
||||||
New function insertItem
|
New function insertItem
|
||||||
|
|
||||||
- new vector3d::getSphericalCoordinateAngles method.
|
- new vector3d::getSphericalCoordinateAngles method.
|
||||||
|
|
||||||
|
@ -537,7 +688,7 @@ Changes in 1.6 (23.09.2009)
|
||||||
There exists a known list of ArchiveLoaders, which know how to produce a Archive.
|
There exists a known list of ArchiveLoaders, which know how to produce a Archive.
|
||||||
The Loaders and the Archives can be attached/detached on runtime.
|
The Loaders and the Archives can be attached/detached on runtime.
|
||||||
|
|
||||||
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
|
The FileNames are now stored as io::path. where c16 is toggled between char/wchar
|
||||||
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
|
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
|
||||||
Replaced most (const c8* filename) to string references.
|
Replaced most (const c8* filename) to string references.
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -33,7 +33,8 @@ all: all_linux
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
|
||||||
|
all_linux: LDFLAGS += $(OGLESLIBS) -L/usr/X11R6/lib$(LIBSELECT) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
|
||||||
all_win32 clean_win32 static_win32: SUF=.exe
|
all_win32 clean_win32 static_win32: SUF=.exe
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht
|
||||||
static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm
|
static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux/" />
|
<Add directory="../../lib/Linux/" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
|
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="..\..\lib\Linux" />
|
<Add directory="..\..\lib\Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -16,10 +16,10 @@ ifeq ($(HOSTTYPE), x86_64)
|
||||||
LIBSELECT=64
|
LIBSELECT=64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# target specific settings
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
|
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -164,14 +164,15 @@ int main()
|
||||||
selection is being performed. */
|
selection is being performed. */
|
||||||
scene::IAnimatedMeshSceneNode* node = 0;
|
scene::IAnimatedMeshSceneNode* node = 0;
|
||||||
|
|
||||||
|
video::SMaterial material;
|
||||||
|
|
||||||
// Add an MD2 node, which uses vertex-based animation.
|
// Add an MD2 node, which uses vertex-based animation.
|
||||||
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/faerie.md2"),
|
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/faerie.md2"),
|
||||||
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
|
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
|
||||||
node->setPosition(core::vector3df(-70,-15,-120)); // Put its feet on the floor.
|
node->setPosition(core::vector3df(-90,-15,-140)); // Put its feet on the floor.
|
||||||
node->setScale(core::vector3df(2, 2, 2)); // Make it appear realistically scaled
|
node->setScale(core::vector3df(1.6f)); // Make it appear realistically scaled
|
||||||
node->setMD2Animation(scene::EMAT_POINT);
|
node->setMD2Animation(scene::EMAT_POINT);
|
||||||
node->setAnimationSpeed(20.f);
|
node->setAnimationSpeed(20.f);
|
||||||
video::SMaterial material;
|
|
||||||
material.setTexture(0, driver->getTexture("../../media/faerie2.bmp"));
|
material.setTexture(0, driver->getTexture("../../media/faerie2.bmp"));
|
||||||
material.Lighting = true;
|
material.Lighting = true;
|
||||||
material.NormalizeNormals = true;
|
material.NormalizeNormals = true;
|
||||||
|
@ -183,24 +184,40 @@ int main()
|
||||||
node->setTriangleSelector(selector);
|
node->setTriangleSelector(selector);
|
||||||
selector->drop(); // We're done with this selector, so drop it now.
|
selector->drop(); // We're done with this selector, so drop it now.
|
||||||
|
|
||||||
// This X files uses skeletal animation, but without skinning.
|
// And this B3D file uses skinned skeletal animation.
|
||||||
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/dwarf.x"),
|
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"),
|
||||||
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
|
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
|
||||||
node->setPosition(core::vector3df(-70,-66,0)); // Put its feet on the floor.
|
node->setScale(core::vector3df(10));
|
||||||
node->setRotation(core::vector3df(0,-90,0)); // And turn it towards the camera.
|
node->setPosition(core::vector3df(-75,-66,-80));
|
||||||
node->setAnimationSpeed(20.f);
|
node->setRotation(core::vector3df(0,90,0));
|
||||||
|
node->setAnimationSpeed(8.f);
|
||||||
|
node->getMaterial(0).NormalizeNormals = true;
|
||||||
|
node->getMaterial(0).Lighting = true;
|
||||||
|
// Just do the same as we did above.
|
||||||
selector = smgr->createTriangleSelector(node);
|
selector = smgr->createTriangleSelector(node);
|
||||||
node->setTriangleSelector(selector);
|
node->setTriangleSelector(selector);
|
||||||
selector->drop();
|
selector->drop();
|
||||||
|
|
||||||
// And this B3D file uses skinned skeletal animation.
|
// This X files uses skeletal animation, but without skinning.
|
||||||
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"),
|
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/dwarf.x"),
|
||||||
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
|
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
|
||||||
node->setScale(core::vector3df(10, 10, 10));
|
node->setPosition(core::vector3df(-70,-66,-30)); // Put its feet on the floor.
|
||||||
node->setPosition(core::vector3df(-70,-66,-60));
|
node->setRotation(core::vector3df(0,-90,0)); // And turn it towards the camera.
|
||||||
node->setRotation(core::vector3df(0,90,0));
|
node->setAnimationSpeed(20.f);
|
||||||
node->setAnimationSpeed(10.f);
|
node->getMaterial(0).Lighting = true;
|
||||||
node->getMaterial(0).NormalizeNormals = true;
|
selector = smgr->createTriangleSelector(node);
|
||||||
|
node->setTriangleSelector(selector);
|
||||||
|
selector->drop();
|
||||||
|
|
||||||
|
|
||||||
|
// And this mdl file uses skinned skeletal animation.
|
||||||
|
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/yodan.mdl"),
|
||||||
|
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
|
||||||
|
node->setPosition(core::vector3df(-90,-25,20));
|
||||||
|
node->setScale(core::vector3df(0.8f));
|
||||||
|
node->getMaterial(0).Lighting = true;
|
||||||
|
node->setAnimationSpeed(20.f);
|
||||||
|
|
||||||
// Just do the same as we did above.
|
// Just do the same as we did above.
|
||||||
selector = smgr->createTriangleSelector(node);
|
selector = smgr->createTriangleSelector(node);
|
||||||
node->setTriangleSelector(selector);
|
node->setTriangleSelector(selector);
|
||||||
|
@ -310,3 +327,4 @@ int main()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -25,7 +25,6 @@ using namespace irr;
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// ask if user would like shadows
|
// ask if user would like shadows
|
||||||
|
|
||||||
char i;
|
char i;
|
||||||
printf("Please press 'y' if you want to use realtime shadows.\n");
|
printf("Please press 'y' if you want to use realtime shadows.\n");
|
||||||
|
|
||||||
|
@ -38,6 +37,7 @@ int main()
|
||||||
if (driverType==video::EDT_COUNT)
|
if (driverType==video::EDT_COUNT)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Create device and exit if creation failed. We make the stencil flag
|
Create device and exit if creation failed. We make the stencil flag
|
||||||
optional to avoid slow screen modes for runs without shadows.
|
optional to avoid slow screen modes for runs without shadows.
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9,00"
|
||||||
Name="09.Meshviewer_vc9"
|
Name="09.Meshviewer_vc9"
|
||||||
ProjectGUID="{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
|
ProjectGUID="{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}"
|
||||||
RootNamespace="Meshviewer_vc9"
|
RootNamespace="Meshviewer_vc9"
|
||||||
|
|
|
@ -87,8 +87,10 @@ enum
|
||||||
GUI_ID_BUTTON_SHOW_TOOLBOX,
|
GUI_ID_BUTTON_SHOW_TOOLBOX,
|
||||||
GUI_ID_BUTTON_SELECT_ARCHIVE,
|
GUI_ID_BUTTON_SELECT_ARCHIVE,
|
||||||
|
|
||||||
|
GUI_ID_ANIMATION_INFO,
|
||||||
|
|
||||||
// And some magic numbers
|
// And some magic numbers
|
||||||
MAX_FRAMERATE = 1000,
|
MAX_FRAMERATE = 80,
|
||||||
DEFAULT_FRAMERATE = 30
|
DEFAULT_FRAMERATE = 30
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -111,7 +113,7 @@ void setActiveCamera(scene::ICameraSceneNode* newActive)
|
||||||
/*
|
/*
|
||||||
Set the skin transparency by changing the alpha values of all skin-colors
|
Set the skin transparency by changing the alpha values of all skin-colors
|
||||||
*/
|
*/
|
||||||
void SetSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
|
void setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
|
||||||
{
|
{
|
||||||
for (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
|
for (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
|
||||||
{
|
{
|
||||||
|
@ -124,7 +126,7 @@ void SetSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
|
||||||
/*
|
/*
|
||||||
Update the display of the model scaling
|
Update the display of the model scaling
|
||||||
*/
|
*/
|
||||||
void UpdateScaleInfo(scene::ISceneNode* model)
|
void updateScaleInfo(scene::ISceneNode* model)
|
||||||
{
|
{
|
||||||
IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
|
IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
|
||||||
if (!toolboxWnd)
|
if (!toolboxWnd)
|
||||||
|
@ -252,7 +254,7 @@ void loadModel(const c8* fn)
|
||||||
if (menu)
|
if (menu)
|
||||||
for(int item = 1; item < 6; ++item)
|
for(int item = 1; item < 6; ++item)
|
||||||
menu->setItemChecked(item, false);
|
menu->setItemChecked(item, false);
|
||||||
UpdateScaleInfo(Model);
|
updateScaleInfo(Model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -285,7 +287,7 @@ void createToolBox()
|
||||||
core::rect<s32>(10,20,60,45), false, false, t1);
|
core::rect<s32>(10,20,60,45), false, false, t1);
|
||||||
env->addStaticText(L"X:", core::rect<s32>(22,48,40,66), false, false, t1);
|
env->addStaticText(L"X:", core::rect<s32>(22,48,40,66), false, false, t1);
|
||||||
env->addEditBox(L"1.0", core::rect<s32>(40,46,130,66), true, t1, GUI_ID_X_SCALE);
|
env->addEditBox(L"1.0", core::rect<s32>(40,46,130,66), true, t1, GUI_ID_X_SCALE);
|
||||||
env->addStaticText(L"Y:", core::rect<s32>(22,82,40,GUI_ID_OPEN_MODEL), false, false, t1);
|
env->addStaticText(L"Y:", core::rect<s32>(22,82,40,96), false, false, t1);
|
||||||
env->addEditBox(L"1.0", core::rect<s32>(40,76,130,96), true, t1, GUI_ID_Y_SCALE);
|
env->addEditBox(L"1.0", core::rect<s32>(40,76,130,96), true, t1, GUI_ID_Y_SCALE);
|
||||||
env->addStaticText(L"Z:", core::rect<s32>(22,108,40,126), false, false, t1);
|
env->addStaticText(L"Z:", core::rect<s32>(22,108,40,126), false, false, t1);
|
||||||
env->addEditBox(L"1.0", core::rect<s32>(40,106,130,126), true, t1, GUI_ID_Z_SCALE);
|
env->addEditBox(L"1.0", core::rect<s32>(40,106,130,126), true, t1, GUI_ID_Z_SCALE);
|
||||||
|
@ -296,7 +298,7 @@ void createToolBox()
|
||||||
env->addButton(core::rect<s32>(65,20,95,40), t1, GUI_ID_BUTTON_SCALE_MUL10, L"* 10");
|
env->addButton(core::rect<s32>(65,20,95,40), t1, GUI_ID_BUTTON_SCALE_MUL10, L"* 10");
|
||||||
env->addButton(core::rect<s32>(100,20,130,40), t1, GUI_ID_BUTTON_SCALE_DIV10, L"* 0.1");
|
env->addButton(core::rect<s32>(100,20,130,40), t1, GUI_ID_BUTTON_SCALE_DIV10, L"* 0.1");
|
||||||
|
|
||||||
UpdateScaleInfo(Model);
|
updateScaleInfo(Model);
|
||||||
|
|
||||||
// add transparency control
|
// add transparency control
|
||||||
env->addStaticText(L"GUI Transparency Control:",
|
env->addStaticText(L"GUI Transparency Control:",
|
||||||
|
@ -307,17 +309,43 @@ void createToolBox()
|
||||||
scrollbar->setPos(255);
|
scrollbar->setPos(255);
|
||||||
|
|
||||||
// add framerate control
|
// add framerate control
|
||||||
|
env->addStaticText(L":", core::rect<s32>(10,240,150,265), true, false, t1);
|
||||||
env->addStaticText(L"Framerate:",
|
env->addStaticText(L"Framerate:",
|
||||||
core::rect<s32>(10,240,150,265), true, false, t1);
|
core::rect<s32>(12,240,75,265), false, false, t1);
|
||||||
|
env->addStaticText(L"", core::rect<s32>(75,240,200,265), false, false, t1,
|
||||||
|
GUI_ID_ANIMATION_INFO);
|
||||||
scrollbar = env->addScrollBar(true,
|
scrollbar = env->addScrollBar(true,
|
||||||
core::rect<s32>(10,265,150,280), t1, GUI_ID_SKIN_ANIMATION_FPS);
|
core::rect<s32>(10,265,150,280), t1, GUI_ID_SKIN_ANIMATION_FPS);
|
||||||
scrollbar->setMax(MAX_FRAMERATE);
|
scrollbar->setMax(MAX_FRAMERATE);
|
||||||
scrollbar->setMin(-MAX_FRAMERATE);
|
scrollbar->setMin(-MAX_FRAMERATE);
|
||||||
scrollbar->setPos(DEFAULT_FRAMERATE);
|
scrollbar->setPos(DEFAULT_FRAMERATE);
|
||||||
|
scrollbar->setSmallStep(1);
|
||||||
|
}
|
||||||
|
|
||||||
// bring irrlicht engine logo to front, because it
|
void updateToolBox()
|
||||||
// now may be below the newly created toolbox
|
{
|
||||||
root->bringToFront(root->getElementFromId(666, true));
|
IGUIEnvironment* env = Device->getGUIEnvironment();
|
||||||
|
IGUIElement* root = env->getRootGUIElement();
|
||||||
|
IGUIElement* dlg = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
|
||||||
|
if (!dlg )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// update the info we have about the animation of the model
|
||||||
|
IGUIStaticText * aniInfo = (IGUIStaticText *)(dlg->getElementFromId(GUI_ID_ANIMATION_INFO, true));
|
||||||
|
if (aniInfo)
|
||||||
|
{
|
||||||
|
if ( Model && scene::ESNT_ANIMATED_MESH == Model->getType() )
|
||||||
|
{
|
||||||
|
scene::IAnimatedMeshSceneNode* animatedModel = (scene::IAnimatedMeshSceneNode*)Model;
|
||||||
|
|
||||||
|
core::stringw str( (s32)core::round_(animatedModel->getAnimationSpeed()) );
|
||||||
|
str += L" Frame: ";
|
||||||
|
str += core::stringw((s32)animatedModel->getFrameNr());
|
||||||
|
aniInfo->setText(str.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
aniInfo->setText(L"");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -366,7 +394,7 @@ public:
|
||||||
if (id == GUI_ID_SKIN_TRANSPARENCY)
|
if (id == GUI_ID_SKIN_TRANSPARENCY)
|
||||||
{
|
{
|
||||||
const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
|
const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
|
||||||
SetSkinTransparency(pos, env->getSkin());
|
setSkinTransparency(pos, env->getSkin());
|
||||||
}
|
}
|
||||||
// control animation speed
|
// control animation speed
|
||||||
else if (id == GUI_ID_SKIN_ANIMATION_FPS)
|
else if (id == GUI_ID_SKIN_ANIMATION_FPS)
|
||||||
|
@ -406,18 +434,18 @@ public:
|
||||||
|
|
||||||
if (Model)
|
if (Model)
|
||||||
Model->setScale(scale);
|
Model->setScale(scale);
|
||||||
UpdateScaleInfo(Model);
|
updateScaleInfo(Model);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_ID_BUTTON_SCALE_MUL10:
|
case GUI_ID_BUTTON_SCALE_MUL10:
|
||||||
if (Model)
|
if (Model)
|
||||||
Model->setScale(Model->getScale()*10.f);
|
Model->setScale(Model->getScale()*10.f);
|
||||||
UpdateScaleInfo(Model);
|
updateScaleInfo(Model);
|
||||||
break;
|
break;
|
||||||
case GUI_ID_BUTTON_SCALE_DIV10:
|
case GUI_ID_BUTTON_SCALE_DIV10:
|
||||||
if (Model)
|
if (Model)
|
||||||
Model->setScale(Model->getScale()*0.1f);
|
Model->setScale(Model->getScale()*0.1f);
|
||||||
UpdateScaleInfo(Model);
|
updateScaleInfo(Model);
|
||||||
break;
|
break;
|
||||||
case GUI_ID_BUTTON_OPEN_MODEL:
|
case GUI_ID_BUTTON_OPEN_MODEL:
|
||||||
env->addFileOpenDialog(L"Please select a model file to open");
|
env->addFileOpenDialog(L"Please select a model file to open");
|
||||||
|
@ -810,7 +838,7 @@ int main(int argc, char* argv[])
|
||||||
image = driver->getTexture("help.png");
|
image = driver->getTexture("help.png");
|
||||||
bar->addButton(GUI_ID_BUTTON_SHOW_ABOUT, 0, L"Open Help", image, 0, false, true);
|
bar->addButton(GUI_ID_BUTTON_SHOW_ABOUT, 0, L"Open Help", image, 0, false, true);
|
||||||
|
|
||||||
// create a combobox with some senseless texts
|
// create a combobox for texture filters
|
||||||
|
|
||||||
gui::IGUIComboBox* box = env->addComboBox(core::rect<s32>(250,4,350,23), bar, GUI_ID_TEXTUREFILTER);
|
gui::IGUIComboBox* box = env->addComboBox(core::rect<s32>(250,4,350,23), bar, GUI_ID_TEXTUREFILTER);
|
||||||
box->addItem(L"No filtering");
|
box->addItem(L"No filtering");
|
||||||
|
@ -914,12 +942,14 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
driver->endScene();
|
driver->endScene();
|
||||||
|
|
||||||
|
// update information about current frame-rate
|
||||||
core::stringw str(L"FPS: ");
|
core::stringw str(L"FPS: ");
|
||||||
str.append(core::stringw(driver->getFPS()));
|
str.append(core::stringw(driver->getFPS()));
|
||||||
str += L" Tris: ";
|
str += L" Tris: ";
|
||||||
str.append(core::stringw(driver->getPrimitiveCountDrawn()));
|
str.append(core::stringw(driver->getPrimitiveCountDrawn()));
|
||||||
fpstext->setText(str.c_str());
|
fpstext->setText(str.c_str());
|
||||||
|
|
||||||
|
// update information about the active camera
|
||||||
scene::ICameraSceneNode* cam = Device->getSceneManager()->getActiveCamera();
|
scene::ICameraSceneNode* cam = Device->getSceneManager()->getActiveCamera();
|
||||||
str = L"Pos: ";
|
str = L"Pos: ";
|
||||||
str.append(core::stringw(cam->getPosition().X));
|
str.append(core::stringw(cam->getPosition().X));
|
||||||
|
@ -934,6 +964,9 @@ int main(int argc, char* argv[])
|
||||||
str += L" ";
|
str += L" ";
|
||||||
str.append(core::stringw(cam->getTarget().Z));
|
str.append(core::stringw(cam->getTarget().Z));
|
||||||
postext->setText(str.c_str());
|
postext->setText(str.c_str());
|
||||||
|
|
||||||
|
// update the tool dialog
|
||||||
|
updateToolBox();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Device->yield();
|
Device->yield();
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
<Add option="-W" />
|
<Add option="-W" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
|
<Add library="GL" />
|
||||||
<Add directory="..\..\lib\Linux" />
|
<Add directory="..\..\lib\Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -28,11 +28,12 @@ class MyEventReceiver : public IEventReceiver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MyEventReceiver(scene::ISceneNode* room,
|
MyEventReceiver(scene::ISceneNode* room,scene::ISceneNode* earth,
|
||||||
gui::IGUIEnvironment* env, video::IVideoDriver* driver)
|
gui::IGUIEnvironment* env, video::IVideoDriver* driver)
|
||||||
{
|
{
|
||||||
// store pointer to room so we can change its drawing mode
|
// store pointer to room so we can change its drawing mode
|
||||||
Room = room;
|
Room = room;
|
||||||
|
Earth = earth;
|
||||||
Driver = driver;
|
Driver = driver;
|
||||||
|
|
||||||
// set a nicer font
|
// set a nicer font
|
||||||
|
@ -120,6 +121,19 @@ private:
|
||||||
|
|
||||||
Room->setMaterialType(type);
|
Room->setMaterialType(type);
|
||||||
|
|
||||||
|
// change material setting
|
||||||
|
switch(ListBox->getSelected())
|
||||||
|
{
|
||||||
|
case 0: type = video::EMT_TRANSPARENT_VERTEX_ALPHA;
|
||||||
|
break;
|
||||||
|
case 1: type = video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA;
|
||||||
|
break;
|
||||||
|
case 2: type = video::EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Earth->setMaterialType(type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We need to add a warning if the materials will not be able to
|
We need to add a warning if the materials will not be able to
|
||||||
be displayed 100% correctly. This is no problem, they will be
|
be displayed 100% correctly. This is no problem, they will be
|
||||||
|
@ -137,6 +151,10 @@ private:
|
||||||
ProblemText->setVisible(true);
|
ProblemText->setVisible(true);
|
||||||
else
|
else
|
||||||
ProblemText->setVisible(false);
|
ProblemText->setVisible(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -145,6 +163,7 @@ private:
|
||||||
gui::IGUIListBox* ListBox;
|
gui::IGUIListBox* ListBox;
|
||||||
|
|
||||||
scene::ISceneNode* Room;
|
scene::ISceneNode* Room;
|
||||||
|
scene::ISceneNode* Earth;
|
||||||
video::IVideoDriver* Driver;
|
video::IVideoDriver* Driver;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -155,27 +174,9 @@ Now for the real fun. We create an Irrlicht Device and start to setup the scene.
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// let user select driver type
|
// let user select driver type
|
||||||
|
video::E_DRIVER_TYPE driverType=driverChoiceConsole();
|
||||||
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
|
if (driverType==video::EDT_COUNT)
|
||||||
|
return 1;
|
||||||
printf("Please select the driver you want for this example:\n"\
|
|
||||||
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
|
|
||||||
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
|
|
||||||
" (f) NullDevice\n (otherKey) exit\n\n");
|
|
||||||
|
|
||||||
char i;
|
|
||||||
std::cin >> i;
|
|
||||||
|
|
||||||
switch(i)
|
|
||||||
{
|
|
||||||
case 'a': driverType = video::EDT_DIRECT3D9;break;
|
|
||||||
case 'b': driverType = video::EDT_DIRECT3D8;break;
|
|
||||||
case 'c': driverType = video::EDT_OPENGL; break;
|
|
||||||
case 'd': driverType = video::EDT_OGLES1; break;
|
|
||||||
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
|
|
||||||
case 'f': driverType = video::EDT_NULL; break;
|
|
||||||
default: return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// create device
|
// create device
|
||||||
|
|
||||||
|
@ -203,7 +204,7 @@ int main()
|
||||||
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
|
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
|
||||||
|
|
||||||
// add irrlicht logo
|
// add irrlicht logo
|
||||||
env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
|
env->addImage(driver->getTexture("../../media/irrlichtlogo3.png"),
|
||||||
core::position2d<s32>(10,10));
|
core::position2d<s32>(10,10));
|
||||||
|
|
||||||
// add camera
|
// add camera
|
||||||
|
@ -236,9 +237,14 @@ int main()
|
||||||
scene::IAnimatedMesh* roomMesh = smgr->getMesh(
|
scene::IAnimatedMesh* roomMesh = smgr->getMesh(
|
||||||
"../../media/room.3ds");
|
"../../media/room.3ds");
|
||||||
scene::ISceneNode* room = 0;
|
scene::ISceneNode* room = 0;
|
||||||
|
scene::ISceneNode* earth = 0;
|
||||||
|
|
||||||
if (roomMesh)
|
if (roomMesh)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
The Room Mesh doesn't have proper Texture Mapping on the floor,
|
||||||
|
so we can recreate them on runtime
|
||||||
|
*/
|
||||||
smgr->getMeshManipulator()->makePlanarTextureMapping(
|
smgr->getMeshManipulator()->makePlanarTextureMapping(
|
||||||
roomMesh->getMesh(0), 0.003f);
|
roomMesh->getMesh(0), 0.003f);
|
||||||
|
|
||||||
|
@ -263,7 +269,11 @@ int main()
|
||||||
|
|
||||||
if (normalMap)
|
if (normalMap)
|
||||||
driver->makeNormalMapTexture(normalMap, 9.0f);
|
driver->makeNormalMapTexture(normalMap, 9.0f);
|
||||||
|
/*
|
||||||
|
// The Normal Map and the displacement map/height map in the alpha channel
|
||||||
|
video::ITexture* normalMap =
|
||||||
|
driver->getTexture("../../media/rockwall_NRM.tga");
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
But just setting color and normal map is not everything. The
|
But just setting color and normal map is not everything. The
|
||||||
material we want to use needs some additional informations per
|
material we want to use needs some additional informations per
|
||||||
|
@ -285,12 +295,14 @@ int main()
|
||||||
driver->getTexture("../../media/rockwall.jpg"));
|
driver->getTexture("../../media/rockwall.jpg"));
|
||||||
room->setMaterialTexture(1, normalMap);
|
room->setMaterialTexture(1, normalMap);
|
||||||
|
|
||||||
|
// Stones don't glitter..
|
||||||
room->getMaterial(0).SpecularColor.set(0,0,0,0);
|
room->getMaterial(0).SpecularColor.set(0,0,0,0);
|
||||||
|
room->getMaterial(0).Shininess = 0.f;
|
||||||
|
|
||||||
room->setMaterialFlag(video::EMF_FOG_ENABLE, true);
|
room->setMaterialFlag(video::EMF_FOG_ENABLE, true);
|
||||||
room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);
|
room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);
|
||||||
// adjust height for parallax effect
|
// adjust height for parallax effect
|
||||||
room->getMaterial(0).MaterialTypeParam = 0.035f;
|
room->getMaterial(0).MaterialTypeParam = 1.f / 64.f;
|
||||||
|
|
||||||
// drop mesh because we created it with a create.. call.
|
// drop mesh because we created it with a create.. call.
|
||||||
tangentMesh->drop();
|
tangentMesh->drop();
|
||||||
|
@ -326,26 +338,26 @@ int main()
|
||||||
m.setScale ( core::vector3df(50,50,50) );
|
m.setScale ( core::vector3df(50,50,50) );
|
||||||
manipulator->transformMesh( tangentSphereMesh, m );
|
manipulator->transformMesh( tangentSphereMesh, m );
|
||||||
|
|
||||||
scene::ISceneNode *sphere = smgr->addMeshSceneNode(tangentSphereMesh);
|
earth = smgr->addMeshSceneNode(tangentSphereMesh);
|
||||||
|
|
||||||
sphere->setPosition(core::vector3df(-70,130,45));
|
earth->setPosition(core::vector3df(-70,130,45));
|
||||||
|
|
||||||
// load heightmap, create normal map from it and set it
|
// load heightmap, create normal map from it and set it
|
||||||
video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.jpg");
|
video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.jpg");
|
||||||
if (earthNormalMap)
|
if (earthNormalMap)
|
||||||
{
|
{
|
||||||
driver->makeNormalMapTexture(earthNormalMap, 20.0f);
|
driver->makeNormalMapTexture(earthNormalMap, 20.0f);
|
||||||
sphere->setMaterialTexture(1, earthNormalMap);
|
earth->setMaterialTexture(1, earthNormalMap);
|
||||||
sphere->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA);
|
earth->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA);
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjust material settings
|
// adjust material settings
|
||||||
sphere->setMaterialFlag(video::EMF_FOG_ENABLE, true);
|
earth->setMaterialFlag(video::EMF_FOG_ENABLE, true);
|
||||||
|
|
||||||
// add rotation animator
|
// add rotation animator
|
||||||
scene::ISceneNodeAnimator* anim =
|
scene::ISceneNodeAnimator* anim =
|
||||||
smgr->createRotationAnimator(core::vector3df(0,0.1f,0));
|
smgr->createRotationAnimator(core::vector3df(0,0.1f,0));
|
||||||
sphere->addAnimator(anim);
|
earth->addAnimator(anim);
|
||||||
anim->drop();
|
anim->drop();
|
||||||
|
|
||||||
// drop mesh because we created it with a create.. call.
|
// drop mesh because we created it with a create.. call.
|
||||||
|
@ -360,7 +372,7 @@ int main()
|
||||||
attached.
|
attached.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// add light 1 (nearly red)
|
// add light 1 (more green)
|
||||||
scene::ILightSceneNode* light1 =
|
scene::ILightSceneNode* light1 =
|
||||||
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
|
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
|
||||||
video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f);
|
video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f);
|
||||||
|
@ -381,7 +393,7 @@ int main()
|
||||||
bill->setMaterialFlag(video::EMF_LIGHTING, false);
|
bill->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||||
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
|
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
|
||||||
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
|
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
|
||||||
bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp"));
|
bill->setMaterialTexture(0, driver->getTexture("../../media/particlegreen.jpg"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Now the same again, with the second light. The difference is that we
|
Now the same again, with the second light. The difference is that we
|
||||||
|
@ -395,8 +407,8 @@ int main()
|
||||||
walls. But of course, this will change in future versions of Irrlicht
|
walls. But of course, this will change in future versions of Irrlicht
|
||||||
where higher versions of pixel/vertex shaders will be implemented too.
|
where higher versions of pixel/vertex shaders will be implemented too.
|
||||||
*/
|
*/
|
||||||
|
#if 0
|
||||||
// add light 2 (gray)
|
// add light 2 (red)
|
||||||
scene::ISceneNode* light2 =
|
scene::ISceneNode* light2 =
|
||||||
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
|
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
|
||||||
video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f);
|
video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f);
|
||||||
|
@ -412,7 +424,7 @@ int main()
|
||||||
bill->setMaterialFlag(video::EMF_LIGHTING, false);
|
bill->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||||
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
|
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
|
||||||
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
|
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
|
||||||
bill->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
|
bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp"));
|
||||||
|
|
||||||
// add particle system
|
// add particle system
|
||||||
scene::IParticleSystemSceneNode* ps =
|
scene::IParticleSystemSceneNode* ps =
|
||||||
|
@ -441,9 +453,9 @@ int main()
|
||||||
ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
|
ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
|
||||||
ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp"));
|
ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp"));
|
||||||
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
|
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
MyEventReceiver receiver(room, earth, env, driver);
|
||||||
MyEventReceiver receiver(room, env, driver);
|
|
||||||
device->setEventReceiver(&receiver);
|
device->setEventReceiver(&receiver);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/gcc" />
|
<Add directory="../../lib/gcc" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9,00"
|
Version="9,00"
|
||||||
Name="17.HelloWorld for Windows Mobile on PC"
|
Name="17.HelloWorld_Mobile_v9"
|
||||||
ProjectGUID="{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
|
ProjectGUID="{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
|
||||||
RootNamespace="My17HelloWorldforWindowsMobileonPC"
|
RootNamespace="My17HelloWorldforWindowsMobileonPC"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
|
@ -48,6 +48,7 @@
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -122,6 +123,7 @@
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="false"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "SplitScreen.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "SplitScreen.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -9,10 +9,10 @@ Global
|
||||||
Release = Release
|
Release = Release
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.ActiveCfg = Debug|Win32
|
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32
|
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.Build.0 = Debug|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32
|
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32
|
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="7.10"
|
||||||
Name="18.SplitScreen"
|
Name="18.SplitScreen"
|
||||||
ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
||||||
Keyword="Win32Proj">
|
Keyword="Win32Proj">
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8,00"
|
||||||
Name="18.SplitScreen_vc8"
|
Name="18.SplitScreen_vc8"
|
||||||
ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
@ -129,7 +129,6 @@
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="true"
|
Detect64BitPortabilityProblems="true"
|
||||||
DebugInformationFormat="0"
|
DebugInformationFormat="0"
|
||||||
CallingConvention="1"
|
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
|
|
@ -73,7 +73,7 @@ VideoDriver, load an animated mesh from .md2 and a map from
|
||||||
.pk3. Because that's old stuff, I won't explain every step.
|
.pk3. Because that's old stuff, I won't explain every step.
|
||||||
Just take care of the maps position.
|
Just take care of the maps position.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char** argv)
|
int main()
|
||||||
{
|
{
|
||||||
// ask user for driver
|
// ask user for driver
|
||||||
video::E_DRIVER_TYPE driverType=driverChoiceConsole();
|
video::E_DRIVER_TYPE driverType=driverChoiceConsole();
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
|
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MouseAndJoystick", "MouseAndJoystick.vcproj", "{1A16BBE1-A49B-4406-8883-681E6EA8702C}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MouseAndJoystick", "MouseAndJoystick.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -9,10 +9,10 @@ Global
|
||||||
Release = Release
|
Release = Release
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
{1A16BBE1-A49B-4406-8883-681E6EA8702C}.Debug.ActiveCfg = Debug|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.ActiveCfg = Debug|Win32
|
||||||
{1A16BBE1-A49B-4406-8883-681E6EA8702C}.Debug.Build.0 = Debug|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.Build.0 = Debug|Win32
|
||||||
{1A16BBE1-A49B-4406-8883-681E6EA8702C}.Release.ActiveCfg = Release|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.ActiveCfg = Release|Win32
|
||||||
{1A16BBE1-A49B-4406-8883-681E6EA8702C}.Release.Build.0 = Release|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="7.10"
|
||||||
Name="19.MouseAndJoystick"
|
Name="19.MouseAndJoystick"
|
||||||
ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
ProjectGUID="{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
|
||||||
SccProjectName=""
|
SccProjectName=""
|
||||||
SccLocalPath="">
|
SccLocalPath="">
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="19.MouseAndJoystick_vc8"
|
Name="19.MouseAndJoystick_vc8"
|
||||||
ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
ProjectGUID="{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
|
||||||
RootNamespace="MouseAndJoystick_vc8"
|
RootNamespace="MouseAndJoystick_vc8"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
|
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
# Visual Studio 2005
|
# Visual Studio 2005
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "ManagedLights.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "ManagedLights.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -8,8 +8,8 @@ Global
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="7.10"
|
||||||
Name="20.ManagedLights"
|
Name="20.ManagedLights"
|
||||||
ProjectGUID="{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
ProjectGUID="{16007FE2-142B-47F8-93E1-519BA3F39E71}"
|
||||||
SccProjectName=""
|
SccProjectName=""
|
||||||
SccLocalPath="">
|
SccLocalPath="">
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
|
|
@ -18,7 +18,7 @@ endif
|
||||||
|
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -805,7 +805,7 @@ void CQuake3EventHandler::CreateGUI()
|
||||||
gui.SceneTree = env->addTreeView( rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),
|
gui.SceneTree = env->addTreeView( rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),
|
||||||
gui.Window, -1, true, true, false );
|
gui.Window, -1, true, true, false );
|
||||||
gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" );
|
gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" );
|
||||||
gui.SceneTree->getRoot()->clearChilds();
|
gui.SceneTree->getRoot()->clearChildren();
|
||||||
addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
|
addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
|
||||||
|
|
||||||
|
|
||||||
|
@ -1288,7 +1288,7 @@ void CQuake3EventHandler::SetGUIActive( s32 command)
|
||||||
gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree
|
gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
gui.SceneTree->getRoot()->clearChilds();
|
gui.SceneTree->getRoot()->clearChildren();
|
||||||
addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
|
addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ LIBSELECT=64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add library="Xxf86vm" />
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
<Add library="GL" />
|
<Add library="GL" />
|
||||||
<Add directory="../../lib/Linux" />
|
<Add directory="../../lib/Linux" />
|
||||||
</Linker>
|
</Linker>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaterialViewer", "MaterialViewer.vcproj", "{C4F5BB37-D873-4DE2-B7D0-A60A936798E1}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaterialViewer", "MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -9,10 +9,10 @@ Global
|
||||||
Release = Release
|
Release = Release
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
{C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Debug.ActiveCfg = Debug|Win32
|
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.ActiveCfg = Debug|Win32
|
||||||
{C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Debug.Build.0 = Debug|Win32
|
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.Build.0 = Debug|Win32
|
||||||
{C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Release.ActiveCfg = Release|Win32
|
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.ActiveCfg = Release|Win32
|
||||||
{C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Release.Build.0 = Release|Win32
|
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
|
@ -1,160 +1,226 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="9,00"
|
||||||
Name="22.MaterialViewer"
|
Name="22.MaterialViewer"
|
||||||
ProjectGUID="{AFC223BD-4371-4A8B-A90B-0D338BD2DEBB}"
|
ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
|
||||||
SccProjectName=""
|
TargetFrameworkVersion="131072"
|
||||||
SccLocalPath="">
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
Name="Win32"/>
|
Name="Win32"
|
||||||
|
/>
|
||||||
</Platforms>
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory=".\Release"
|
OutputDirectory=".\Release"
|
||||||
IntermediateDirectory=".\Release"
|
IntermediateDirectory=".\Release"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
CharacterSet="2">
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TypeLibraryName=".\Release/MaterialViewer.tlb"
|
||||||
|
HeaderFileName=""
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="..\..\include"
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||||
StringPooling="TRUE"
|
StringPooling="true"
|
||||||
RuntimeLibrary="4"
|
RuntimeLibrary="0"
|
||||||
EnableFunctionLevelLinking="TRUE"
|
EnableFunctionLevelLinking="true"
|
||||||
UsePrecompiledHeader="2"
|
UsePrecompiledHeader="0"
|
||||||
PrecompiledHeaderFile=".\Release/MaterialViewer.pch"
|
PrecompiledHeaderFile=".\Release/MaterialViewer.pch"
|
||||||
AssemblerListingLocation=".\Release/"
|
AssemblerListingLocation=".\Release/"
|
||||||
ObjectFile=".\Release/"
|
ObjectFile=".\Release/"
|
||||||
ProgramDataBaseFileName=".\Release/"
|
ProgramDataBaseFileName=".\Release/"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="true"
|
||||||
CompileAs="0"/>
|
CompileAs="0"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="NDEBUG"
|
||||||
|
Culture="3079"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
|
OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
|
||||||
LinkIncremental="0"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
ProgramDatabaseFile=".\Release/MaterialViewer.pdb"
|
ProgramDatabaseFile=".\Release/MaterialViewer.pdb"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCALinkTool"
|
||||||
TypeLibraryName=".\Release/MaterialViewer.tlb"
|
/>
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCFxCopTool"
|
||||||
PreprocessorDefinitions="NDEBUG"
|
/>
|
||||||
Culture="3079"/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCPostBuildEventTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory=".\Debug"
|
OutputDirectory=".\Debug"
|
||||||
IntermediateDirectory=".\Debug"
|
IntermediateDirectory=".\Debug"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
CharacterSet="2">
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TypeLibraryName=".\Debug/MaterialViewer.tlb"
|
||||||
|
HeaderFileName=""
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\include"
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="5"
|
RuntimeLibrary="1"
|
||||||
UsePrecompiledHeader="2"
|
UsePrecompiledHeader="0"
|
||||||
PrecompiledHeaderFile=".\Debug/MaterialViewer.pch"
|
PrecompiledHeaderFile=".\Debug/MaterialViewer.pch"
|
||||||
AssemblerListingLocation=".\Debug/"
|
AssemblerListingLocation=".\Debug/"
|
||||||
ObjectFile=".\Debug/"
|
ObjectFile=".\Debug/"
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
CompileAs="0"/>
|
CompileAs="0"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
Culture="3079"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
|
OutputFile="..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe"
|
||||||
LinkIncremental="0"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile=".\Debug/MaterialViewer.pdb"
|
ProgramDatabaseFile=".\Debug/MaterialViewer.pdb"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"/>
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCALinkTool"
|
||||||
TypeLibraryName=".\Debug/MaterialViewer.tlb"
|
/>
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCFxCopTool"
|
||||||
PreprocessorDefinitions="_DEBUG"
|
/>
|
||||||
Culture="3079"/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCPostBuildEventTool"
|
||||||
<Tool
|
/>
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
<Files>
|
<Files>
|
||||||
<File
|
<File
|
||||||
RelativePath="main.cpp">
|
RelativePath="main.cpp"
|
||||||
|
>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32">
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
PreprocessorDefinitions=""/>
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
PreprocessorDefinitions=""
|
PreprocessorDefinitions=""
|
||||||
BasicRuntimeChecks="3"/>
|
BasicRuntimeChecks="3"
|
||||||
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8,00"
|
||||||
Name="22.MaterialViewer_vc8"
|
Name="22.MaterialViewer_vc8"
|
||||||
ProjectGUID="{0914E5C8-5352-467B-8421-C9EB35BD5596}"
|
ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
|
||||||
RootNamespace="MaterialViewer_vc8"
|
RootNamespace="MaterialViewer_vc8"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
|
|
@ -17,7 +17,7 @@ LIBSELECT=64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux clean_linux: SYSTEM=Linux
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.SMeshHandling", "SMeshHandling.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.SMeshHandling", "SMeshHandling.vcproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -9,10 +9,10 @@ Global
|
||||||
Release = Release
|
Release = Release
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.ActiveCfg = Debug|Win32
|
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.ActiveCfg = Debug|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32
|
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.Build.0 = Debug|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32
|
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.ActiveCfg = Release|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32
|
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="7.10"
|
||||||
Name="23.SMeshHandling"
|
Name="23.SMeshHandling"
|
||||||
ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
|
||||||
Keyword="Win32Proj">
|
Keyword="Win32Proj">
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8,00"
|
||||||
Name="23.SMeshHandling_vc8"
|
Name="23.SMeshHandling_vc8"
|
||||||
ProjectGUID="{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
Version="9,00"
|
Version="9,00"
|
||||||
Name="23.SMeshHandling_vc9"
|
Name="23.SMeshHandling_vc9"
|
||||||
ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
|
ProjectGUID="{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}"
|
||||||
RootNamespace="19.SMeshHandling_vc9"
|
RootNamespace="23.SMeshHandling_vc9"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
TargetFrameworkVersion="131072"
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="..\..\bin\Win32-VisualStudio\19.SMeshHandling.exe"
|
OutputFile="..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
GenerateDebugInformation="false"
|
GenerateDebugInformation="false"
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_project_file>
|
||||||
|
<FileVersion major="1" minor="6" />
|
||||||
|
<Project>
|
||||||
|
<Option title="Irrlicht Example 24 Cursor Control" />
|
||||||
|
<Option pch_mode="0" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Build>
|
||||||
|
<Target title="Linux">
|
||||||
|
<Option platforms="Unix;" />
|
||||||
|
<Option output="../../bin/Linux/CursorControl" prefix_auto="0" extension_auto="0" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-W" />
|
||||||
|
<Add option="-g" />
|
||||||
|
<Add option="-D_IRR_STATIC_LIB_" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
|
<Add library="GL" />
|
||||||
|
<Add directory="../../lib/Linux" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
<Target title="Windows">
|
||||||
|
<Option platforms="Windows;" />
|
||||||
|
<Option output="../../bin/Win32-gcc/CursorControl" prefix_auto="0" extension_auto="1" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Option projectResourceIncludeDirsRelation="1" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-W" />
|
||||||
|
<Add option="-g" />
|
||||||
|
<Add directory="../../lib/Win32-gcc" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add directory="../../lib/Win32-gcc/" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
</Build>
|
||||||
|
<VirtualTargets>
|
||||||
|
<Add alias="All" targets="Windows;" />
|
||||||
|
</VirtualTargets>
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-W" />
|
||||||
|
<Add option="-g" />
|
||||||
|
<Add directory="../../include" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add library="Irrlicht" />
|
||||||
|
</Linker>
|
||||||
|
<Unit filename="main.cpp" />
|
||||||
|
<Extensions>
|
||||||
|
<code_completion />
|
||||||
|
<debugger />
|
||||||
|
<envvars />
|
||||||
|
</Extensions>
|
||||||
|
</Project>
|
||||||
|
</CodeBlocks_project_file>
|
|
@ -0,0 +1,21 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "CursorControl.vcproj", "{02B67A37-50E1-49db-BECF-905BC029C2FE}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
|
Debug = Debug
|
||||||
|
Release = Release
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
|
{02B67A37-50E1-49db-BECF-905BC029C2FE}.Debug.ActiveCfg = Debug|Win32
|
||||||
|
{02B67A37-50E1-49db-BECF-905BC029C2FE}.Debug.Build.0 = Debug|Win32
|
||||||
|
{02B67A37-50E1-49db-BECF-905BC029C2FE}.Release.ActiveCfg = Release|Win32
|
||||||
|
{02B67A37-50E1-49db-BECF-905BC029C2FE}.Release.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,132 @@
|
||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="24.CursorControl"
|
||||||
|
ProjectGUID="{02B67A37-50E1-49db-BECF-905BC029C2FE}"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
|
MinimalRebuild="TRUE"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="5"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="4"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/CursorControl.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="TRUE">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/QIfist /Oa"
|
||||||
|
Optimization="3"
|
||||||
|
GlobalOptimizations="TRUE"
|
||||||
|
InlineFunctionExpansion="2"
|
||||||
|
EnableIntrinsicFunctions="TRUE"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="TRUE"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
RuntimeLibrary="4"
|
||||||
|
BufferSecurityCheck="FALSE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CallingConvention="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
|
GenerateDebugInformation="FALSE"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<File
|
||||||
|
RelativePath=".\main.cpp">
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
|
@ -0,0 +1,190 @@
|
||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
Name="24.CursorControl_vc8"
|
||||||
|
ProjectGUID="{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/CursorControl.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CallingConvention="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<File
|
||||||
|
RelativePath=".\main.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
|
@ -0,0 +1,18 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,185 @@
|
||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9,00"
|
||||||
|
Name="24.CursorControl_vc9"
|
||||||
|
ProjectGUID="{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
|
||||||
|
RootNamespace="24.CursorControl_vc9"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/CursorControl.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
ExceptionHandling="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CallingConvention="0"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\bin\Win32-VisualStudio\24.CursorControl.exe"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<File
|
||||||
|
RelativePath=".\main.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
|
@ -0,0 +1,66 @@
|
||||||
|
# Makefile for Irrlicht Examples
|
||||||
|
# It's usually sufficient to change just the target name and source file list
|
||||||
|
# and be sure that CXX is set to a valid compiler
|
||||||
|
|
||||||
|
# Name of the executable created (.exe will be added automatically if necessary)
|
||||||
|
Target := 24.CursorControl
|
||||||
|
# List of source files, separated by spaces
|
||||||
|
Sources := main.cpp
|
||||||
|
# Path to Irrlicht directory, should contain include/ and lib/
|
||||||
|
IrrlichtHome := ../..
|
||||||
|
# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems
|
||||||
|
BinPath = ../../bin/$(SYSTEM)
|
||||||
|
|
||||||
|
# general compiler settings (might need to be set when compiling the lib, too)
|
||||||
|
# preprocessor flags, e.g. defines and include paths
|
||||||
|
USERCPPFLAGS =
|
||||||
|
# compiler flags such as optimization flags
|
||||||
|
USERCXXFLAGS = -O3 -ffast-math
|
||||||
|
#USERCXXFLAGS = -g -Wall
|
||||||
|
# linker flags such as additional libraries and link paths
|
||||||
|
USERLDFLAGS =
|
||||||
|
|
||||||
|
####
|
||||||
|
#no changes necessary below this line
|
||||||
|
####
|
||||||
|
|
||||||
|
CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
|
||||||
|
CXXFLAGS = $(USERCXXFLAGS)
|
||||||
|
LDFLAGS = $(USERLDFLAGS)
|
||||||
|
|
||||||
|
#default target is Linux
|
||||||
|
all: all_linux
|
||||||
|
|
||||||
|
# target specific settings
|
||||||
|
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
|
||||||
|
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
|
all_linux clean_linux: SYSTEM=Linux
|
||||||
|
all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
|
||||||
|
all_win32 clean_win32 static_win32: SUF=.exe
|
||||||
|
static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
|
||||||
|
all_win32: LDFLAGS += -lopengl32 -lm
|
||||||
|
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32
|
||||||
|
# name of the binary - only valid for targets which set SYSTEM
|
||||||
|
DESTPATH = $(BinPath)/$(Target)$(SUF)
|
||||||
|
|
||||||
|
all_linux all_win32 static_win32:
|
||||||
|
$(warning Building...)
|
||||||
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
|
||||||
|
|
||||||
|
clean: clean_linux clean_win32
|
||||||
|
$(warning Cleaning...)
|
||||||
|
|
||||||
|
clean_linux clean_win32:
|
||||||
|
@$(RM) $(DESTPATH)
|
||||||
|
|
||||||
|
.PHONY: all all_win32 static_win32 clean clean_linux clean_win32
|
||||||
|
|
||||||
|
#multilib handling
|
||||||
|
ifeq ($(HOSTTYPE), x86_64)
|
||||||
|
LIBSELECT=64
|
||||||
|
endif
|
||||||
|
#solaris real-time features
|
||||||
|
ifeq ($(HOSTTYPE), sun4)
|
||||||
|
LDFLAGS += -lrt
|
||||||
|
endif
|
||||||
|
|
|
@ -0,0 +1,563 @@
|
||||||
|
/** Example 024 Cursor Control
|
||||||
|
|
||||||
|
Show how to modify cursors and offer some useful tool-functions for creating cursors.
|
||||||
|
It can also be used for experiments with the mouse in general.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <irrlicht.h>
|
||||||
|
#include "driverChoice.h"
|
||||||
|
|
||||||
|
using namespace irr;
|
||||||
|
using namespace core;
|
||||||
|
using namespace scene;
|
||||||
|
using namespace video;
|
||||||
|
using namespace io;
|
||||||
|
using namespace gui;
|
||||||
|
|
||||||
|
#ifdef _IRR_WINDOWS_
|
||||||
|
#pragma comment(lib, "Irrlicht.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const int DELAY_TIME = 3000;
|
||||||
|
|
||||||
|
enum ETimerAction
|
||||||
|
{
|
||||||
|
ETA_MOUSE_VISIBLE,
|
||||||
|
ETA_MOUSE_INVISIBLE,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Structure to allow delayed execution of some actions.
|
||||||
|
*/
|
||||||
|
struct TimerAction
|
||||||
|
{
|
||||||
|
u32 TargetTime;
|
||||||
|
ETimerAction Action;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
struct SAppContext
|
||||||
|
{
|
||||||
|
SAppContext()
|
||||||
|
: Device(0), InfoStatic(0), EventBox(0), CursorBox(0), SpriteBox(0)
|
||||||
|
, ButtonSetVisible(0), ButtonSetInvisible(0), ButtonSimulateBadFps(0)
|
||||||
|
, ButtonChangeIcon(0)
|
||||||
|
, SimulateBadFps(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void update()
|
||||||
|
{
|
||||||
|
if (!Device)
|
||||||
|
return;
|
||||||
|
u32 timeNow = Device->getTimer()->getTime();
|
||||||
|
for ( u32 i=0; i < TimerActions.size(); ++i )
|
||||||
|
{
|
||||||
|
if ( timeNow >= TimerActions[i].TargetTime )
|
||||||
|
{
|
||||||
|
runTimerAction(TimerActions[i]);
|
||||||
|
TimerActions.erase(i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void runTimerAction(const TimerAction& action)
|
||||||
|
{
|
||||||
|
if (ETA_MOUSE_VISIBLE == action.Action)
|
||||||
|
{
|
||||||
|
Device->getCursorControl()->setVisible(true);
|
||||||
|
ButtonSetVisible->setEnabled(true);
|
||||||
|
}
|
||||||
|
else if ( ETA_MOUSE_INVISIBLE == action.Action)
|
||||||
|
{
|
||||||
|
Device->getCursorControl()->setVisible(false);
|
||||||
|
ButtonSetInvisible->setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Add another icon which the user can click and select as cursor later on.
|
||||||
|
*/
|
||||||
|
void addIcon(const stringw& name, const SCursorSprite &sprite, bool addCursor=true)
|
||||||
|
{
|
||||||
|
// Sprites are just icons - not yet cursors. They can be displayed by Irrlicht sprite functions and be used to create cursors.
|
||||||
|
SpriteBox->addItem(name.c_str(), sprite.SpriteId);
|
||||||
|
Sprites.push_back(sprite);
|
||||||
|
|
||||||
|
// create the cursor together with the icon?
|
||||||
|
if ( addCursor )
|
||||||
|
{
|
||||||
|
/* Here we create a hardware cursor from a sprite */
|
||||||
|
Device->getCursorControl()->addIcon(sprite);
|
||||||
|
|
||||||
|
// ... and add it to the cursors selection listbox to the other system cursors.
|
||||||
|
CursorBox->addItem(name.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IrrlichtDevice * Device;
|
||||||
|
gui::IGUIStaticText * InfoStatic;
|
||||||
|
gui::IGUIListBox * EventBox;
|
||||||
|
gui::IGUIListBox * CursorBox;
|
||||||
|
gui::IGUIListBox * SpriteBox;
|
||||||
|
gui::IGUIButton * ButtonSetVisible;
|
||||||
|
gui::IGUIButton * ButtonSetInvisible;
|
||||||
|
gui::IGUIButton * ButtonSimulateBadFps;
|
||||||
|
gui::IGUIButton * ButtonChangeIcon;
|
||||||
|
array<TimerAction> TimerActions;
|
||||||
|
bool SimulateBadFps;
|
||||||
|
array<SCursorSprite> Sprites;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Helper function to print mouse event names into a stringw
|
||||||
|
*/
|
||||||
|
void PrintMouseEventName(const SEvent& event, stringw &result)
|
||||||
|
{
|
||||||
|
switch ( event.MouseInput.Event )
|
||||||
|
{
|
||||||
|
case EMIE_LMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_LMOUSE_PRESSED_DOWN"); break;
|
||||||
|
case EMIE_RMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_RMOUSE_PRESSED_DOWN"); break;
|
||||||
|
case EMIE_MMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_MMOUSE_PRESSED_DOWN"); break;
|
||||||
|
case EMIE_LMOUSE_LEFT_UP: result += stringw(L"EMIE_LMOUSE_LEFT_UP"); break;
|
||||||
|
case EMIE_RMOUSE_LEFT_UP: result += stringw(L"EMIE_RMOUSE_LEFT_UP"); break;
|
||||||
|
case EMIE_MMOUSE_LEFT_UP: result += stringw(L"EMIE_MMOUSE_LEFT_UP"); break;
|
||||||
|
case EMIE_MOUSE_MOVED: result += stringw(L"EMIE_MOUSE_MOVED"); break;
|
||||||
|
case EMIE_MOUSE_WHEEL: result += stringw(L"EMIE_MOUSE_WHEEL"); break;
|
||||||
|
case EMIE_LMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_LMOUSE_DOUBLE_CLICK"); break;
|
||||||
|
case EMIE_RMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_RMOUSE_DOUBLE_CLICK"); break;
|
||||||
|
case EMIE_MMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_MMOUSE_DOUBLE_CLICK"); break;
|
||||||
|
case EMIE_LMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_LMOUSE_TRIPLE_CLICK"); break;
|
||||||
|
case EMIE_RMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_RMOUSE_TRIPLE_CLICK"); break;
|
||||||
|
case EMIE_MMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_MMOUSE_TRIPLE_CLICK"); break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Helper function to print all the state information which get from a mouse-event into a stringw
|
||||||
|
*/
|
||||||
|
void PrintMouseState(const SEvent& event, stringw &result)
|
||||||
|
{
|
||||||
|
result += stringw(L"X: ");
|
||||||
|
result += stringw(event.MouseInput.X);
|
||||||
|
result += stringw(L"\n");
|
||||||
|
|
||||||
|
result += stringw(L"Y: ");
|
||||||
|
result += stringw(event.MouseInput.Y);
|
||||||
|
result += stringw(L"\n");
|
||||||
|
|
||||||
|
|
||||||
|
result += stringw(L"Wheel: ");
|
||||||
|
result += stringw(event.MouseInput.Wheel);
|
||||||
|
result += stringw(L"\n");
|
||||||
|
|
||||||
|
result += stringw(L"Shift: ");
|
||||||
|
if ( event.MouseInput.Shift )
|
||||||
|
result += stringw(L"true\n");
|
||||||
|
else
|
||||||
|
result += stringw(L"false\n");
|
||||||
|
|
||||||
|
result += stringw(L"Control: ");
|
||||||
|
if ( event.MouseInput.Control )
|
||||||
|
result += stringw(L"true\n");
|
||||||
|
else
|
||||||
|
result += stringw(L"false\n");
|
||||||
|
|
||||||
|
result += stringw(L"ButtonStates: ");
|
||||||
|
result += stringw(event.MouseInput.ButtonStates);
|
||||||
|
result += stringw(L"\n");
|
||||||
|
|
||||||
|
result += stringw(L"isLeftPressed: ");
|
||||||
|
if ( event.MouseInput.isLeftPressed() )
|
||||||
|
result += stringw(L"true\n");
|
||||||
|
else
|
||||||
|
result += stringw(L"false\n");
|
||||||
|
|
||||||
|
result += stringw(L"isRightPressed: ");
|
||||||
|
if ( event.MouseInput.isRightPressed() )
|
||||||
|
result += stringw(L"true\n");
|
||||||
|
else
|
||||||
|
result += stringw(L"false\n");
|
||||||
|
|
||||||
|
result += stringw(L"isMiddlePressed: ");
|
||||||
|
if ( event.MouseInput.isMiddlePressed() )
|
||||||
|
result += stringw(L"true\n");
|
||||||
|
else
|
||||||
|
result += stringw(L"false\n");
|
||||||
|
|
||||||
|
result += stringw(L"Event: ");
|
||||||
|
|
||||||
|
PrintMouseEventName(event, result);
|
||||||
|
|
||||||
|
result += stringw(L"\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
A typical event receiver.
|
||||||
|
*/
|
||||||
|
class MyEventReceiver : public IEventReceiver
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyEventReceiver(SAppContext & context) : Context(context) { }
|
||||||
|
|
||||||
|
virtual bool OnEvent(const SEvent& event)
|
||||||
|
{
|
||||||
|
if (event.EventType == EET_GUI_EVENT )
|
||||||
|
{
|
||||||
|
switch ( event.GUIEvent.EventType )
|
||||||
|
{
|
||||||
|
case EGET_BUTTON_CLICKED:
|
||||||
|
{
|
||||||
|
u32 timeNow = Context.Device->getTimer()->getTime();
|
||||||
|
TimerAction action;
|
||||||
|
action.TargetTime = timeNow + DELAY_TIME;
|
||||||
|
if ( event.GUIEvent.Caller == Context.ButtonSetVisible )
|
||||||
|
{
|
||||||
|
action.Action = ETA_MOUSE_VISIBLE;
|
||||||
|
Context.TimerActions.push_back(action);
|
||||||
|
Context.ButtonSetVisible->setEnabled(false);
|
||||||
|
}
|
||||||
|
else if ( event.GUIEvent.Caller == Context.ButtonSetInvisible )
|
||||||
|
{
|
||||||
|
action.Action = ETA_MOUSE_INVISIBLE;
|
||||||
|
Context.TimerActions.push_back(action);
|
||||||
|
Context.ButtonSetInvisible->setEnabled(false);
|
||||||
|
}
|
||||||
|
else if ( event.GUIEvent.Caller == Context.ButtonSimulateBadFps )
|
||||||
|
{
|
||||||
|
Context.SimulateBadFps = Context.ButtonSimulateBadFps->isPressed();
|
||||||
|
}
|
||||||
|
else if ( event.GUIEvent.Caller == Context.ButtonChangeIcon )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Replace an existing cursor icon by another icon.
|
||||||
|
The user has to select both - the icon which should be replaced and the icon which will replace it.
|
||||||
|
*/
|
||||||
|
s32 selectedCursor = Context.CursorBox->getSelected();
|
||||||
|
s32 selectedSprite = Context.SpriteBox->getSelected();
|
||||||
|
if ( selectedCursor >= 0 && selectedSprite >= 0 )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
This does replace the icon.
|
||||||
|
*/
|
||||||
|
Context.Device->getCursorControl()->changeIcon((ECURSOR_ICON)selectedCursor, Context.Sprites[selectedSprite] );
|
||||||
|
|
||||||
|
/*
|
||||||
|
Do also show the new icon.
|
||||||
|
*/
|
||||||
|
Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selectedCursor) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EGET_LISTBOX_CHANGED:
|
||||||
|
case EGET_LISTBOX_SELECTED_AGAIN:
|
||||||
|
{
|
||||||
|
if ( event.GUIEvent.Caller == Context.CursorBox )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Find out which cursor the user selected
|
||||||
|
*/
|
||||||
|
s32 selected = Context.CursorBox->getSelected();
|
||||||
|
if ( selected >= 0 )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Here we set the new cursor icon which will now be used within our window.
|
||||||
|
*/
|
||||||
|
Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selected) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.EventType == EET_MOUSE_INPUT_EVENT)
|
||||||
|
{
|
||||||
|
stringw infoText;
|
||||||
|
PrintMouseState(event, infoText);
|
||||||
|
Context.InfoStatic->setText(infoText.c_str());
|
||||||
|
if ( event.MouseInput.Event != EMIE_MOUSE_MOVED && event.MouseInput.Event != EMIE_MOUSE_WHEEL ) // no spam
|
||||||
|
{
|
||||||
|
infoText = L"";
|
||||||
|
PrintMouseEventName(event, infoText);
|
||||||
|
Context.EventBox->insertItem(0, infoText.c_str(), -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
SAppContext & Context;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Use several imagefiles as animation frames for a sprite which can be used as cursor icon.
|
||||||
|
The images in those files all need to have the same size.
|
||||||
|
Return sprite index on success or -1 on failure
|
||||||
|
*/
|
||||||
|
s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const array< io::path >& files, u32 frameTime )
|
||||||
|
{
|
||||||
|
if ( !spriteBank || !driver || !files.size() )
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
video::ITexture * tex = driver->getTexture( files[0] );
|
||||||
|
if ( tex )
|
||||||
|
{
|
||||||
|
array< rect<s32> >& spritePositions = spriteBank->getPositions();
|
||||||
|
u32 idxRect = spritePositions.size();
|
||||||
|
spritePositions.push_back( rect<s32>(0,0, tex->getSize().Width, tex->getSize().Height) );
|
||||||
|
|
||||||
|
SGUISprite sprite;
|
||||||
|
sprite.frameTime = frameTime;
|
||||||
|
|
||||||
|
array< SGUISprite >& sprites = spriteBank->getSprites();
|
||||||
|
u32 startIdx = spriteBank->getTextureCount();
|
||||||
|
for ( u32 f=0; f < files.size(); ++f )
|
||||||
|
{
|
||||||
|
tex = driver->getTexture( files[f] );
|
||||||
|
if ( tex )
|
||||||
|
{
|
||||||
|
spriteBank->addTexture( driver->getTexture(files[f]) );
|
||||||
|
gui::SGUISpriteFrame frame;
|
||||||
|
frame.rectNumber = idxRect;
|
||||||
|
frame.textureNumber = startIdx+f;
|
||||||
|
sprite.Frames.push_back( frame );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sprites.push_back( sprite );
|
||||||
|
return sprites.size()-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Use several images within one imagefile as animation frames for a sprite which can be used as cursor icon
|
||||||
|
The sizes of the icons within that file all need to have the same size
|
||||||
|
Return sprite index on success or -1 on failure
|
||||||
|
*/
|
||||||
|
s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const array< rect<s32> >& rects, u32 frameTime )
|
||||||
|
{
|
||||||
|
if ( !spriteBank || !driver || !rects.size() )
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
video::ITexture * tex = driver->getTexture( file );
|
||||||
|
if ( tex )
|
||||||
|
{
|
||||||
|
array< rect<s32> >& spritePositions = spriteBank->getPositions();
|
||||||
|
u32 idxRect = spritePositions.size();
|
||||||
|
u32 idxTex = spriteBank->getTextureCount();
|
||||||
|
spriteBank->addTexture( tex );
|
||||||
|
|
||||||
|
SGUISprite sprite;
|
||||||
|
sprite.frameTime = frameTime;
|
||||||
|
|
||||||
|
array< SGUISprite >& sprites = spriteBank->getSprites();
|
||||||
|
for ( u32 i=0; i < rects.size(); ++i )
|
||||||
|
{
|
||||||
|
spritePositions.push_back( rects[i] );
|
||||||
|
|
||||||
|
gui::SGUISpriteFrame frame;
|
||||||
|
frame.rectNumber = idxRect+i;
|
||||||
|
frame.textureNumber = idxTex;
|
||||||
|
sprite.Frames.push_back( frame );
|
||||||
|
}
|
||||||
|
|
||||||
|
sprites.push_back( sprite );
|
||||||
|
return sprites.size()-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Create a non-animated icon from the given file and position and put it into the spritebank.
|
||||||
|
We can use this icon later on in a cursor.
|
||||||
|
*/
|
||||||
|
s32 AddIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const core::rect<s32>& rect )
|
||||||
|
{
|
||||||
|
if ( !spriteBank || !driver )
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
video::ITexture * tex = driver->getTexture( file );
|
||||||
|
if ( tex )
|
||||||
|
{
|
||||||
|
core::array< core::rect<irr::s32> >& spritePositions = spriteBank->getPositions();
|
||||||
|
spritePositions.push_back( rect );
|
||||||
|
array< SGUISprite >& sprites = spriteBank->getSprites();
|
||||||
|
spriteBank->addTexture( tex );
|
||||||
|
|
||||||
|
gui::SGUISpriteFrame frame;
|
||||||
|
frame.rectNumber = spritePositions.size()-1;
|
||||||
|
frame.textureNumber = spriteBank->getTextureCount()-1;
|
||||||
|
|
||||||
|
SGUISprite sprite;
|
||||||
|
sprite.frameTime = 0;
|
||||||
|
sprite.Frames.push_back( frame );
|
||||||
|
|
||||||
|
sprites.push_back( sprite );
|
||||||
|
|
||||||
|
return sprites.size()-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
video::E_DRIVER_TYPE driverType = driverChoiceConsole();
|
||||||
|
if (driverType==video::EDT_COUNT)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
IrrlichtDevice * device = createDevice(driverType, dimension2d<u32>(640, 480));
|
||||||
|
if (device == 0)
|
||||||
|
return 1; // could not create selected driver.
|
||||||
|
|
||||||
|
// It's sometimes of interest to know how the mouse behaves after a resize
|
||||||
|
device->setResizable(true);
|
||||||
|
|
||||||
|
device->setWindowCaption(L"Cursor control - Irrlicht engine tutorial");
|
||||||
|
video::IVideoDriver* driver = device->getVideoDriver();
|
||||||
|
IGUIEnvironment* env = device->getGUIEnvironment();
|
||||||
|
|
||||||
|
gui::IGUISpriteBank * SpriteBankIcons;
|
||||||
|
|
||||||
|
SAppContext context;
|
||||||
|
context.Device = device;
|
||||||
|
|
||||||
|
rect< s32 > rectInfoStatic(10,10, 200, 200);
|
||||||
|
env->addStaticText (L"Cursor state information", rectInfoStatic, true, true);
|
||||||
|
rectInfoStatic.UpperLeftCorner += dimension2di(0, 15);
|
||||||
|
context.InfoStatic = env->addStaticText (L"", rectInfoStatic, true, true);
|
||||||
|
rect< s32 > rectEventBox(10,210, 200, 400);
|
||||||
|
env->addStaticText (L"click events (new on top)", rectEventBox, true, true);
|
||||||
|
rectEventBox.UpperLeftCorner += dimension2di(0, 15);
|
||||||
|
context.EventBox = env->addListBox(rectEventBox);
|
||||||
|
rect< s32 > rectCursorBox(210,10, 400, 250);
|
||||||
|
env->addStaticText (L"cursors, click to set the active one", rectCursorBox, true, true);
|
||||||
|
rectCursorBox.UpperLeftCorner += dimension2di(0, 15);
|
||||||
|
context.CursorBox = env->addListBox(rectCursorBox);
|
||||||
|
rect< s32 > rectSpriteBox(210,260, 400, 400);
|
||||||
|
env->addStaticText (L"sprites", rectSpriteBox, true, true);
|
||||||
|
rectSpriteBox.UpperLeftCorner += dimension2di(0, 15);
|
||||||
|
context.SpriteBox = env->addListBox(rectSpriteBox);
|
||||||
|
|
||||||
|
context.ButtonSetVisible = env->addButton( rect<s32>( 410, 20, 560, 40 ), 0, -1, L"set visible (delayed)" );
|
||||||
|
context.ButtonSetInvisible = env->addButton( rect<s32>( 410, 50, 560, 70 ), 0, -1, L"set invisible (delayed)" );
|
||||||
|
context.ButtonSimulateBadFps = env->addButton( rect<s32>( 410, 80, 560, 100 ), 0, -1, L"simulate bad FPS" );
|
||||||
|
context.ButtonSimulateBadFps->setIsPushButton(true);
|
||||||
|
context.ButtonChangeIcon = env->addButton( rect<s32>( 410, 140, 560, 160 ), 0, -1, L"replace cursor icon\n(cursor+sprite must be selected)" );
|
||||||
|
|
||||||
|
// set the names for alll the system cursors
|
||||||
|
for ( int i=0; i < (int)gui::ECI_COUNT; ++i )
|
||||||
|
{
|
||||||
|
context.CursorBox->addItem(stringw( GUICursorIconNames[i] ).c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Create sprites which then can be used as cursor icons.
|
||||||
|
*/
|
||||||
|
SpriteBankIcons = env->addEmptySpriteBank(io::path("cursor_icons"));
|
||||||
|
context.SpriteBox->setSpriteBank(SpriteBankIcons);
|
||||||
|
|
||||||
|
// create one animated icon from several files
|
||||||
|
array< io::path > files;
|
||||||
|
files.push_back( io::path("../../media/icon_crosshairs16x16bw1.png") );
|
||||||
|
files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") );
|
||||||
|
files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") );
|
||||||
|
files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") );
|
||||||
|
files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") );
|
||||||
|
SCursorSprite spriteBw; // the sprite + some additional information needed for cursors
|
||||||
|
spriteBw.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, files, 200 );
|
||||||
|
spriteBw.SpriteBank = SpriteBankIcons;
|
||||||
|
spriteBw.HotSpot = position2d<s32>(7,7);
|
||||||
|
context.addIcon(L"crosshair_bw", spriteBw);
|
||||||
|
|
||||||
|
// create one animated icon from one file
|
||||||
|
array< rect<s32> > iconRects;
|
||||||
|
iconRects.push_back( rect<s32>(0,0, 16, 16) );
|
||||||
|
iconRects.push_back( rect<s32>(16,0, 32, 16) );
|
||||||
|
iconRects.push_back( rect<s32>(0,16, 16, 32) );
|
||||||
|
iconRects.push_back( rect<s32>(0,16, 16, 32) );
|
||||||
|
iconRects.push_back( rect<s32>(16,0, 32, 16) );
|
||||||
|
SCursorSprite spriteCol; // the sprite + some additional information needed for cursors
|
||||||
|
spriteCol.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), iconRects, 200 );
|
||||||
|
spriteCol.HotSpot = position2d<s32>(7,7);
|
||||||
|
spriteCol.SpriteBank = SpriteBankIcons;
|
||||||
|
context.addIcon(L"crosshair_colored", spriteCol);
|
||||||
|
|
||||||
|
// Create some non-animated icons
|
||||||
|
rect<s32> rectIcon;
|
||||||
|
SCursorSprite spriteNonAnimated(SpriteBankIcons, 0, position2d<s32>(7,7));
|
||||||
|
|
||||||
|
rectIcon = rect<s32>(0,0, 16, 16);
|
||||||
|
spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
|
||||||
|
context.addIcon(L"crosshair_col1", spriteNonAnimated, false);
|
||||||
|
|
||||||
|
rectIcon = rect<s32>(16,0, 32, 16);
|
||||||
|
spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
|
||||||
|
context.addIcon(L"crosshair_col2", spriteNonAnimated, false);
|
||||||
|
|
||||||
|
rectIcon = rect<s32>(0,16, 16, 32);
|
||||||
|
spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
|
||||||
|
context.addIcon(L"crosshair_col3", spriteNonAnimated, false);
|
||||||
|
|
||||||
|
|
||||||
|
MyEventReceiver receiver(context);
|
||||||
|
device->setEventReceiver(&receiver);
|
||||||
|
|
||||||
|
while(device->run() && driver)
|
||||||
|
{
|
||||||
|
// if (device->isWindowActive())
|
||||||
|
{
|
||||||
|
u32 realTimeNow = device->getTimer()->getRealTime();
|
||||||
|
|
||||||
|
context.update();
|
||||||
|
|
||||||
|
driver->beginScene(true, true, SColor(0,200,200,200));
|
||||||
|
|
||||||
|
env->drawAll();
|
||||||
|
|
||||||
|
// draw custom sprite with Irrlicht functions for comparison. It should usually look the same as the cursors.
|
||||||
|
if ( context.SpriteBox )
|
||||||
|
{
|
||||||
|
s32 selectedSprite = context.SpriteBox->getSelected();
|
||||||
|
if ( selectedSprite >= 0 && context.Sprites[selectedSprite].SpriteId >= 0 )
|
||||||
|
{
|
||||||
|
SpriteBankIcons->draw2DSprite(u32(context.Sprites[selectedSprite].SpriteId), position2di(580, 140), 0, video::SColor(255, 255, 255, 255), 0, realTimeNow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
driver->endScene();
|
||||||
|
}
|
||||||
|
|
||||||
|
// By simulating bad fps we can find out if hardware-support for cusors works or not. If it works the cursor will move as usual,while it otherwise will just update with 2 fps now.
|
||||||
|
if ( context.SimulateBadFps )
|
||||||
|
{
|
||||||
|
device->sleep(500); // 2 fps
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
device->sleep(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
device->drop();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
**/
|
|
@ -74,7 +74,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Qu
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -83,7 +83,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Qua
|
||||||
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -165,16 +165,16 @@ Global
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32
|
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32
|
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32
|
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.ActiveCfg = Debug|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.ActiveCfg = Release|Win32
|
||||||
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug.ActiveCfg = Debug|Win32
|
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug.ActiveCfg = Debug|Win32
|
||||||
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug.Build.0 = Debug|Win32
|
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug.Build.0 = Debug|Win32
|
||||||
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release.ActiveCfg = Release|Win32
|
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release.ActiveCfg = Release|Win32
|
||||||
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release.Build.0 = Release|Win32
|
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release.Build.0 = Release|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug.ActiveCfg = Debug|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.Build.0 = Debug|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug.Build.0 = Debug|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Release.ActiveCfg = Release|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.Build.0 = Release|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Release.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
|
@ -52,7 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc8", "Demo\Demo_vc8.v
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc8", "16.Quake3MapShader\Quake3MapShader_vc8.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc8", "16.Quake3MapShader\Quake3MapShader_vc8.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc8", "19.MouseAndJoystick\MouseAndJoystick_vc8.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc8", "19.MouseAndJoystick\MouseAndJoystick_vc8.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc8", "20.ManagedLights\ManagedLights_vc8.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc8", "20.ManagedLights\ManagedLights_vc8.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
@ -66,6 +66,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc8", "21
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v8.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v8.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer_vc8", "22.MaterialViewer\MaterialViewer_vc8.vcproj", "{2856AB41-9BC5-4716-9B35-762A65F6F5D1}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc8", "23.SMeshHandling\SMeshHandling_vc8.vcproj", "{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc8", "24.CursorControl\CursorControl_vc8.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
|
@ -144,10 +150,10 @@ Global
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32
|
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32
|
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32
|
{EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32
|
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32
|
||||||
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
|
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
@ -160,6 +166,18 @@ Global
|
||||||
{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32
|
{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32
|
{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32
|
{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
# Visual C++ Express 2008
|
# Visual Studio 2008
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc9", "01.HelloWorld\HelloWorld_vc9.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc9", "01.HelloWorld\HelloWorld_vc9.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
||||||
|
@ -118,7 +118,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc9", "23.
|
||||||
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile_v9", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
|
@ -138,6 +138,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mesh Converter", "..\tools\
|
||||||
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "24.CursorControl\CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
|
@ -256,6 +258,10 @@ Global
|
||||||
{E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32
|
{E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32
|
{E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32
|
{E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -359,7 +359,7 @@ void CDemo::loadSceneData()
|
||||||
core::matrix4 m;
|
core::matrix4 m;
|
||||||
m.setTranslation(core::vector3df(-1300,-70,-1249));
|
m.setTranslation(core::vector3df(-1300,-70,-1249));
|
||||||
|
|
||||||
for ( i = 0; i!= scene::quake3::E_Q3_MESH_SIZE; ++i )
|
for ( i = 0; i != scene::quake3::E_Q3_MESH_SIZE; ++i )
|
||||||
sm->getMeshManipulator()->transform(quakeLevelMesh->getMesh(i), m);
|
sm->getMeshManipulator()->transform(quakeLevelMesh->getMesh(i), m);
|
||||||
|
|
||||||
quakeLevelNode = sm->addOctreeSceneNode(
|
quakeLevelNode = sm->addOctreeSceneNode(
|
||||||
|
|
|
@ -63,7 +63,7 @@ bool CMainMenu::run(bool& outFullscreen, bool& outMusic, bool& outShadows,
|
||||||
box->addItem(L"OpenGL 1.5");
|
box->addItem(L"OpenGL 1.5");
|
||||||
box->addItem(L"Direct3D 8.1");
|
box->addItem(L"Direct3D 8.1");
|
||||||
box->addItem(L"Direct3D 9.0c");
|
box->addItem(L"Direct3D 9.0c");
|
||||||
box->addItem(L"Burning's Video 0.44");
|
box->addItem(L"Burning's Video 0.47");
|
||||||
box->addItem(L"Irrlicht Software Renderer 1.0");
|
box->addItem(L"Irrlicht Software Renderer 1.0");
|
||||||
box->setSelected(selected);
|
box->setSelected(selected);
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@ endif
|
||||||
|
|
||||||
all: all_linux
|
all: all_linux
|
||||||
|
|
||||||
|
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
||||||
# target specific settings
|
# target specific settings
|
||||||
all_linux: SYSTEM=Linux
|
all_linux: SYSTEM=Linux
|
||||||
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
|
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
|
||||||
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
|
|
||||||
|
|
||||||
all_win32 clean_win32: SYSTEM=Win32-gcc
|
all_win32 clean_win32: SYSTEM=Win32-gcc
|
||||||
all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
|
all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_project_file>
|
||||||
|
<FileVersion major="1" minor="6" />
|
||||||
|
<Project>
|
||||||
|
<Option title="Irrlicht Tech Demo" />
|
||||||
|
<Option pch_mode="0" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Build>
|
||||||
|
<Target title="Windows">
|
||||||
|
<Option platforms="Windows;" />
|
||||||
|
<Option output="../../bin/Win32-gcc/Demo" prefix_auto="0" extension_auto="1" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Option projectResourceIncludeDirsRelation="1" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-W" />
|
||||||
|
<Add option="-g" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add library="Irrlicht" />
|
||||||
|
<Add directory="../../lib/Win32-gcc" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
<Target title="Linux">
|
||||||
|
<Option platforms="Unix;" />
|
||||||
|
<Option output="../../bin/Linux/Demo" prefix_auto="0" extension_auto="0" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-W" />
|
||||||
|
<Add option="-g" />
|
||||||
|
<Add option="-D_IRR_STATIC_LIB_" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add library="Xxf86vm" />
|
||||||
|
<Add library="Xcursor" />
|
||||||
|
<Add library="Irrlicht" />
|
||||||
|
<Add library="GL" />
|
||||||
|
<Add directory="../../lib/Linux" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
</Build>
|
||||||
|
<VirtualTargets>
|
||||||
|
<Add alias="All" targets="Windows;" />
|
||||||
|
</VirtualTargets>
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-Wall" />
|
||||||
|
<Add option="-g" />
|
||||||
|
<Add directory="../../include" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add library="Irrlicht" />
|
||||||
|
<Add directory="../../lib/gcc" />
|
||||||
|
</Linker>
|
||||||
|
<Unit filename="CDemo.cpp" />
|
||||||
|
<Unit filename="CDemo.h" />
|
||||||
|
<Unit filename="CMainMenu.cpp" />
|
||||||
|
<Unit filename="CMainMenu.h" />
|
||||||
|
<Unit filename="main.cpp" />
|
||||||
|
<Unit filename="resource.h" />
|
||||||
|
<Unit filename="resscript.rc">
|
||||||
|
<Option target="Windows" />
|
||||||
|
</Unit>
|
||||||
|
<Extensions>
|
||||||
|
<code_completion />
|
||||||
|
<debugger />
|
||||||
|
</Extensions>
|
||||||
|
</Project>
|
||||||
|
</CodeBlocks_project_file>
|
|
@ -47,10 +47,104 @@ namespace scene
|
||||||
can be loaded directly by Irrlicht */
|
can be loaded directly by Irrlicht */
|
||||||
EAMT_OCT,
|
EAMT_OCT,
|
||||||
|
|
||||||
|
//! Halflife MDL model file
|
||||||
|
EAMT_MDL_HALFLIFE,
|
||||||
|
|
||||||
//! generic skinned mesh
|
//! generic skinned mesh
|
||||||
EAMT_SKINNED
|
EAMT_SKINNED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//! Possible types of Animation Type
|
||||||
|
enum E_ANIMATION_TYPE
|
||||||
|
{
|
||||||
|
//! No Animation
|
||||||
|
EAMT_STILL,
|
||||||
|
//! From Start to End, then Stop ( Limited Line )
|
||||||
|
EAMT_WAYPOINT,
|
||||||
|
//! Linear Cycling Animation ( Sawtooth )
|
||||||
|
EAMT_LOOPING,
|
||||||
|
//! Linear bobbing ( Triangle )
|
||||||
|
EAMT_PINGPONG
|
||||||
|
};
|
||||||
|
|
||||||
|
//! Names for Animation Type
|
||||||
|
const c8* const MeshAnimationTypeNames[] =
|
||||||
|
{
|
||||||
|
"still",
|
||||||
|
"waypoint",
|
||||||
|
"looping",
|
||||||
|
"pingpong",
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//! Data for holding named Animation Info
|
||||||
|
struct KeyFrameInterpolation
|
||||||
|
{
|
||||||
|
core::stringc Name; // Name of the current Animation/Bone
|
||||||
|
E_ANIMATION_TYPE AnimationType; // Type of Animation ( looping, usw..)
|
||||||
|
|
||||||
|
f32 CurrentFrame; // Current Frame
|
||||||
|
s32 NextFrame; // Frame which will be used next. For blending
|
||||||
|
|
||||||
|
s32 StartFrame; // Absolute Frame where the current animation start
|
||||||
|
s32 Frames; // Relative Frames how much Frames this animation have
|
||||||
|
s32 LoopingFrames; // How much of Frames sould be looped
|
||||||
|
s32 EndFrame; // Absolute Frame where the current animation ends End = start + frames - 1
|
||||||
|
|
||||||
|
f32 FramesPerSecond; // Speed in Frames/Seconds the animation is played
|
||||||
|
f32 RelativeSpeed; // Factor Original fps is modified
|
||||||
|
|
||||||
|
u32 BeginTime; // Animation started at this thime
|
||||||
|
u32 EndTime; // Animation end at this time
|
||||||
|
u32 LastTime; // Last Keyframe was done at this time
|
||||||
|
|
||||||
|
KeyFrameInterpolation ( const c8 * name = "", s32 start = 0, s32 frames = 0, s32 loopingframes = 0,
|
||||||
|
f32 fps = 0.f, f32 relativefps = 1.f )
|
||||||
|
: Name ( name ), AnimationType ( loopingframes ? EAMT_LOOPING : EAMT_WAYPOINT),
|
||||||
|
CurrentFrame ( (f32) start ), NextFrame ( start ), StartFrame ( start ),
|
||||||
|
Frames ( frames ), LoopingFrames ( loopingframes ), EndFrame ( start + frames - 1 ),
|
||||||
|
FramesPerSecond ( fps ), RelativeSpeed ( relativefps ),
|
||||||
|
BeginTime ( 0 ), EndTime ( 0 ), LastTime ( 0 )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// linear search
|
||||||
|
bool operator == ( const KeyFrameInterpolation & other ) const
|
||||||
|
{
|
||||||
|
return Name.equals_ignore_case ( other.Name );
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//! a List holding named Animations
|
||||||
|
typedef core::array < KeyFrameInterpolation > IAnimationList;
|
||||||
|
|
||||||
|
//! a List holding named Skins
|
||||||
|
typedef core::array < core::stringc > ISkinList;
|
||||||
|
|
||||||
|
|
||||||
|
// Current Model per Body
|
||||||
|
struct SubModel
|
||||||
|
{
|
||||||
|
core::stringc name;
|
||||||
|
u32 startBuffer;
|
||||||
|
u32 endBuffer;
|
||||||
|
u32 state;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct BodyPart
|
||||||
|
{
|
||||||
|
core::stringc name;
|
||||||
|
u32 defaultModel;
|
||||||
|
core::array < SubModel > model;
|
||||||
|
};
|
||||||
|
//! a List holding named Models and SubModels
|
||||||
|
typedef core::array < BodyPart > IBodyList;
|
||||||
|
|
||||||
|
|
||||||
//! Interface for an animated mesh.
|
//! Interface for an animated mesh.
|
||||||
/** There are already simple implementations of this interface available so
|
/** There are already simple implementations of this interface available so
|
||||||
you don't have to implement this interface on your own if you need to:
|
you don't have to implement this interface on your own if you need to:
|
||||||
|
|
|
@ -14,6 +14,70 @@ namespace irr
|
||||||
namespace gui
|
namespace gui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class IGUISpriteBank;
|
||||||
|
|
||||||
|
//! Default icons for cursors
|
||||||
|
enum ECURSOR_ICON
|
||||||
|
{
|
||||||
|
// Following cursors might be system specific, or might use an Irrlicht icon-set. No guarantees so far.
|
||||||
|
ECI_NORMAL, // arrow
|
||||||
|
ECI_CROSS, // Crosshair
|
||||||
|
ECI_HAND, // Hand
|
||||||
|
ECI_HELP, // Arrow and question mark
|
||||||
|
ECI_IBEAM, // typical text-selection cursor
|
||||||
|
ECI_NO, // should not click icon
|
||||||
|
ECI_WAIT, // hourclass
|
||||||
|
ECI_SIZEALL, // arrow in all directions
|
||||||
|
ECI_SIZENESW, // resizes in direction north-east or south-west
|
||||||
|
ECI_SIZENWSE, // resizes in direction north-west or south-east
|
||||||
|
ECI_SIZENS, // resizes in direction north or south
|
||||||
|
ECI_SIZEWE, // resizes in direction west or east
|
||||||
|
ECI_UP, // up-arrow
|
||||||
|
|
||||||
|
// Implementer note: Should we add system specific cursors, which use guaranteed the system icons,
|
||||||
|
// then I would recommend using a naming scheme like ECI_W32_CROSS, ECI_X11_CROSSHAIR and adding those
|
||||||
|
// additionally.
|
||||||
|
|
||||||
|
ECI_COUNT // maximal of defined cursors. Note that higher values can be created at runtime
|
||||||
|
};
|
||||||
|
|
||||||
|
//! Names for ECURSOR_ICON
|
||||||
|
const c8* const GUICursorIconNames[ECI_COUNT+1] =
|
||||||
|
{
|
||||||
|
"normal",
|
||||||
|
"cross",
|
||||||
|
"hand",
|
||||||
|
"help",
|
||||||
|
"ibeam",
|
||||||
|
"no",
|
||||||
|
"wait",
|
||||||
|
"sizeall",
|
||||||
|
"sizenesw",
|
||||||
|
"sizenwse",
|
||||||
|
"sizens",
|
||||||
|
"sizewe",
|
||||||
|
"sizeup",
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
//! structure used to set sprites as cursors.
|
||||||
|
struct SCursorSprite
|
||||||
|
{
|
||||||
|
SCursorSprite()
|
||||||
|
: SpriteBank(0), SpriteId(-1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
SCursorSprite( gui::IGUISpriteBank * spriteBank, s32 spriteId, const core::position2d<s32> &hotspot=core::position2d<s32>(0,0) )
|
||||||
|
: SpriteBank(spriteBank), SpriteId(spriteId), HotSpot(hotspot)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
gui::IGUISpriteBank * SpriteBank;
|
||||||
|
s32 SpriteId;
|
||||||
|
core::position2d<s32> HotSpot;
|
||||||
|
};
|
||||||
|
|
||||||
//! Interface to manipulate the mouse cursor.
|
//! Interface to manipulate the mouse cursor.
|
||||||
class ICursorControl : public virtual IReferenceCounted
|
class ICursorControl : public virtual IReferenceCounted
|
||||||
{
|
{
|
||||||
|
@ -73,6 +137,28 @@ namespace gui
|
||||||
for example in an editor.
|
for example in an editor.
|
||||||
\param rect: A pointer to an reference rectangle or 0 to disable the reference rectangle.*/
|
\param rect: A pointer to an reference rectangle or 0 to disable the reference rectangle.*/
|
||||||
virtual void setReferenceRect(core::rect<s32>* rect=0) = 0;
|
virtual void setReferenceRect(core::rect<s32>* rect=0) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
//! Sets the active cursor icon
|
||||||
|
/** Setting cursor icons is so far only supported on Win32 and Linux */
|
||||||
|
virtual void setActiveIcon(ECURSOR_ICON iconId) {}
|
||||||
|
|
||||||
|
//! Gets the currently active icon
|
||||||
|
virtual ECURSOR_ICON getActiveIcon() const { return gui::ECI_NORMAL; }
|
||||||
|
|
||||||
|
//! Add a custom sprite as cursor icon.
|
||||||
|
/** \return Identification for the icon */
|
||||||
|
virtual ECURSOR_ICON addIcon(const gui::SCursorSprite& icon) { return gui::ECI_NORMAL; }
|
||||||
|
|
||||||
|
//! replace a cursor icon.
|
||||||
|
/** Changing cursor icons is so far only supported on Win32 and Linux
|
||||||
|
Note that this only changes the icons within your application, system cursors outside your
|
||||||
|
application will not be affected.
|
||||||
|
*/
|
||||||
|
virtual void changeIcon(ECURSOR_ICON iconId, const gui::SCursorSprite& sprite) {}
|
||||||
|
|
||||||
|
//! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work.
|
||||||
|
virtual core::dimension2di getSupportedIconSize() const { return core::dimension2di(0,0); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#define __I_EVENT_RECEIVER_H_INCLUDED__
|
#define __I_EVENT_RECEIVER_H_INCLUDED__
|
||||||
|
|
||||||
#include "ILogger.h"
|
#include "ILogger.h"
|
||||||
#include "position2d.h"
|
|
||||||
#include "Keycodes.h"
|
#include "Keycodes.h"
|
||||||
#include "irrString.h"
|
#include "irrString.h"
|
||||||
|
|
||||||
|
@ -246,9 +245,12 @@ namespace irr
|
||||||
//! A tree view node was expanded. See IGUITreeView::getLastEventNode().
|
//! A tree view node was expanded. See IGUITreeView::getLastEventNode().
|
||||||
EGET_TREEVIEW_NODE_EXPAND,
|
EGET_TREEVIEW_NODE_EXPAND,
|
||||||
|
|
||||||
//! A tree view node was collapsed. See IGUITreeView::getLastEventNode().
|
//! deprecated - use EGET_TREEVIEW_NODE_COLLAPSE instead
|
||||||
EGET_TREEVIEW_NODE_COLLAPS,
|
EGET_TREEVIEW_NODE_COLLAPS,
|
||||||
|
|
||||||
|
//! A tree view node was collapsed. See IGUITreeView::getLastEventNode().
|
||||||
|
EGET_TREEVIEW_NODE_COLLAPSE = EGET_TREEVIEW_NODE_COLLAPS,
|
||||||
|
|
||||||
//! No real event. Just for convenience to get number of events
|
//! No real event. Just for convenience to get number of events
|
||||||
EGET_COUNT
|
EGET_COUNT
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,9 @@ enum E_FILE_ARCHIVE_TYPE
|
||||||
//! A Tape ARchive
|
//! A Tape ARchive
|
||||||
EFAT_TAR = MAKE_IRR_ID('T','A','R', 0),
|
EFAT_TAR = MAKE_IRR_ID('T','A','R', 0),
|
||||||
|
|
||||||
|
//! A wad Archive, Quake2, Halflife
|
||||||
|
EFAT_WAD = MAKE_IRR_ID('W','A','D', 0),
|
||||||
|
|
||||||
//! The type of this archive is unknown
|
//! The type of this archive is unknown
|
||||||
EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
|
EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,12 @@ public:
|
||||||
\return The size of the file in bytes. */
|
\return The size of the file in bytes. */
|
||||||
virtual u32 getFileSize(u32 index) const = 0;
|
virtual u32 getFileSize(u32 index) const = 0;
|
||||||
|
|
||||||
|
//! Returns the file offset of a file in the file list, based on an index.
|
||||||
|
/** \param index is the zero based index of the file which should be returned.
|
||||||
|
The index must be less than the amount getFileCount() returns.
|
||||||
|
\return The size of the file in bytes. */
|
||||||
|
virtual u32 getFileOffset(u32 index) const = 0;
|
||||||
|
|
||||||
//! Returns the ID of a file in the file list, based on an index.
|
//! Returns the ID of a file in the file list, based on an index.
|
||||||
/** This optional ID can be used to link the file list entry to information held
|
/** This optional ID can be used to link the file list entry to information held
|
||||||
elsewhere. For example this could be an index in an IFileArchive, linking the entry
|
elsewhere. For example this could be an index in an IFileArchive, linking the entry
|
||||||
|
@ -71,9 +77,10 @@ public:
|
||||||
//! Add as a file or folder to the list
|
//! Add as a file or folder to the list
|
||||||
/** \param fullPath The file name including path, from the root of the file list.
|
/** \param fullPath The file name including path, from the root of the file list.
|
||||||
\param isDirectory True if this is a directory rather than a file.
|
\param isDirectory True if this is a directory rather than a file.
|
||||||
|
\param offset, The file offset inside an archive
|
||||||
\param size The size of the file in bytes.
|
\param size The size of the file in bytes.
|
||||||
\param id The ID of the file in the archive which owns it */
|
\param id The ID of the file in the archive which owns it */
|
||||||
virtual u32 addItem(const io::path& fullPath, u32 size, bool isDirectory, u32 id=0) = 0;
|
virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0) = 0;
|
||||||
|
|
||||||
//! Sorts the file list. You should call this after adding any items to the file list
|
//! Sorts the file list. You should call this after adding any items to the file list
|
||||||
virtual void sort() = 0;
|
virtual void sort() = 0;
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace irr
|
||||||
namespace gui
|
namespace gui
|
||||||
{
|
{
|
||||||
|
|
||||||
//! Standard file chooser dialog.
|
//! Standard color chooser dialog.
|
||||||
class IGUIColorSelectDialog : public IGUIElement
|
class IGUIColorSelectDialog : public IGUIElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -38,12 +38,19 @@ namespace gui
|
||||||
\param color: New color of the text. */
|
\param color: New color of the text. */
|
||||||
virtual void setOverrideColor(video::SColor color) = 0;
|
virtual void setOverrideColor(video::SColor color) = 0;
|
||||||
|
|
||||||
|
//! Gets the override color
|
||||||
|
virtual video::SColor const & getOverrideColor() const = 0;
|
||||||
|
|
||||||
//! Sets if the text should use the override color or the color in the gui skin.
|
//! Sets if the text should use the override color or the color in the gui skin.
|
||||||
/** \param enable: If set to true, the override color, which can be set
|
/** \param enable: If set to true, the override color, which can be set
|
||||||
with IGUIEditBox::setOverrideColor is used, otherwise the
|
with IGUIEditBox::setOverrideColor is used, otherwise the
|
||||||
EGDC_BUTTON_TEXT color of the skin. */
|
EGDC_BUTTON_TEXT color of the skin. */
|
||||||
virtual void enableOverrideColor(bool enable) = 0;
|
virtual void enableOverrideColor(bool enable) = 0;
|
||||||
|
|
||||||
|
//! Checks if an override color is enabled
|
||||||
|
/** \return true if the override color is enabled, false otherwise */
|
||||||
|
virtual bool isOverrideColorEnabled(void) const = 0;
|
||||||
|
|
||||||
//! Turns the border on or off
|
//! Turns the border on or off
|
||||||
/** \param border: true if you want the border to be drawn, false if not */
|
/** \param border: true if you want the border to be drawn, false if not */
|
||||||
virtual void setDrawBorder(bool border) = 0;
|
virtual void setDrawBorder(bool border) = 0;
|
||||||
|
|
|
@ -538,6 +538,27 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! Moves a child to the back, so it's siblings are drawn on top of it
|
||||||
|
/** \return True if successful, false if not. */
|
||||||
|
virtual bool bringToBack(IGUIElement* child)
|
||||||
|
{
|
||||||
|
core::list<IGUIElement*>::Iterator it = Children.begin();
|
||||||
|
if (child == (*it)) // already there
|
||||||
|
return true;
|
||||||
|
for (; it != Children.end(); ++it)
|
||||||
|
{
|
||||||
|
if (child == (*it))
|
||||||
|
{
|
||||||
|
Children.erase(it);
|
||||||
|
Children.push_front(child);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//! Returns list with children of this element
|
//! Returns list with children of this element
|
||||||
virtual const core::list<IGUIElement*>& getChildren() const
|
virtual const core::list<IGUIElement*>& getChildren() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,56 +22,70 @@ namespace gui
|
||||||
public:
|
public:
|
||||||
//! returns the owner (tree view) of this node
|
//! returns the owner (tree view) of this node
|
||||||
virtual IGUITreeView* getOwner() const = 0;
|
virtual IGUITreeView* getOwner() const = 0;
|
||||||
|
|
||||||
//! Returns the parent node of this node.
|
//! Returns the parent node of this node.
|
||||||
/** For the root node this will return 0. */
|
/** For the root node this will return 0. */
|
||||||
virtual IGUITreeViewNode* getParent() const = 0;
|
virtual IGUITreeViewNode* getParent() const = 0;
|
||||||
|
|
||||||
//! returns the text of the node
|
//! returns the text of the node
|
||||||
virtual const wchar_t* getText() const = 0;
|
virtual const wchar_t* getText() const = 0;
|
||||||
|
|
||||||
//! sets the text of the node
|
//! sets the text of the node
|
||||||
virtual void setText( const wchar_t* text ) = 0;
|
virtual void setText( const wchar_t* text ) = 0;
|
||||||
|
|
||||||
//! returns the icon text of the node
|
//! returns the icon text of the node
|
||||||
virtual const wchar_t* getIcon() const = 0;
|
virtual const wchar_t* getIcon() const = 0;
|
||||||
|
|
||||||
//! sets the icon text of the node
|
//! sets the icon text of the node
|
||||||
virtual void setIcon( const wchar_t* icon ) = 0;
|
virtual void setIcon( const wchar_t* icon ) = 0;
|
||||||
|
|
||||||
//! returns the image index of the node
|
//! returns the image index of the node
|
||||||
virtual u32 getImageIndex() const = 0;
|
virtual u32 getImageIndex() const = 0;
|
||||||
|
|
||||||
//! sets the image index of the node
|
//! sets the image index of the node
|
||||||
virtual void setImageIndex( u32 imageIndex ) = 0;
|
virtual void setImageIndex( u32 imageIndex ) = 0;
|
||||||
|
|
||||||
//! returns the image index of the node
|
//! returns the image index of the node
|
||||||
virtual u32 getSelectedImageIndex() const = 0;
|
virtual u32 getSelectedImageIndex() const = 0;
|
||||||
|
|
||||||
//! sets the image index of the node
|
//! sets the image index of the node
|
||||||
virtual void setSelectedImageIndex( u32 imageIndex ) = 0;
|
virtual void setSelectedImageIndex( u32 imageIndex ) = 0;
|
||||||
|
|
||||||
//! returns the user data (void*) of this node
|
//! returns the user data (void*) of this node
|
||||||
virtual void* getData() const = 0;
|
virtual void* getData() const = 0;
|
||||||
|
|
||||||
//! sets the user data (void*) of this node
|
//! sets the user data (void*) of this node
|
||||||
virtual void setData( void* data ) = 0;
|
virtual void setData( void* data ) = 0;
|
||||||
|
|
||||||
//! returns the user data2 (IReferenceCounted) of this node
|
//! returns the user data2 (IReferenceCounted) of this node
|
||||||
virtual IReferenceCounted* getData2() const = 0;
|
virtual IReferenceCounted* getData2() const = 0;
|
||||||
|
|
||||||
//! sets the user data2 (IReferenceCounted) of this node
|
//! sets the user data2 (IReferenceCounted) of this node
|
||||||
virtual void setData2( IReferenceCounted* data ) = 0;
|
virtual void setData2( IReferenceCounted* data ) = 0;
|
||||||
|
|
||||||
//! returns the child item count
|
//! returns the child item count
|
||||||
virtual u32 getChildCount() const = 0;
|
virtual u32 getChildCount() const = 0;
|
||||||
|
|
||||||
//! removes all childs (recursive) from this node
|
//! removes all children (recursive) from this node
|
||||||
virtual void clearChilds() = 0;
|
virtual void clearChildren() = 0;
|
||||||
|
|
||||||
|
//! removes all children (recursive) from this node
|
||||||
|
/** \deprecated Deprecated in 1.8, use clearChildren() instead. */
|
||||||
|
_IRR_DEPRECATED_ void clearChilds()
|
||||||
|
{
|
||||||
|
return clearChildren();
|
||||||
|
}
|
||||||
|
|
||||||
//! returns true if this node has child nodes
|
//! returns true if this node has child nodes
|
||||||
virtual bool hasChilds() const = 0;
|
virtual bool hasChildren() const = 0;
|
||||||
|
|
||||||
|
//! returns true if this node has child nodes
|
||||||
|
/** \deprecated Deprecated in 1.8, use hasChildren() instead. */
|
||||||
|
_IRR_DEPRECATED_ bool hasChilds() const
|
||||||
|
{
|
||||||
|
return hasChildren();
|
||||||
|
}
|
||||||
|
|
||||||
//! Adds a new node behind the last child node.
|
//! Adds a new node behind the last child node.
|
||||||
/** \param text text of the new node
|
/** \param text text of the new node
|
||||||
\param icon icon text of the new node
|
\param icon icon text of the new node
|
||||||
|
@ -133,13 +147,13 @@ namespace gui
|
||||||
const wchar_t* text, const wchar_t* icon = 0,
|
const wchar_t* text, const wchar_t* icon = 0,
|
||||||
s32 imageIndex=-1, s32 selectedImageIndex=-1,
|
s32 imageIndex=-1, s32 selectedImageIndex=-1,
|
||||||
void* data=0, IReferenceCounted* data2=0) = 0;
|
void* data=0, IReferenceCounted* data2=0) = 0;
|
||||||
|
|
||||||
//! Return the first child node from this node.
|
//! Return the first child node from this node.
|
||||||
/** \return The first child node or 0 if this node has no childs. */
|
/** \return The first child node or 0 if this node has no children. */
|
||||||
virtual IGUITreeViewNode* getFirstChild() const = 0;
|
virtual IGUITreeViewNode* getFirstChild() const = 0;
|
||||||
|
|
||||||
//! Return the last child node from this node.
|
//! Return the last child node from this node.
|
||||||
/** \return The last child node or 0 if this node has no childs. */
|
/** \return The last child node or 0 if this node has no children. */
|
||||||
virtual IGUITreeViewNode* getLastChild() const = 0;
|
virtual IGUITreeViewNode* getLastChild() const = 0;
|
||||||
|
|
||||||
//! Returns the previous sibling node from this node.
|
//! Returns the previous sibling node from this node.
|
||||||
|
@ -162,7 +176,7 @@ namespace gui
|
||||||
//! Deletes a child node.
|
//! Deletes a child node.
|
||||||
/** \return Returns true if the node was found as a child and is deleted. */
|
/** \return Returns true if the node was found as a child and is deleted. */
|
||||||
virtual bool deleteChild( IGUITreeViewNode* child ) = 0;
|
virtual bool deleteChild( IGUITreeViewNode* child ) = 0;
|
||||||
|
|
||||||
//! Moves a child node one position up.
|
//! Moves a child node one position up.
|
||||||
/** \return True if the node was found as achild node and was not already the first child. */
|
/** \return True if the node was found as achild node and was not already the first child. */
|
||||||
virtual bool moveChildUp( IGUITreeViewNode* child ) = 0;
|
virtual bool moveChildUp( IGUITreeViewNode* child ) = 0;
|
||||||
|
@ -171,30 +185,30 @@ namespace gui
|
||||||
/** \return True if the node was found as achild node and was not already the last child. */
|
/** \return True if the node was found as achild node and was not already the last child. */
|
||||||
virtual bool moveChildDown( IGUITreeViewNode* child ) = 0;
|
virtual bool moveChildDown( IGUITreeViewNode* child ) = 0;
|
||||||
|
|
||||||
//! Returns true if the node is expanded (childs are visible).
|
//! Returns true if the node is expanded (children are visible).
|
||||||
virtual bool getExpanded() const = 0;
|
virtual bool getExpanded() const = 0;
|
||||||
|
|
||||||
//! Sets if the node is expanded.
|
//! Sets if the node is expanded.
|
||||||
virtual void setExpanded( bool expanded ) = 0;
|
virtual void setExpanded( bool expanded ) = 0;
|
||||||
|
|
||||||
//! Returns true if the node is currently selected.
|
//! Returns true if the node is currently selected.
|
||||||
virtual bool getSelected() const = 0;
|
virtual bool getSelected() const = 0;
|
||||||
|
|
||||||
//! Sets this node as selected.
|
//! Sets this node as selected.
|
||||||
virtual void setSelected( bool selected ) = 0;
|
virtual void setSelected( bool selected ) = 0;
|
||||||
|
|
||||||
//! Returns true if this node is the root node.
|
//! Returns true if this node is the root node.
|
||||||
virtual bool isRoot() const = 0;
|
virtual bool isRoot() const = 0;
|
||||||
|
|
||||||
//! Returns the level of this node.
|
//! Returns the level of this node.
|
||||||
/** The root node has level 0. Direct childs of the root has level 1 ... */
|
/** The root node has level 0. Direct children of the root has level 1 ... */
|
||||||
virtual s32 getLevel() const = 0;
|
virtual s32 getLevel() const = 0;
|
||||||
|
|
||||||
//! Returns true if this node is visible (all parents are expanded).
|
//! Returns true if this node is visible (all parents are expanded).
|
||||||
virtual bool isVisible() const = 0;
|
virtual bool isVisible() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! Default tree view GUI element.
|
//! Default tree view GUI element.
|
||||||
/** Displays a windows like tree buttons to expand/collaps the child
|
/** Displays a windows like tree buttons to expand/collaps the child
|
||||||
nodes of an node and optional tree lines. Each node consits of an
|
nodes of an node and optional tree lines. Each node consits of an
|
||||||
|
@ -215,7 +229,7 @@ namespace gui
|
||||||
|
|
||||||
//! returns true if the tree lines are visible
|
//! returns true if the tree lines are visible
|
||||||
virtual bool getLinesVisible() const = 0;
|
virtual bool getLinesVisible() const = 0;
|
||||||
|
|
||||||
//! sets if the tree lines are visible
|
//! sets if the tree lines are visible
|
||||||
/** \param visible true for visible, false for invisible */
|
/** \param visible true for visible, false for invisible */
|
||||||
virtual void setLinesVisible( bool visible ) = 0;
|
virtual void setLinesVisible( bool visible ) = 0;
|
||||||
|
@ -228,20 +242,20 @@ namespace gui
|
||||||
strings defined in GUIIcons.h can be used.
|
strings defined in GUIIcons.h can be used.
|
||||||
*/
|
*/
|
||||||
virtual void setIconFont( IGUIFont* font ) = 0;
|
virtual void setIconFont( IGUIFont* font ) = 0;
|
||||||
|
|
||||||
//! Sets the image list which should be used for the image and selected image of every node.
|
//! Sets the image list which should be used for the image and selected image of every node.
|
||||||
/** The default is 0 (no images). */
|
/** The default is 0 (no images). */
|
||||||
virtual void setImageList( IGUIImageList* imageList ) = 0;
|
virtual void setImageList( IGUIImageList* imageList ) = 0;
|
||||||
|
|
||||||
//! Returns the image list which is used for the nodes.
|
//! Returns the image list which is used for the nodes.
|
||||||
virtual IGUIImageList* getImageList() const = 0;
|
virtual IGUIImageList* getImageList() const = 0;
|
||||||
|
|
||||||
//! Sets if the image is left of the icon. Default is true.
|
//! Sets if the image is left of the icon. Default is true.
|
||||||
virtual void setImageLeftOfIcon( bool bLeftOf ) = 0;
|
virtual void setImageLeftOfIcon( bool bLeftOf ) = 0;
|
||||||
|
|
||||||
//! Returns if the Image is left of the icon. Default is true.
|
//! Returns if the Image is left of the icon. Default is true.
|
||||||
virtual bool getImageLeftOfIcon() const = 0;
|
virtual bool getImageLeftOfIcon() const = 0;
|
||||||
|
|
||||||
//! Returns the node which is associated to the last event.
|
//! Returns the node which is associated to the last event.
|
||||||
/** This pointer is only valid inside the OnEvent call! */
|
/** This pointer is only valid inside the OnEvent call! */
|
||||||
virtual IGUITreeViewNode* getLastEventNode() const = 0;
|
virtual IGUITreeViewNode* getLastEventNode() const = 0;
|
||||||
|
|
|
@ -15,50 +15,6 @@ namespace irr
|
||||||
namespace video
|
namespace video
|
||||||
{
|
{
|
||||||
|
|
||||||
//! An enum for the color format of textures used by the Irrlicht Engine.
|
|
||||||
/** A color format specifies how color information is stored. */
|
|
||||||
enum ECOLOR_FORMAT
|
|
||||||
{
|
|
||||||
//! 16 bit color format used by the software driver.
|
|
||||||
/** It is thus preferred by all other irrlicht engine video drivers.
|
|
||||||
There are 5 bits for every color component, and a single bit is left
|
|
||||||
for alpha information. */
|
|
||||||
ECF_A1R5G5B5 = 0,
|
|
||||||
|
|
||||||
//! Standard 16 bit color format.
|
|
||||||
ECF_R5G6B5,
|
|
||||||
|
|
||||||
//! 24 bit color, no alpha channel, but 8 bit for red, green and blue.
|
|
||||||
ECF_R8G8B8,
|
|
||||||
|
|
||||||
//! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.
|
|
||||||
ECF_A8R8G8B8,
|
|
||||||
|
|
||||||
/** Floating Point formats. The following formats may only be used for render target textures. */
|
|
||||||
|
|
||||||
//! 16 bit floating point format using 16 bits for the red channel.
|
|
||||||
ECF_R16F,
|
|
||||||
|
|
||||||
//! 32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel.
|
|
||||||
ECF_G16R16F,
|
|
||||||
|
|
||||||
//! 64 bit floating point format 16 bits are used for the red, green, blue and alpha channels.
|
|
||||||
ECF_A16B16G16R16F,
|
|
||||||
|
|
||||||
//! 32 bit floating point format using 32 bits for the red channel.
|
|
||||||
ECF_R32F,
|
|
||||||
|
|
||||||
//! 64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel.
|
|
||||||
ECF_G32R32F,
|
|
||||||
|
|
||||||
//! 128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels.
|
|
||||||
ECF_A32B32G32R32F,
|
|
||||||
|
|
||||||
//! Unknown color format:
|
|
||||||
ECF_UNKNOWN
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//! Interface for software image data.
|
//! Interface for software image data.
|
||||||
/** Image loaders create these images from files. IVideoDrivers convert
|
/** Image loaders create these images from files. IVideoDrivers convert
|
||||||
these images into their (hardware) textures.
|
these images into their (hardware) textures.
|
||||||
|
|
|
@ -11,18 +11,25 @@ namespace irr
|
||||||
{
|
{
|
||||||
|
|
||||||
//! Possible log levels.
|
//! Possible log levels.
|
||||||
|
//! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing.
|
||||||
|
//! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE
|
||||||
|
//! messages are never filtered and always printed.
|
||||||
enum ELOG_LEVEL
|
enum ELOG_LEVEL
|
||||||
{
|
{
|
||||||
//! High log level, warnings, errors and important information texts are printed out.
|
//! Used for printing information helpful in debugging
|
||||||
ELL_INFORMATION = 0,
|
ELL_DEBUG,
|
||||||
|
|
||||||
//! Default log level, warnings and errors are printed out
|
//! Useful information to print. For example hardware infos or something started/stopped.
|
||||||
|
ELL_INFORMATION,
|
||||||
|
|
||||||
|
//! Warnings that something isn't as expected and can cause oddities
|
||||||
ELL_WARNING,
|
ELL_WARNING,
|
||||||
|
|
||||||
//! Low log level, only errors are printed into the log
|
//! Something did go wrong.
|
||||||
ELL_ERROR,
|
ELL_ERROR,
|
||||||
|
|
||||||
//! Nothing is printed out to the log
|
//! Logs with ELL_NONE will never be filtered.
|
||||||
|
//! And used as filter it will remove all logging except ELL_NONE messages.
|
||||||
ELL_NONE
|
ELL_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ namespace scene
|
||||||
parameters) the position of the collision, and the triangle that was hit.
|
parameters) the position of the collision, and the triangle that was hit.
|
||||||
|
|
||||||
All scene nodes in the hierarchy tree under the specified node are checked. Only
|
All scene nodes in the hierarchy tree under the specified node are checked. Only
|
||||||
notes that are visible, with an ID that matches at least one bit in the supplied
|
nodes that are visible, with an ID that matches at least one bit in the supplied
|
||||||
bitmask, and which have a triangle selector are considered as candidates for being hit.
|
bitmask, and which have a triangle selector are considered as candidates for being hit.
|
||||||
You do not have to build a meta triangle selector; the individual triangle selectors
|
You do not have to build a meta triangle selector; the individual triangle selectors
|
||||||
of each candidate scene node are used automatically.
|
of each candidate scene node are used automatically.
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace scene
|
||||||
//! Returns the last triangle that caused a collision
|
//! Returns the last triangle that caused a collision
|
||||||
virtual const core::triangle3df & getCollisionTriangle() const = 0;
|
virtual const core::triangle3df & getCollisionTriangle() const = 0;
|
||||||
|
|
||||||
//! Returns the position that the target node will be moved to, unless the collision is consumed in a callback).
|
//! Returns the position that the target node will be moved to, unless the collision is consumed in a callback.
|
||||||
/**
|
/**
|
||||||
If you have a collision callback registered, and it consumes the collision, then the
|
If you have a collision callback registered, and it consumes the collision, then the
|
||||||
node will ignore the collision and will not stop at this position. Instead, it will
|
node will ignore the collision and will not stop at this position. Instead, it will
|
||||||
|
|
|
@ -127,7 +127,7 @@ headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one.
|
||||||
#if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK))
|
#if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK))
|
||||||
|
|
||||||
//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004
|
//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004
|
||||||
//#define _IRR_COMPILE_WITH_DIRECT3D_8_
|
// #define _IRR_COMPILE_WITH_DIRECT3D_8_
|
||||||
#define _IRR_COMPILE_WITH_DIRECT3D_9_
|
#define _IRR_COMPILE_WITH_DIRECT3D_9_
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -183,9 +183,11 @@ define out. */
|
||||||
|
|
||||||
//! On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags
|
//! On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags
|
||||||
//! to remove the dependencies such that Irrlicht will compile on those systems, too.
|
//! to remove the dependencies such that Irrlicht will compile on those systems, too.
|
||||||
|
//! If you don't need colored cursors you can also disable the Xcursor extension
|
||||||
#if defined(_IRR_LINUX_PLATFORM_) && defined(_IRR_COMPILE_WITH_X11_)
|
#if defined(_IRR_LINUX_PLATFORM_) && defined(_IRR_COMPILE_WITH_X11_)
|
||||||
#define _IRR_LINUX_X11_VIDMODE_
|
#define _IRR_LINUX_X11_VIDMODE_
|
||||||
//#define _IRR_LINUX_X11_RANDR_
|
//#define _IRR_LINUX_X11_RANDR_
|
||||||
|
#define _IRR_LINUX_XCURSOR_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! Define _IRR_COMPILE_WITH_GUI_ to compile the engine with the built-in GUI
|
//! Define _IRR_COMPILE_WITH_GUI_ to compile the engine with the built-in GUI
|
||||||
|
@ -290,12 +292,12 @@ B3D, MS3D or X meshes */
|
||||||
|
|
||||||
//! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files
|
//! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files
|
||||||
#define _IRR_COMPILE_WITH_IRR_MESH_LOADER_
|
#define _IRR_COMPILE_WITH_IRR_MESH_LOADER_
|
||||||
|
//! Define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ if you want to load Halflife animated files
|
||||||
|
#define _IRR_COMPILE_WITH_HALFLIFE_LOADER_
|
||||||
//! Define _IRR_COMPILE_WITH_MD2_LOADER_ if you want to load Quake 2 animated files
|
//! Define _IRR_COMPILE_WITH_MD2_LOADER_ if you want to load Quake 2 animated files
|
||||||
#define _IRR_COMPILE_WITH_MD2_LOADER_
|
#define _IRR_COMPILE_WITH_MD2_LOADER_
|
||||||
//! Define _IRR_COMPILE_WITH_MD3_LOADER_ if you want to load Quake 3 animated files
|
//! Define _IRR_COMPILE_WITH_MD3_LOADER_ if you want to load Quake 3 animated files
|
||||||
#define _IRR_COMPILE_WITH_MD3_LOADER_
|
#define _IRR_COMPILE_WITH_MD3_LOADER_
|
||||||
|
|
||||||
//! Define _IRR_COMPILE_WITH_3DS_LOADER_ if you want to load 3D Studio Max files
|
//! Define _IRR_COMPILE_WITH_3DS_LOADER_ if you want to load 3D Studio Max files
|
||||||
#define _IRR_COMPILE_WITH_3DS_LOADER_
|
#define _IRR_COMPILE_WITH_3DS_LOADER_
|
||||||
//! Define _IRR_COMPILE_WITH_COLLADA_LOADER_ if you want to load Collada files
|
//! Define _IRR_COMPILE_WITH_COLLADA_LOADER_ if you want to load Collada files
|
||||||
|
@ -345,10 +347,19 @@ B3D, MS3D or X meshes */
|
||||||
#define _IRR_COMPILE_WITH_PPM_LOADER_
|
#define _IRR_COMPILE_WITH_PPM_LOADER_
|
||||||
//! Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files
|
//! Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files
|
||||||
#define _IRR_COMPILE_WITH_PSD_LOADER_
|
#define _IRR_COMPILE_WITH_PSD_LOADER_
|
||||||
|
//! Define _IRR_COMPILE_WITH_DDS_LOADER_ if you want to load .dds files
|
||||||
|
// Outcommented because
|
||||||
|
// a) it doesn't compile on 64-bit currently
|
||||||
|
// b) anyone enabling it should be aware that S3TC compression algorithm which might be used in that loader
|
||||||
|
// is patented in the US by S3 and they do collect license fees when it's used in applications.
|
||||||
|
// So if you are unfortunate enough to develop applications for US market and their broken patent system be careful.
|
||||||
|
// #define _IRR_COMPILE_WITH_DDS_LOADER_
|
||||||
//! Define _IRR_COMPILE_WITH_TGA_LOADER_ if you want to load .tga files
|
//! Define _IRR_COMPILE_WITH_TGA_LOADER_ if you want to load .tga files
|
||||||
#define _IRR_COMPILE_WITH_TGA_LOADER_
|
#define _IRR_COMPILE_WITH_TGA_LOADER_
|
||||||
//! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files
|
//! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files
|
||||||
#define _IRR_COMPILE_WITH_WAL_LOADER_
|
#define _IRR_COMPILE_WITH_WAL_LOADER_
|
||||||
|
//! Define _IRR_COMPILE_WITH_LMP_LOADER_ if you want to load .lmp files
|
||||||
|
#define _IRR_COMPILE_WITH_LMP_LOADER_
|
||||||
//! Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files
|
//! Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files
|
||||||
#define _IRR_COMPILE_WITH_RGB_LOADER_
|
#define _IRR_COMPILE_WITH_RGB_LOADER_
|
||||||
|
|
||||||
|
@ -407,6 +418,8 @@ currently only supports zip archives, though. */
|
||||||
#define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
|
#define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
|
||||||
//! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives
|
//! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives
|
||||||
#define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
|
#define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
|
||||||
|
//! Define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ if you want to open WAD archives
|
||||||
|
#define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
|
||||||
|
|
||||||
//! Set FPU settings
|
//! Set FPU settings
|
||||||
/** Irrlicht should use approximate float and integer fpu techniques
|
/** Irrlicht should use approximate float and integer fpu techniques
|
||||||
|
|
115
include/SColor.h
115
include/SColor.h
|
@ -12,6 +12,50 @@ namespace irr
|
||||||
{
|
{
|
||||||
namespace video
|
namespace video
|
||||||
{
|
{
|
||||||
|
//! An enum for the color format of textures used by the Irrlicht Engine.
|
||||||
|
/** A color format specifies how color information is stored. */
|
||||||
|
enum ECOLOR_FORMAT
|
||||||
|
{
|
||||||
|
//! 16 bit color format used by the software driver.
|
||||||
|
/** It is thus preferred by all other irrlicht engine video drivers.
|
||||||
|
There are 5 bits for every color component, and a single bit is left
|
||||||
|
for alpha information. */
|
||||||
|
ECF_A1R5G5B5 = 0,
|
||||||
|
|
||||||
|
//! Standard 16 bit color format.
|
||||||
|
ECF_R5G6B5,
|
||||||
|
|
||||||
|
//! 24 bit color, no alpha channel, but 8 bit for red, green and blue.
|
||||||
|
ECF_R8G8B8,
|
||||||
|
|
||||||
|
//! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.
|
||||||
|
ECF_A8R8G8B8,
|
||||||
|
|
||||||
|
/** Floating Point formats. The following formats may only be used for render target textures. */
|
||||||
|
|
||||||
|
//! 16 bit floating point format using 16 bits for the red channel.
|
||||||
|
ECF_R16F,
|
||||||
|
|
||||||
|
//! 32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel.
|
||||||
|
ECF_G16R16F,
|
||||||
|
|
||||||
|
//! 64 bit floating point format 16 bits are used for the red, green, blue and alpha channels.
|
||||||
|
ECF_A16B16G16R16F,
|
||||||
|
|
||||||
|
//! 32 bit floating point format using 32 bits for the red channel.
|
||||||
|
ECF_R32F,
|
||||||
|
|
||||||
|
//! 64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel.
|
||||||
|
ECF_G32R32F,
|
||||||
|
|
||||||
|
//! 128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels.
|
||||||
|
ECF_A32B32G32R32F,
|
||||||
|
|
||||||
|
//! Unknown color format:
|
||||||
|
ECF_UNKNOWN
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//! Creates a 16 bit A1R5G5B5 color
|
//! Creates a 16 bit A1R5G5B5 color
|
||||||
inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a=0xFF)
|
inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a=0xFF)
|
||||||
{
|
{
|
||||||
|
@ -327,6 +371,77 @@ namespace video
|
||||||
getBlue() * mul0 + c1.getBlue() * mul1 + c2.getBlue() * mul2 ), 0, 255 ));
|
getBlue() * mul0 + c1.getBlue() * mul1 + c2.getBlue() * mul2 ), 0, 255 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! set the color by expecting data in the given format
|
||||||
|
/** \param data: must point to valid memory containing color information in the given format
|
||||||
|
\param format: tells the format in which data is available
|
||||||
|
*/
|
||||||
|
void setData(const void *data, ECOLOR_FORMAT format)
|
||||||
|
{
|
||||||
|
switch (format)
|
||||||
|
{
|
||||||
|
case ECF_A1R5G5B5:
|
||||||
|
color = A1R5G5B5toA8R8G8B8(*(u16*)data);
|
||||||
|
break;
|
||||||
|
case ECF_R5G6B5:
|
||||||
|
color = R5G6B5toA8R8G8B8(*(u16*)data);
|
||||||
|
break;
|
||||||
|
case ECF_A8R8G8B8:
|
||||||
|
color = *(u32*)data;
|
||||||
|
break;
|
||||||
|
case ECF_R8G8B8:
|
||||||
|
{
|
||||||
|
u8* p = (u8*)data;
|
||||||
|
set(255, p[0],p[1],p[2]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Write the color to data in the defined format
|
||||||
|
/** \param data: target to write the color. Must contain sufficiently large memory to receive the number of bytes neede for format
|
||||||
|
\param format: tells the format used to write the color into data
|
||||||
|
*/
|
||||||
|
void getData(void *data, ECOLOR_FORMAT format)
|
||||||
|
{
|
||||||
|
switch(format)
|
||||||
|
{
|
||||||
|
case ECF_A1R5G5B5:
|
||||||
|
{
|
||||||
|
u16 * dest = (u16*)data;
|
||||||
|
*dest = video::A8R8G8B8toA1R5G5B5( color );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ECF_R5G6B5:
|
||||||
|
{
|
||||||
|
u16 * dest = (u16*)data;
|
||||||
|
*dest = video::A8R8G8B8toR5G6B5( color );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ECF_R8G8B8:
|
||||||
|
{
|
||||||
|
u8* dest = (u8*)data;
|
||||||
|
dest[0] = (u8)getRed();
|
||||||
|
dest[1] = (u8)getGreen();
|
||||||
|
dest[2] = (u8)getBlue();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ECF_A8R8G8B8:
|
||||||
|
{
|
||||||
|
u32 * dest = (u32*)data;
|
||||||
|
*dest = color;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//! color in A8R8G8B8 Format
|
//! color in A8R8G8B8 Format
|
||||||
u32 color;
|
u32 color;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace irr
|
||||||
EventReceiver(0),
|
EventReceiver(0),
|
||||||
WindowId(0),
|
WindowId(0),
|
||||||
LoggingLevel(ELL_INFORMATION),
|
LoggingLevel(ELL_INFORMATION),
|
||||||
|
DisplayAdapter(0),
|
||||||
SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
|
SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -64,6 +65,7 @@ namespace irr
|
||||||
EventReceiver = other.EventReceiver;
|
EventReceiver = other.EventReceiver;
|
||||||
WindowId = other.WindowId;
|
WindowId = other.WindowId;
|
||||||
LoggingLevel = other.LoggingLevel;
|
LoggingLevel = other.LoggingLevel;
|
||||||
|
DisplayAdapter = other.DisplayAdapter;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,6 +241,10 @@ namespace irr
|
||||||
*/
|
*/
|
||||||
ELOG_LEVEL LoggingLevel;
|
ELOG_LEVEL LoggingLevel;
|
||||||
|
|
||||||
|
//! Allows to select which graphic card is used for rendering when more than one card is in the system.
|
||||||
|
/** So far only supported on D3D */
|
||||||
|
u32 DisplayAdapter;
|
||||||
|
|
||||||
//! Don't use or change this parameter.
|
//! Don't use or change this parameter.
|
||||||
/** Always set it to IRRLICHT_SDK_VERSION, which is done by default.
|
/** Always set it to IRRLICHT_SDK_VERSION, which is done by default.
|
||||||
This is needed for sdk version checks. */
|
This is needed for sdk version checks. */
|
||||||
|
|
|
@ -78,7 +78,7 @@ struct SLight
|
||||||
/** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */
|
/** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */
|
||||||
core::vector3df Direction;
|
core::vector3df Direction;
|
||||||
|
|
||||||
//! Read-ONLY! Radius of light. Everything within this radius be be lighted.
|
//! Read-ONLY! Radius of light. Everything within this radius will be lighted.
|
||||||
f32 Radius;
|
f32 Radius;
|
||||||
|
|
||||||
//! Read-ONLY! Type of the light. Default: ELT_POINT
|
//! Read-ONLY! Type of the light. Default: ELT_POINT
|
||||||
|
|
|
@ -33,6 +33,16 @@ namespace scene
|
||||||
MeshBuffers[i]->drop();
|
MeshBuffers[i]->drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! clean mesh
|
||||||
|
virtual void clear()
|
||||||
|
{
|
||||||
|
for (u32 i=0; i<MeshBuffers.size(); ++i)
|
||||||
|
MeshBuffers[i]->drop();
|
||||||
|
MeshBuffers.clear();
|
||||||
|
BoundingBox.reset ( 0.f, 0.f, 0.f );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//! returns amount of mesh buffers.
|
//! returns amount of mesh buffers.
|
||||||
virtual u32 getMeshBufferCount() const
|
virtual u32 getMeshBufferCount() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,6 +138,39 @@ inline s32 isInSameDirectory ( const io::path& path, const io::path& file )
|
||||||
return subB - subA;
|
return subB - subA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// splits a path into components
|
||||||
|
static inline void splitFilename( const io::path &name, io::path *path,io::path* filename, io::path* extension,bool make_lower = false )
|
||||||
|
{
|
||||||
|
s32 i = name.size();
|
||||||
|
s32 extpos = i;
|
||||||
|
|
||||||
|
// search for path separator or beginning
|
||||||
|
while ( i >= 0 )
|
||||||
|
{
|
||||||
|
if ( name[i] == '.' )
|
||||||
|
{
|
||||||
|
extpos = i;
|
||||||
|
if ( extension )
|
||||||
|
*extension = name.subString ( extpos + 1, name.size() - (extpos + 1), make_lower );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if ( name[i] == '/' || name[i] == '\\' )
|
||||||
|
{
|
||||||
|
if ( filename )
|
||||||
|
*filename = name.subString ( i + 1, extpos - (i + 1), make_lower );
|
||||||
|
if ( path )
|
||||||
|
{
|
||||||
|
*path = name.subString ( 0, i + 1, make_lower );
|
||||||
|
path->replace ( '\\', '/' );
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
i -= 1;
|
||||||
|
}
|
||||||
|
if ( filename )
|
||||||
|
*filename = name.subString ( 0, extpos, make_lower );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//! some standard function ( to remove dependencies )
|
//! some standard function ( to remove dependencies )
|
||||||
#undef isdigit
|
#undef isdigit
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue