Skip to content

Commit

Permalink
print version
Browse files Browse the repository at this point in the history
  • Loading branch information
tuket committed Oct 27, 2021
1 parent 6c6d5e5 commit 3065f14
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void command_cubemapToLatlong(const char* inFilePath, const char* outFilePath, i
void demo_proj();
void demo_latlongToCubemap();

void printHelp()
void printUsageHelp()
{
printf(
"Usage:\n"
Expand Down Expand Up @@ -255,9 +255,15 @@ int main(int argc, char** argv)

glfwHideWindow(g_window);

if (argc == 1) {
printf("reproject version 1.1\n");
printUsageHelp();
return -1;
}

if(argc != 5 && argc != 6) {
printf("Invalid number of params\n");
printHelp();
printUsageHelp();
return -1;
}

Expand All @@ -269,15 +275,15 @@ int main(int argc, char** argv)
int faceSize;
if(!toInt(faceSize, argv[4]) || faceSize == 0) {
printf("The 'outputFaceResolution' parameter must be a positive integer\n");
printHelp();
printUsageHelp();
return -1;
}

int numSamples = 128;
if(argc == 6) {
if(!toInt(numSamples, argv[5])) {
printf("The 'numSamples' parameter must be an interger\n");
printHelp();
printUsageHelp();
return -1;
}
}
Expand All @@ -292,15 +298,15 @@ int main(int argc, char** argv)
uvec2 outTexSize;
if(!parseResolution(outTexSize, argv[4])) {
printf("Wrong format for output resolution\n");
printHelp();
printUsageHelp();
return -1;
}

int numSamples = 128;
if(argc == 6) {
if(!toInt(numSamples, argv[5])) {
printf("The 'numSamples' parameter must be an interger\n");
printHelp();
printUsageHelp();
return -1;
}
}
Expand All @@ -309,7 +315,7 @@ int main(int argc, char** argv)
}
else {
printf("Invalid command\n");
printHelp();
printUsageHelp();
}

//glfwSwapBuffers(g_window); // uncomment in order to be able to debug with renderdoc
Expand Down

0 comments on commit 3065f14

Please sign in to comment.