- Merged rev 5212-5219 from trunk.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5220 dfc29bdd-3216-0410-991c-e03cc46cb475
master
nadro 2015-12-15 21:06:53 +00:00
parent e6fe1abc16
commit e604a608eb
35 changed files with 985 additions and 571 deletions

View File

@ -8,6 +8,7 @@ Changes in ogl-es (not yet released - will be merged with trunk at some point)
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- Add multibyteToWString wrapper functions around mbstowcs which work with Irrlicht string class.
- Fix: addFileArchive now grab()'s the archive when you pass one in by pointer. - Fix: addFileArchive now grab()'s the archive when you pass one in by pointer.
- Fix: Prevent division by 0 in CGUIScrollBar::setPos - Fix: Prevent division by 0 in CGUIScrollBar::setPos
- Fix: Add missing serialization to CSceneNodeAnimatorCameraFPS and CSceneNodeAnimatorCameraMaya - Fix: Add missing serialization to CSceneNodeAnimatorCameraFPS and CSceneNodeAnimatorCameraMaya

View File

@ -12,35 +12,25 @@ IrrlichtHome := ../..
BinPath = ../../bin/$(SYSTEM) BinPath = ../../bin/$(SYSTEM)
# general compiler settings (might need to be set when compiling the lib, too) # general compiler settings (might need to be set when compiling the lib, too)
# preprocessor flags, e.g. defines and include paths CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
USERCPPFLAGS = ifndef NDEBUG
# compiler flags such as optimization flags CXXFLAGS += -g -Wall
USERCXXFLAGS = -O3 -ffast-math else
#USERCXXFLAGS = -g -Wall CXXFLAGS += -O3
# linker flags such as additional libraries and link paths endif
USERLDFLAGS =
####
#no changes necessary below this line
####
CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
CXXFLAGS = $(USERCXXFLAGS)
LDFLAGS = $(USERLDFLAGS)
#default target is Linux #default target is Linux
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 all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht 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: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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
static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lm all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = $(BinPath)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
@ -64,4 +54,3 @@ endif
ifeq ($(HOSTTYPE), sun4) ifeq ($(HOSTTYPE), sun4)
LDFLAGS += -lrt LDFLAGS += -lrt
endif endif

View File

@ -1,32 +1,38 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 02.Quake3Map
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 02.Quake3Map
#CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
OGLESLIBS := -lEGL -lGLESv1_CM -lGLESv2
# target specific settings # target specific settings
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor $(OGLESLIBS) all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm all_win32 clean_win32 static_win32: SUF=.exe
static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
static_win32 all_win32 clean_win32: SYSTEM=Win32-gcc all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32 all_win32 clean_win32: SUF=.exe static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32 static_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
@ -38,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 static_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 03.CustomSceneNode
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 03.CustomSceneNode
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,33 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 04.Movement
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 04.Movement
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SYSTEM=Win32-gcc static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32 clean_win32: SUF=.exe all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -37,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,33 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 05.UserInterface
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 05.UserInterface
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -37,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 06.2DGraphics
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 06.2DGraphics
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 07.Collision
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 07.Collision
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 08.SpecialFX
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 08.SpecialFX
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 09.Meshviewer
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 09.Meshviewer
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 10.Shaders
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 10.Shaders
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 11.PerPixelLighting
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 11.PerPixelLighting
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 12.TerrainRendering
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 12.TerrainRendering
#CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 13.RenderToTexture
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 13.RenderToTexture
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 14.Win32Window
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 14.Win32Window
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 15.LoadIrrFile
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 15.LoadIrrFile
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 16.Quake3MapShader
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 16.Quake3MapShader
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 18.SplitScreen
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 18.SplitScreen
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,33 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 19.MouseAndJoystick
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 19.MouseAndJoystick
#CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SYSTEM=Win32-gcc static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32 clean_win32: SUF=.exe all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -37,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,33 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 20.ManagedLights
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 20.ManagedLights
#CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SYSTEM=Win32-gcc static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32 clean_win32: SUF=.exe all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -37,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 21.Quake3Explorer
Sources = main.cpp sound.cpp q3factory.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 21.Quake3Explorer
#CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
CXXFLAGS = -g -Wall Sources := main.cpp sound.cpp q3factory.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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
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 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1347,7 +1347,7 @@ bool CQuake3EventHandler::OnEvent(const SEvent& eve)
else else
if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_SELECTED ) if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_SELECTED )
{ {
AddArchive ( gui.ArchiveFileOpen->getFileName() ); AddArchive ( gui.ArchiveFileOpen->getFileNameP() );
gui.ArchiveFileOpen = 0; gui.ArchiveFileOpen = 0;
} }
else else

View File

@ -1,31 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 22.MaterialViewer
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 22.MaterialViewer
#CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
# target specific settings # target specific settings
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -35,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -1,31 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 23.SMeshHandling
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 23.SMeshHandling
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
# target specific settings # target specific settings
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SYSTEM=Win32-gcc all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SUF=.exe static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -35,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -12,34 +12,25 @@ IrrlichtHome := ../..
BinPath = ../../bin/$(SYSTEM) BinPath = ../../bin/$(SYSTEM)
# general compiler settings (might need to be set when compiling the lib, too) # general compiler settings (might need to be set when compiling the lib, too)
# preprocessor flags, e.g. defines and include paths CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
USERCPPFLAGS = ifndef NDEBUG
# compiler flags such as optimization flags CXXFLAGS += -g -Wall
USERCXXFLAGS = -O3 -ffast-math else
#USERCXXFLAGS = -g -Wall CXXFLAGS += -O3
# linker flags such as additional libraries and link paths endif
USERLDFLAGS =
####
#no changes necessary below this line
####
CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
CXXFLAGS = $(USERCXXFLAGS)
LDFLAGS = $(USERLDFLAGS)
#default target is Linux #default target is Linux
all: all_linux all: all_linux
# target specific settings # target specific settings
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht 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: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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
static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lm all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = $(BinPath)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
@ -63,4 +54,3 @@ endif
ifeq ($(HOSTTYPE), sun4) ifeq ($(HOSTTYPE), sun4)
LDFLAGS += -lrt LDFLAGS += -lrt
endif endif

View File

@ -12,34 +12,25 @@ IrrlichtHome := ../..
BinPath = ../../bin/$(SYSTEM) BinPath = ../../bin/$(SYSTEM)
# general compiler settings (might need to be set when compiling the lib, too) # general compiler settings (might need to be set when compiling the lib, too)
# preprocessor flags, e.g. defines and include paths CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
USERCPPFLAGS = ifndef NDEBUG
# compiler flags such as optimization flags CXXFLAGS += -g -Wall
USERCXXFLAGS = -O3 -ffast-math else
#USERCXXFLAGS = -g -Wall CXXFLAGS += -O3
# linker flags such as additional libraries and link paths endif
USERLDFLAGS =
####
#no changes necessary below this line
####
CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
CXXFLAGS = $(USERCXXFLAGS)
LDFLAGS = $(USERLDFLAGS)
#default target is Linux #default target is Linux
all: all_linux all: all_linux
# target specific settings # target specific settings
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht 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: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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
static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lm all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = $(BinPath)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
@ -63,4 +54,3 @@ endif
ifeq ($(HOSTTYPE), sun4) ifeq ($(HOSTTYPE), sun4)
LDFLAGS += -lrt LDFLAGS += -lrt
endif endif

View File

@ -1,32 +1,40 @@
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # 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 # and be sure that CXX is set to a valid compiler
Target = 26.OcclusionQuery
Sources = main.cpp
# general compiler settings # Name of the executable created (.exe will be added automatically if necessary)
CPPFLAGS = -I../../include -I/usr/X11R6/include Target := 26.OcclusionQuery
CXXFLAGS = -O3 -ffast-math # List of source files, separated by spaces
#CXXFLAGS = -g -Wall 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)
CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif
#default target is Linux #default target is Linux
all: all_linux all: all_linux
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif
# target specific settings # target specific settings
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL all_win32 clean_win32 static_win32: SUF=.exe
all_win32 clean_win32: SYSTEM=Win32-gcc static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32 clean_win32: SUF=.exe all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
all_linux all_win32: all_linux all_win32 static_win32:
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +44,13 @@ clean: clean_linux clean_win32
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -12,34 +12,25 @@ IrrlichtHome := ../..
BinPath = ../../bin/$(SYSTEM) BinPath = ../../bin/$(SYSTEM)
# general compiler settings (might need to be set when compiling the lib, too) # general compiler settings (might need to be set when compiling the lib, too)
# preprocessor flags, e.g. defines and include paths CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
USERCPPFLAGS = ifndef NDEBUG
# compiler flags such as optimization flags CXXFLAGS += -g -Wall
USERCXXFLAGS = -O3 -ffast-math else
#USERCXXFLAGS = -g -Wall CXXFLAGS += -O3
# linker flags such as additional libraries and link paths endif
USERLDFLAGS =
####
#no changes necessary below this line
####
CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS)
CXXFLAGS = $(USERCXXFLAGS)
LDFLAGS = $(USERLDFLAGS)
#default target is Linux #default target is Linux
all: all_linux all: all_linux
# target specific settings # target specific settings
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht 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: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -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
static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
all_win32: LDFLAGS += -lopengl32 -lm all_win32: LDFLAGS += -lopengl32 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = $(BinPath)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
@ -63,4 +54,3 @@ endif
ifeq ($(HOSTTYPE), sun4) ifeq ($(HOSTTYPE), sun4)
LDFLAGS += -lrt LDFLAGS += -lrt
endif endif

View File

@ -1,44 +1,61 @@
# Irrlicht Engine Demo Makefile # Makefile for Irrlicht Examples
Target = Demo # It's usually sufficient to change just the target name and source file list
Sources = CDemo.cpp CMainMenu.cpp main.cpp # and be sure that CXX is set to a valid compiler
CPPFLAGS = -I../../include -I/usr/X11R6/include # Name of the executable created (.exe will be added automatically if necessary)
CXXFLAGS = -Wall -O3 -ffast-math Target := Demo
# List of source files, separated by spaces
Sources := CDemo.cpp CMainMenu.cpp 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)
ifeq ($(HOSTTYPE), x86_64) # general compiler settings (might need to be set when compiling the lib, too)
LIBSELECT=64 CPPFLAGS += -I$(IrrlichtHome)/include -I/usr/X11R6/include
ifndef NDEBUG
CXXFLAGS += -g -Wall
else
CXXFLAGS += -O3
endif endif
all: all_linux
OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLES_CM
# target specific settings
all_linux: SYSTEM=Linux
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11 -lXcursor
all_win32 clean_win32: SYSTEM=Win32-gcc
all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
# if you enable sound add the proper library for linking # if you enable sound add the proper library for linking
#LDFLAGS += -lIrrKlang #LDFLAGS += -lIrrKlang
#LDFLAGS += -laudiere #LDFLAGS += -laudiere
#LDFLAGS += -lSDL_mixer -lSDL #LDFLAGS += -lSDL_mixer -lSDL
all_win32 clean_win32: SUF=.exe #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 -lEGL -lGLESv1_CM -lGLESv2 -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 -lEGL -lGLESv1_CM -lGLESv2 -lm
static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 -lEGL -lGLESv1_CM -lGLESv2
# name of the binary - only valid for targets which set SYSTEM # name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) DESTPATH = $(BinPath)/$(Target)$(SUF)
OBJ = $(Sources:.cpp=.o) all_linux all_win32 static_win32:
all_linux all_win32: $(OBJ)
$(warning Building...) $(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
clean: clean_linux clean_win32 clean: clean_linux clean_win32
$(warning Cleaning...) $(warning Cleaning...)
@$(RM) $(OBJ)
clean_linux clean_win32: clean_linux clean_win32:
@$(RM) $(DESTPATH) @$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32 .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

View File

@ -29,11 +29,17 @@ namespace gui
IGUIFileOpenDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) IGUIFileOpenDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
: IGUIElement(EGUIET_FILE_OPEN_DIALOG, environment, parent, id, rectangle) {} : IGUIElement(EGUIET_FILE_OPEN_DIALOG, environment, parent, id, rectangle) {}
//! Returns the filename of the selected file. Returns NULL, if no file was selected. //! Returns the filename of the selected file converted to wide characters. Returns NULL if no file was selected.
virtual const wchar_t* getFileName() const = 0; virtual const wchar_t* getFileName() const = 0;
//! Returns the directory of the selected file. Returns NULL, if no directory was selected. //! Returns the filename of the selected file. Is empty if no file was selected.
virtual const io::path& getDirectoryName() = 0; virtual const io::path& getFileNameP() const = 0;
//! Returns the directory of the selected file. Empty if no directory was selected.
virtual const io::path& getDirectoryName() const = 0;
//! Returns the directory of the selected file converted to wide characters. Returns NULL if no directory was selected.
virtual const wchar_t* getDirectoryNameW() const = 0;
}; };

View File

@ -32,6 +32,11 @@ Helper functions for converting between UTF-8 and wchar_t are provided
outside the string class for explicit use. outside the string class for explicit use.
*/ */
// forward declarations
template <typename T, typename TAlloc = irrAllocator<T> >
class string;
static size_t multibyteToWString(string<wchar_t>& destination, const char* source, u32 sourceSize);
enum eLocaleID enum eLocaleID
{ {
IRR_LOCALE_ANSI = 0, IRR_LOCALE_ANSI = 0,
@ -84,7 +89,7 @@ IRRLICHT_API void utf8ToWchar(const char *in, wchar_t *out, const u64 len);
IRRLICHT_API void wcharToUtf8(const wchar_t *in, char *out, const u64 len); IRRLICHT_API void wcharToUtf8(const wchar_t *in, char *out, const u64 len);
template <typename T, typename TAlloc = irrAllocator<T> > template <typename T, typename TAlloc>
class string class string
{ {
public: public:
@ -1340,6 +1345,8 @@ public:
return ret.size()-oldSize; return ret.size()-oldSize;
} }
friend size_t multibyteToWString(string<wchar_t>& destination, const char* source, u32 sourceSize);
private: private:
//! Reallocate the array, make it bigger or smaller //! Reallocate the array, make it bigger or smaller
@ -1375,6 +1382,55 @@ typedef string<c8> stringc;
//! Typedef for wide character strings //! Typedef for wide character strings
typedef string<wchar_t> stringw; typedef string<wchar_t> stringw;
//! Convert multibyte string to wide-character string
/** Wrapper around mbstowcs from standard library, but directly using Irrlicht string class.
What the function does exactly depends on the LC_CTYPE of the current c locale.
\param destination Wide-character string receiving the converted source
\param source multibyte string
\return The number of wide characters written to destination, not including the eventual terminating null character. */
static inline size_t multibyteToWString(string<wchar_t>& destination, const core::string<c8>& source)
{
return multibyteToWString(destination, source.c_str(), (u32)source.size());
}
//! Convert multibyte string to wide-character string
/** Wrapper around mbstowcs from standard library, but directly writing to Irrlicht string class.
What the function does exactly depends on the LC_CTYPE of the current c locale.
\param destination Wide-character string receiving the converted source
\param source multibyte string
\return The number of wide characters written to destination, not including the eventual terminating null character. */
static inline size_t multibyteToWString(string<wchar_t>& destination, const char* source)
{
u32 s = source ? (u32)strlen(source) : 0;
return multibyteToWString(destination, source, s);
}
//! Internally used by the other multibyteToWString functions
static size_t multibyteToWString(string<wchar_t>& destination, const char* source, u32 sourceSize)
{
if ( sourceSize )
{
destination.reserve(sourceSize+1);
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4996) // 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead.
#endif
size_t written = mbstowcs(destination.array, source, (size_t)sourceSize);
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
destination.used = (u32)written;
destination.array[destination.used] = 0;
return written;
}
else
{
destination.empty();
return 0;
}
}
} // end namespace core } // end namespace core
} // end namespace irr } // end namespace irr

View File

@ -341,13 +341,8 @@ bool CGUIEditBox::processKey(const SEvent& event)
const c8* p = Operator->getTextFromClipboard(); const c8* p = Operator->getTextFromClipboard();
if (p) if (p)
{ {
// TODO: we should have such a function in core::string irr::core::stringw widep;
size_t lenOld = strlen(p); core::multibyteToWString(widep, p);
wchar_t *ws = new wchar_t[lenOld + 1];
size_t len = mbstowcs(ws,p,lenOld);
ws[len] = 0;
irr::core::stringw widep(ws);
delete[] ws;
if (MarkBegin == MarkEnd) if (MarkBegin == MarkEnd)
{ {

View File

@ -149,16 +149,38 @@ CGUIFileOpenDialog::~CGUIFileOpenDialog()
//! returns the filename of the selected file. Returns NULL, if no file was selected. //! returns the filename of the selected file. Returns NULL, if no file was selected.
const wchar_t* CGUIFileOpenDialog::getFileName() const const wchar_t* CGUIFileOpenDialog::getFileName() const
{ {
return FileName.c_str(); return FileNameW.c_str();
}
const io::path& CGUIFileOpenDialog::getFileNameP() const
{
return FileName;
} }
//! Returns the directory of the selected file. Returns NULL, if no directory was selected. //! Returns the directory of the selected file. Returns NULL, if no directory was selected.
const io::path& CGUIFileOpenDialog::getDirectoryName() const io::path& CGUIFileOpenDialog::getDirectoryName() const
{ {
FileSystem->flattenFilename ( FileDirectory ); return FileDirectoryFlat;
return FileDirectory;
} }
const wchar_t* CGUIFileOpenDialog::getDirectoryNameW() const
{
return FileDirectoryFlatW.c_str();
}
void CGUIFileOpenDialog::setFileName(const irr::io::path& name)
{
FileName = name;
pathToStringW(FileNameW, FileName);
}
void CGUIFileOpenDialog::setDirectoryName(const irr::io::path& name)
{
FileDirectory = name;
FileDirectoryFlat = name;
FileSystem->flattenFilename (FileDirectoryFlat );
pathToStringW(FileDirectoryFlatW, FileDirectoryFlat);
}
//! called if an event happened. //! called if an event happened.
bool CGUIFileOpenDialog::OnEvent(const SEvent& event) bool CGUIFileOpenDialog::OnEvent(const SEvent& event)
@ -204,13 +226,13 @@ bool CGUIFileOpenDialog::OnEvent(const SEvent& event)
{ {
if (FileList->isDirectory(selected)) if (FileList->isDirectory(selected))
{ {
FileName = L""; setFileName("");
FileDirectory = FileList->getFullFileName(selected); setDirectoryName(FileList->getFullFileName(selected));
} }
else else
{ {
FileDirectory = L""; setDirectoryName("");
FileName = FileList->getFullFileName(selected); setFileName(FileList->getFullFileName(selected));
} }
return true; return true;
} }
@ -224,14 +246,14 @@ bool CGUIFileOpenDialog::OnEvent(const SEvent& event)
{ {
if (FileList->isDirectory(selected)) if (FileList->isDirectory(selected))
{ {
FileDirectory = FileList->getFullFileName(selected); setDirectoryName(FileList->getFullFileName(selected));
FileSystem->changeWorkingDirectoryTo(FileList->getFileName(selected)); FileSystem->changeWorkingDirectoryTo(FileDirectory );
fillListBox(); fillListBox();
FileName = ""; setFileName("");
} }
else else
{ {
FileName = FileList->getFullFileName(selected); setFileName(FileList->getFullFileName(selected));
} }
return true; return true;
} }
@ -244,7 +266,7 @@ bool CGUIFileOpenDialog::OnEvent(const SEvent& event)
if ( FileSystem->changeWorkingDirectoryTo( dir ) ) if ( FileSystem->changeWorkingDirectoryTo( dir ) )
{ {
fillListBox(); fillListBox();
FileName = L""; setFileName("");
} }
return true; return true;
} }
@ -342,7 +364,7 @@ void CGUIFileOpenDialog::serializeAttributes(io::IAttributes* out, io::SAttribut
//! Reads attributes of the element //! Reads attributes of the element
/* Note that thiese paths changes will happen at arbitrary places upon /* Note that these paths changes will happen at arbitrary places upon
load of the gui description. This may be undesired. */ load of the gui description. This may be undesired. */
void CGUIFileOpenDialog::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) void CGUIFileOpenDialog::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
{ {
@ -358,6 +380,17 @@ void CGUIFileOpenDialog::deserializeAttributes(io::IAttributes* in, io::SAttribu
IGUIFileOpenDialog::deserializeAttributes(in,options); IGUIFileOpenDialog::deserializeAttributes(in,options);
} }
void CGUIFileOpenDialog::pathToStringW(irr::core::stringw& result, const irr::io::path& p)
{
#ifndef _IRR_WCHAR_FILESYSTEM
char* oldLocale = setlocale(LC_ALL, NULL);
setlocale(LC_ALL,""); // multibyteToWString is affected by LC_CTYPE. Filenames seem to need the system-locale.
core::multibyteToWString(result, p);
setlocale(LC_ALL, oldLocale);
#else
result = p.c_str();
#endif
}
//! fills the listbox with files. //! fills the listbox with files.
void CGUIFileOpenDialog::fillListBox() void CGUIFileOpenDialog::fillListBox()
@ -375,54 +408,23 @@ void CGUIFileOpenDialog::fillListBox()
FileList = FileSystem->createFileList(); FileList = FileSystem->createFileList();
core::stringw s; core::stringw s;
#ifndef _IRR_WCHAR_FILESYSTEM
char* oldLocale = setlocale(LC_ALL, NULL);
setlocale(LC_ALL,""); // mbstowcs is affected by LC_CTYPE. Filenames seem to need the system-locale.
#endif
if (FileList) if (FileList)
{ {
for (u32 i=0; i < FileList->getFileCount(); ++i) for (u32 i=0; i < FileList->getFileCount(); ++i)
{ {
#ifndef _IRR_WCHAR_FILESYSTEM pathToStringW(s, FileList->getFileName(i));
const c8 *cs = (const c8 *)FileList->getFileName(i).c_str();
size_t lencs = strlen(cs);
wchar_t *ws = new wchar_t[lencs + 1];
size_t len = mbstowcs(ws, cs, lencs);
ws[len] = 0;
s = ws;
delete [] ws;
#else
s = FileList->getFileName(i).c_str();
#endif
FileBox->addItem(s.c_str(), skin->getIcon(FileList->isDirectory(i) ? EGDI_DIRECTORY : EGDI_FILE)); FileBox->addItem(s.c_str(), skin->getIcon(FileList->isDirectory(i) ? EGDI_DIRECTORY : EGDI_FILE));
} }
} }
if (FileNameText) if (FileNameText)
{ {
#ifndef _IRR_WCHAR_FILESYSTEM setDirectoryName(FileSystem->getWorkingDirectory());
const c8 *cs = (const c8 *)FileSystem->getWorkingDirectory().c_str(); pathToStringW(s, FileDirectory);
size_t lencs = strlen(cs);
wchar_t *ws = new wchar_t[lencs + 1];
size_t len = mbstowcs(ws, cs, lencs);
ws[len] = 0;
s = ws;
delete [] ws;
#else
s = FileSystem->getWorkingDirectory();
#endif
FileDirectory = s;
FileNameText->setText(s.c_str()); FileNameText->setText(s.c_str());
} }
#ifndef _IRR_WCHAR_FILESYSTEM
setlocale(LC_ALL, oldLocale);
#endif
} }
//! sends the event that the file has been selected. //! sends the event that the file has been selected.
void CGUIFileOpenDialog::sendSelectedEvent( EGUI_EVENT_TYPE type) void CGUIFileOpenDialog::sendSelectedEvent( EGUI_EVENT_TYPE type)
{ {

View File

@ -34,8 +34,14 @@ namespace gui
//! returns the filename of the selected file. Returns NULL, if no file was selected. //! returns the filename of the selected file. Returns NULL, if no file was selected.
virtual const wchar_t* getFileName() const _IRR_OVERRIDE_; virtual const wchar_t* getFileName() const _IRR_OVERRIDE_;
//! Returns the filename of the selected file. Is empty if no file was selected.
virtual const io::path& getFileNameP() const _IRR_OVERRIDE_;
//! Returns the directory of the selected file. Returns NULL, if no directory was selected. //! Returns the directory of the selected file. Returns NULL, if no directory was selected.
virtual const io::path& getDirectoryName() _IRR_OVERRIDE_; virtual const io::path& getDirectoryName() const _IRR_OVERRIDE_;
//! Returns the directory of the selected file converted to wide characters. Returns NULL if no directory was selected.
virtual const wchar_t* getDirectoryNameW() const _IRR_OVERRIDE_;
//! called if an event happened. //! called if an event happened.
virtual bool OnEvent(const SEvent& event) _IRR_OVERRIDE_; virtual bool OnEvent(const SEvent& event) _IRR_OVERRIDE_;
@ -48,6 +54,12 @@ namespace gui
protected: protected:
void setFileName(const irr::io::path& name);
void setDirectoryName(const irr::io::path& name);
//! Ensure filenames are converted correct depending on wide-char settings
void pathToStringW(irr::core::stringw& result, const irr::io::path& p);
//! fills the listbox with files. //! fills the listbox with files.
void fillListBox(); void fillListBox();
@ -58,8 +70,11 @@ namespace gui
void sendCancelEvent(); void sendCancelEvent();
core::position2d<s32> DragStart; core::position2d<s32> DragStart;
core::stringw FileName; io::path FileName;
core::stringw FileNameW;
io::path FileDirectory; io::path FileDirectory;
io::path FileDirectoryFlat;
core::stringw FileDirectoryFlatW;
io::path RestoreDirectory; io::path RestoreDirectory;
io::path StartDirectory; io::path StartDirectory;

View File

@ -876,15 +876,8 @@ void CGUIEditWorkspace::PasteXMLToSelectedElement()
{ {
// get clipboard data // get clipboard data
const char * p = Environment->getOSOperator()->getTextFromClipboard(); const char * p = Environment->getOSOperator()->getTextFromClipboard();
irr::core::stringw wXMLText;
// convert to stringw core::multibyteToWString(wXMLText, p);
// TODO: we should have such a function in core::string
size_t lenOld = strlen(p);
wchar_t *ws = new wchar_t[lenOld + 1];
size_t len = mbstowcs(ws,p,lenOld);
ws[len] = 0;
irr::core::stringw wXMLText(ws);
delete[] ws;
io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#");