Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Khanat code
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tycho Brahe
Khanat code
Commits
fc7a2b29
Commit
fc7a2b29
authored
Jan 04, 2017
by
kervala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed: Allow to define output bitmap size
parent
d9ab0714
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
code/nel/tools/3d/textures_tool/main.cpp
code/nel/tools/3d/textures_tool/main.cpp
+8
-1
No files found.
code/nel/tools/3d/textures_tool/main.cpp
View file @
fc7a2b29
...
...
@@ -44,7 +44,7 @@ const CPoint Down(0, 1);
const
CPoint
Left
(
-
1
,
0
);
const
CPoint
Right
(
1
,
0
);
const
uint
TextureSize
=
4096
;
uint
TextureSize
=
4096
;
const
NLMISC
::
CRGBA
DiscardColor
=
NLMISC
::
CRGBA
::
Red
;
const
NLMISC
::
CRGBA
KeepColor
=
NLMISC
::
CRGBA
::
Blue
;
...
...
@@ -113,6 +113,7 @@ int main(int argc, char **argv)
args
.
addArg
(
"f"
,
"fill"
,
"color or image"
,
"Fill background part with color or image"
);
args
.
addArg
(
"u"
,
"uvmap"
,
""
,
"Generate a UV Map texture from OBJ file"
);
args
.
addArg
(
"w"
,
"width"
,
"width of border"
,
"Width of the border to fill (default 0)"
);
args
.
addArg
(
"s"
,
"size"
,
"size of output bitmap"
,
"Width and height of generated bitmap (default 4096)"
);
args
.
addArg
(
"b"
,
"background"
,
"background color"
,
"Color to use to fill background"
);
args
.
addArg
(
"o"
,
"output"
,
"filename"
,
"Output filename"
);
args
.
addAdditionalArg
(
"filename"
,
"File to process"
,
true
,
true
);
...
...
@@ -123,6 +124,12 @@ int main(int argc, char **argv)
std
::
string
output
=
args
.
haveArg
(
"o"
)
?
args
.
getArg
(
"o"
).
front
()
:
""
;
if
(
args
.
haveArg
(
"s"
))
{
// size of generated bitmap
NLMISC
::
fromString
(
args
.
getArg
(
"s"
).
front
(),
TextureSize
);
}
if
(
args
.
haveArg
(
"c"
))
{
// colorize
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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