Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
64ff442e
Commit
64ff442e
authored
Dec 19, 2014
by
Christian Schulte zu Berge
Browse files
GCC fixes: CMake file for fontrendering module and exception throwing in fontatlas.cpp.
parent
369d4951
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/fontrendering/fontrendering.cmake
View file @
64ff442e
...
...
@@ -2,12 +2,14 @@
IF
(
${
ModuleEnabled
}
)
# dirty, dirty hack to force freetype to build stastic lib
SET
(
foo
${
BUILD_SHARED_LIBS
}
)
SET
(
BUILD_SHARED_LIBS 0
)
SET
(
bsl
${
BUILD_SHARED_LIBS
}
)
IF
(
${
CampvisSharedStaticModulesFix
}
)
SET
(
BUILD_SHARED_LIBS 0
)
ENDIF
()
# build RadomWalksLib library
ADD_SUBDIRECTORY
(
modules/fontrendering/ext/freetype-2.5.4
)
SET
(
BUILD_SHARED_LIBS
${
foo
}
)
SET
(
BUILD_SHARED_LIBS
${
bsl
}
)
SET
(
ThisModExternalLibs
"freetype"
)
SET
(
ThisModIncludeDirs
"
${
CampvisHome
}
/modules/fontrendering/ext/freetype-2.5.4/include"
)
...
...
modules/fontrendering/tools/fontatlas.cpp
View file @
64ff442e
...
...
@@ -24,6 +24,7 @@
#include
"fontatlas.h"
#include
"cgt/exception.h"
#include
"cgt/logmanager.h"
#include
"cgt/textureunit.h"
...
...
@@ -47,12 +48,12 @@ namespace campvis {
// Initialize the FreeType2 library
if
(
FT_Init_FreeType
(
&
_ftLibrary
))
{
LERROR
(
"Could not init freetype library."
);
throw
std
::
e
xception
(
"Could not init freetype library."
);
throw
cgt
::
E
xception
(
"Could not init freetype library."
);
}
// Load a font
if
(
FT_New_Face
(
_ftLibrary
,
fontFileName
.
c_str
(),
0
,
&
_ftFace
))
{
LERROR
(
"Could not open font "
<<
fontFileName
);
throw
std
::
e
xception
(
"Could not open font file."
);
throw
cgt
::
E
xception
(
"Could not open font file."
);
}
FT_Set_Pixel_Sizes
(
_ftFace
,
0
,
height
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment