Skip to content

Commit

Permalink
Now using stb_image directly for loading image files, instead of SOIL…
Browse files Browse the repository at this point in the history
… (which is not maintained anymore)

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1542 4e206d99-4929-0410-ac5d-dfc041789085
  • Loading branch information
LaurentGomila committed Jul 31, 2010
1 parent 42173d6 commit ff367bd
Show file tree
Hide file tree
Showing 14 changed files with 5,504 additions and 313 deletions.
4 changes: 2 additions & 2 deletions build/codeblocks/SFML.workspace
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="SFML workspace">
<Project filename="sfml-system.cbp" active="1" />
<Project filename="sfml-system.cbp" />
<Project filename="sfml-window.cbp" />
<Project filename="sfml-network.cbp" />
<Project filename="sfml-graphics.cbp" />
<Project filename="sfml-graphics.cbp" active="1" />
<Project filename="sfml-audio.cbp" />
<Project filename="sfml-main.cbp" />
<Project filename="..\..\samples\build\codeblocks\ftp.cbp" />
Expand Down
2 changes: 0 additions & 2 deletions build/codeblocks/batch-build/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ echo Adding external libraries to libsfml-graphics-s...
ar x %SFML%\extlibs\libs-mingw\libfreetype.a
ar x %SFML%\extlibs\libs-mingw\libglew.a
ar x %SFML%\extlibs\libs-mingw\libjpeg.a
ar x %SFML%\extlibs\libs-mingw\libpng.a
ar x %SFML%\extlibs\libs-mingw\libsoil.a
ar rs libsfml-graphics-s.a *.o
ar rs libsfml-graphics-s-d.a *.o
del *.o /f /q
Expand Down
5 changes: 0 additions & 5 deletions build/codeblocks/sfml-graphics.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
<Add library="..\..\extlibs\libs-mingw\libfreetype.a" />
<Add library="..\..\extlibs\libs-mingw\libglew.a" />
<Add library="..\..\extlibs\libs-mingw\libjpeg.a" />
<Add library="..\..\extlibs\libs-mingw\libpng.a" />
<Add library="..\..\extlibs\libs-mingw\libsoil.a" />
<Add library="libopengl32.a" />
<Add directory="..\..\extlibs" />
</Linker>
Expand Down Expand Up @@ -67,8 +65,6 @@
<Add library="..\..\extlibs\libs-mingw\libfreetype.a" />
<Add library="..\..\extlibs\libs-mingw\libglew.a" />
<Add library="..\..\extlibs\libs-mingw\libjpeg.a" />
<Add library="..\..\extlibs\libs-mingw\libpng.a" />
<Add library="..\..\extlibs\libs-mingw\libsoil.a" />
<Add library="libopengl32.a" />
<Add directory="..\..\extlibs" />
</Linker>
Expand Down Expand Up @@ -124,7 +120,6 @@
<Add directory="..\..\src" />
<Add directory="..\..\include" />
<Add directory="..\..\extlibs\headers" />
<Add directory="..\..\extlibs\headers\png" />
<Add directory="..\..\extlibs\headers\jpeg" />
</Compiler>
<Linker>
Expand Down
8 changes: 4 additions & 4 deletions build/make/Makefile.graphics
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
SRC = $(wildcard $(SRCROOT)/Graphics/*.cpp $(SRCROOT)/Graphics/Linux/*.cpp)
OBJ = $(SRC:.cpp=.o)
LIB = libsfml-graphics.so
LIB = libsfml-graphics.so
LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)

all: $(LIB)

libsfml-graphics.so: $(OBJ)
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lGLEW -ljpeg -lpng -lSOIL -lfreetype -lX11 -lGL
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lGLEW -ljpeg -lfreetype -lX11 -lGL

$(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
Expand All @@ -21,7 +21,7 @@ clean:
mrproper: clean
rm -rf $(FULLLIBNAME)

install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK)
20 changes: 12 additions & 8 deletions build/vc2005/sfml-graphics.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC;GLEW_STATIC"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand All @@ -71,7 +71,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2005\$(ProjectName)-d.dll"
LinkIncremental="2"
AdditionalLibraryDirectories=""
Expand Down Expand Up @@ -143,7 +143,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;SFML_EXPORTS;SFML_DYNAMIC;GLEW_STATIC;STBI_FAILURE_USERMSG"
StringPooling="true"
RuntimeLibrary="2"
Expand All @@ -167,7 +167,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2005\$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""
Expand Down Expand Up @@ -236,7 +236,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;GLEW_STATIC"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand All @@ -258,7 +258,7 @@
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2005\$(ProjectName)-s-d.lib"
AdditionalLibraryDirectories=""
/>
Expand Down Expand Up @@ -315,7 +315,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;SFML_EXPORTS;GLEW_STATIC;STBI_FAILURE_USERMSG"
StringPooling="true"
MinimalRebuild="false"
Expand All @@ -340,7 +340,7 @@
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2005\$(ProjectName)-s.lib"
AdditionalLibraryDirectories=""
/>
Expand Down Expand Up @@ -488,6 +488,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="0"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand All @@ -496,6 +497,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="0"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand All @@ -504,6 +506,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="0"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand All @@ -512,6 +515,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="0"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand Down
20 changes: 12 additions & 8 deletions build/vc2008/sfml-graphics.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC;GLEW_STATIC"
MinimalRebuild="false"
BasicRuntimeChecks="3"
Expand All @@ -72,7 +72,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2008\$(ProjectName)-d.dll"
LinkIncremental="2"
AdditionalLibraryDirectories=""
Expand Down Expand Up @@ -144,7 +144,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;SFML_EXPORTS;SFML_DYNAMIC;GLEW_STATIC;STBI_FAILURE_USERMSG"
StringPooling="true"
RuntimeLibrary="2"
Expand All @@ -167,7 +167,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2008\$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""
Expand Down Expand Up @@ -236,7 +236,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;GLEW_STATIC"
MinimalRebuild="false"
BasicRuntimeChecks="3"
Expand All @@ -258,7 +258,7 @@
<Tool
Name="VCLibrarianTool"
AdditionalOptions="/VERBOSE:LIB"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2008\$(ProjectName)-s-d.lib"
AdditionalLibraryDirectories=""
/>
Expand Down Expand Up @@ -316,7 +316,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\png&quot;"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\src&quot;;&quot;$(SolutionDir)..\..\include&quot;;&quot;$(SolutionDir)..\..\extlibs\headers&quot;;&quot;$(SolutionDir)..\..\extlibs\headers\jpeg&quot;"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;SFML_EXPORTS;GLEW_STATIC;STBI_FAILURE_USERMSG"
StringPooling="true"
RuntimeLibrary="2"
Expand All @@ -340,7 +340,7 @@
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\png.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\soil.lib&quot;"
AdditionalDependencies="opengl32.lib &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\freetype.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\glew.lib&quot; &quot;$(SolutionDir)..\..\extlibs\libs-vc2005\jpeg.lib&quot;"
OutputFile="$(SolutionDir)..\..\lib\vc2008\$(ProjectName)-s.lib"
AdditionalLibraryDirectories=""
/>
Expand Down Expand Up @@ -488,6 +488,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="3"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand All @@ -496,6 +497,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="3"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand All @@ -504,6 +506,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="3"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand All @@ -512,6 +515,7 @@
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="3"
DisableSpecificWarnings="4611"
/>
</FileConfiguration>
Expand Down
Loading

0 comments on commit ff367bd

Please sign in to comment.