-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96be82f
commit 2d7db03
Showing
9 changed files
with
92 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
#include "Tools.h" | ||
|
||
#include <fstream> | ||
#include <iostream> | ||
#include <vector> | ||
|
||
|
||
std::string read_file(const std::string& file_name) | ||
{ | ||
const auto flags = std::ios::in | std::ios::binary | std::ios::ate; | ||
std::ifstream ifs(file_name.c_str(), flags); | ||
|
||
if (ifs.is_open() == false) | ||
{ | ||
std::cout << "could not open file: " << file_name << std::endl; | ||
return ""; | ||
} | ||
|
||
std::ifstream::pos_type file_size = ifs.tellg(); | ||
ifs.seekg(0, std::ios::beg); | ||
|
||
std::vector<char> bytes(file_size); | ||
ifs.read(&bytes[0], file_size); | ||
|
||
return std::string(&bytes[0], file_size); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Arrangement_on_surface_2/demo/earth/World_coordinate_axes.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
// Copyright(c) 2012, 2020 Tel - Aviv University(Israel). | ||
// All rights reserved. | ||
// | ||
// This file is part of CGAL (www.cgal.org). | ||
// | ||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial | ||
// | ||
// Author(s): Deniz Diktas <[email protected]> | ||
|
||
#include <QApplication> | ||
#include <QLabel> | ||
|
@@ -7,30 +15,28 @@ | |
#include "mainwidget.h" | ||
#endif | ||
|
||
#include <iostream> | ||
using namespace std; | ||
|
||
int main(int argc, char *argv[]) | ||
int main(int argc, char* argv[]) | ||
{ | ||
QApplication app(argc, argv); | ||
QApplication app(argc, argv); | ||
|
||
QSurfaceFormat format; | ||
format.setVersion(3, 3); | ||
format.setProfile(QSurfaceFormat::CoreProfile); | ||
//format.setProfile(QSurfaceFormat::CompatibilityProfile); | ||
//format.setOptions(QSurfaceFormat::DeprecatedFunctions); | ||
//QSurfaceFormat::setDefaultFormat(format); | ||
format.setDepthBufferSize(24); | ||
QSurfaceFormat::setDefaultFormat(format); | ||
QSurfaceFormat format; | ||
format.setVersion(3, 3); | ||
format.setProfile(QSurfaceFormat::CoreProfile); | ||
//format.setProfile(QSurfaceFormat::CompatibilityProfile); | ||
//format.setOptions(QSurfaceFormat::DeprecatedFunctions); | ||
//QSurfaceFormat::setDefaultFormat(format); | ||
format.setDepthBufferSize(24); | ||
QSurfaceFormat::setDefaultFormat(format); | ||
|
||
app.setApplicationName("Earth"); | ||
app.setApplicationVersion("0.1"); | ||
app.setApplicationName("Earth"); | ||
app.setApplicationVersion("0.1"); | ||
#ifndef QT_NO_OPENGL | ||
MainWidget widget; | ||
widget.show(); | ||
MainWidget widget; | ||
widget.show(); | ||
#else | ||
QLabel note("OpenGL Support required"); | ||
note.show(); | ||
QLabel note("OpenGL Support required"); | ||
note.show(); | ||
#endif | ||
return app.exec(); | ||
return app.exec(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters