Skip to content

Commit

Permalink
Esri#6 Add skeleton obj2slpk sample
Browse files Browse the repository at this point in the history
Signed-off-by: Tisham Dhar <[email protected]>
  • Loading branch information
whatnick committed Mar 7, 2021
1 parent 43d4cbb commit 0b04a86
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,15 @@ endif()
target_include_directories(raster2slpk PRIVATE include)

target_link_libraries(raster2slpk i3s)

# obj2slpk example app target
set(OBJ2SLPK_SOURCES "examples/obj2slpk/main.cpp")
add_executable(obj2slpk ${OBJ2SLPK_SOURCES})

if(WIN32)
target_compile_definitions(obj2slpk PRIVATE -D_UNICODE -DUNICODE)
endif()

target_include_directories(obj2slpk PRIVATE include)

target_link_libraries(obj2slpk i3s)
29 changes: 29 additions & 0 deletions examples/obj2slpk/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright 2021 Tisham Dhar
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
For additional information, contact:
Tisham <whatnick> Dhar
email: [email protected]
*/

#include "i3s/i3s_writer.h"
#include <iostream>

int main(int argc, char* argv[])
{
if (argc != 5)
{
std::cout << "Usage:" << std::endl
<< "obj2slpk <full_res_obj> <lod1_obj> <lod2_obj> <output_slpk_file>" << std::endl;

return 1;
}
}

0 comments on commit 0b04a86

Please sign in to comment.