Commit 8fc676a5 authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'master' into c++11_matrix

parents 29aac48b 3dd4ce8d
Pipeline #3122 passed with stage
in 38 minutes and 32 seconds
......@@ -1757,7 +1757,36 @@ int GLState::getBufferTargetIndex(GLenum _target)
case GL_ELEMENT_ARRAY_BUFFER: return 1;
case GL_PIXEL_PACK_BUFFER: return 2;
case GL_PIXEL_UNPACK_BUFFER: return 3;
#ifdef GL_ARB_uniform_buffer_object
case GL_UNIFORM_BUFFER: return 4;
#endif
#ifdef GL_ARB_shader_storage_buffer_object
case GL_SHADER_STORAGE_BUFFER: return 5;
#endif
#ifdef GL_ARB_shader_atomic_counters
case GL_ATOMIC_COUNTER_BUFFER: return 6;
#endif
#ifdef GL_ARB_copy_buffer
case GL_COPY_READ_BUFFER: return 7;
case GL_COPY_WRITE_BUFFER: return 8;
#endif
#ifdef GL_ARB_compute_shader
case GL_DISPATCH_INDIRECT_BUFFER: return 9;
#endif
#ifdef GL_ARB_draw_indirect
case GL_DRAW_INDIRECT_BUFFER: return 10;
#endif
#ifdef GL_ARB_query_buffer_object
case GL_QUERY_BUFFER: return 11;
#endif
#ifdef GL_ARB_texture_buffer_object
case GL_TEXTURE_BUFFER: return 12;
#endif
#ifdef GL_VERSION_3_0
case GL_TRANSFORM_FEEDBACK_BUFFER: return 13;
#endif
}
std::cerr << "error : GLState::bindBuffer - unknown buffer target type" << _target << std::endl;
return -1;
}
......
......@@ -145,10 +145,10 @@ public:
// depth function
GLenum depthFunc_;
// 4 buffer targets:
// GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER
// buffer targets available in opengl:
// GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER, GL_UNIFORM_BUFFER, GL_SHADER_STORAGE_BUFFER ...
// current state of a buffer target
GLuint glBufferTargetState_[4];
GLuint glBufferTargetState_[14];
// active texture unit: GL_TEXTUREi
......
cd rel
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"
cd rel
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"
cd rel
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"
mkdir rel
cd rel
set ARCHITECTURE=x64
set ARCH_VS= Win64
set STRING_ARCH=64-Bit
set QT_REV=5.5
set QT_SUFFIX=
set LIBPATH_BASE=C:\libs\VS2013
set GTESTVERSION=gtest-1.6.0
set GENERATOR=Visual Studio 12%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
set QT_VERSION=Qt5.5.1
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2013-%STRING_ARCH%\%QT_REV%\msvc2013_64%QT_SUFFIX%
set GLUT_INCLUDE_DIR=C:\libs\VS2013\%ARCHITECTURE%\freeglut-2.8.1\include
set GLUT_GLUT_LIBRARY=C:\libs\VS2013\%ARCHITECTURE%\freeglut-2.8.1\lib\freeglut.lib
set GLEW_INCLUDE_DIR=C:\libs\VS2013\%ARCHITECTURE%\glew-1.10.0\include
set GLEW_LIBRARY_DIR=C:\libs\VS2013\%ARCHITECTURE%\glew-1.10.0\lib\glew32.lib
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%GLUT_INCLUDE_DIR%" -DGLUT_glut_LIBRARY="%GLUT_GLUT_LIBRARY%" -DGLEW_INCLUDE_DIR="%GLEW_INCLUDE_DIR%" -DGLEW_LIBRARY="%GLEW_LIBRARY_DIR%"
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
mkdir rel
cd rel
set ARCHITECTURE=x32
set ARCH_VS=
set STRING_ARCH=32-Bit
set QT_REV=5.6
set QT_SUFFIX=
set LIBPATH_BASE=C:\libs\VS2015
set GTESTVERSION=gtest-1.7.0
set GENERATOR=Visual Studio 14%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
set QT_VERSION=Qt5.6.0
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2015-%STRING_ARCH%\%QT_REV%\msvc2015%QT_SUFFIX%
set GLUT_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\include
set GLUT_GLUT_LIBRARY=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\lib\freeglut.lib
set GLEW_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\include
set GLEW_LIBRARY_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\lib\glew32.lib
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%GLUT_INCLUDE_DIR%" -DGLUT_glut_LIBRARY="%GLUT_GLUT_LIBRARY%" -DGLEW_INCLUDE_DIR="%GLEW_INCLUDE_DIR%" -DGLEW_LIBRARY="%GLEW_LIBRARY_DIR%"
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
mkdir rel
cd rel
set ARCHITECTURE=x64
set ARCH_VS= Win64
set STRING_ARCH=64-Bit
set QT_REV=5.6
set QT_SUFFIX=
set LIBPATH_BASE=C:\libs\VS2015
set GTESTVERSION=gtest-1.7.0
set GENERATOR=Visual Studio 14%ARCH_VS%
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
set QT_VERSION=Qt5.6.0
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2015-%STRING_ARCH%\%QT_REV%\msvc2015_64%QT_SUFFIX%
set GLUT_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\include
set GLUT_GLUT_LIBRARY=C:\libs\VS2015\%ARCHITECTURE%\freeglut-3.0.0\lib\freeglut.lib
set GLEW_INCLUDE_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\include
set GLEW_LIBRARY_DIR=C:\libs\VS2015\%ARCHITECTURE%\glew-1.13.0\lib\glew32.lib
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%GLUT_INCLUDE_DIR%" -DGLUT_glut_LIBRARY="%GLUT_GLUT_LIBRARY%" -DGLEW_INCLUDE_DIR="%GLEW_INCLUDE_DIR%" -DGLEW_LIBRARY="%GLEW_LIBRARY_DIR%"
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
cd rel
set STRING_ARCH=64-Bit
set BUILD_PLATFORM=VS2013
set QT_VERSION=5.5.1
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
del *.exe
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
move OpenFlipper-*.exe "OpenFlipper-Free-Git-Master-%GIT_COMMIT%-%BUILD_PLATFORM%-%STRING_ARCH%-%QT_VERSION%.exe"
cd rel
set STRING_ARCH=32-Bit
set BUILD_PLATFORM=VS2015
set QT_VERSION=5.6.0
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
del *.exe
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
move OpenFlipper-*.exe "OpenFlipper-Free-Git-Master-%GIT_COMMIT%-%BUILD_PLATFORM%-%STRING_ARCH%-%QT_VERSION%.exe"
cd rel
set STRING_ARCH=64-Bit
set BUILD_PLATFORM=VS2015
set QT_VERSION=5.6.0
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
del *.exe
%VS_PATH% /Build "Release" OpenFlipper.sln /Project "PACKAGE"
move OpenFlipper-*.exe "OpenFlipper-Free-Git-Master-%GIT_COMMIT%-%BUILD_PLATFORM%-%STRING_ARCH%-%QT_VERSION%.exe"
cd rel
cd tests
copy ..\Build\Qt*.dll testBinaries
copy ..\Build\icu*.dll testBinaries
run_tests.bat
cd rel
cd tests
copy ..\Build\Qt*.dll testBinaries
copy ..\Build\icu*.dll testBinaries
run_tests.bat
cd rel
cd tests
copy ..\Build\Qt*.dll testBinaries
copy ..\Build\icu*.dll testBinaries
run_tests.bat
properties properties: [[$class: 'GitLabConnectionProperty', gitLabConnection: 'graphics']]
parallel(
'VS2015 Qt-5.6.0 x64': {
node ('Qt5.6.0 && VS2015 ') {
String VisualStudio = 'VS2015';
String QtVersion = 'Qt-5.6.0';
String Arch = 'x64';
String name = VisualStudio + ' ' + QtVersion + ' ' + Arch;
String stageName = VisualStudio + '-' + QtVersion + '-' + Arch;
// Create a workspace that contains Project and branch name
// Required to get a shorter name working around max pathlength on windows
ws("workspace/${env.JOB_NAME.replaceAll('/', '-')}/"+stageName) {
stage('Checkout - ' + name) {
// Configured in jenkins !!
checkout scm
}
// Extract the current commit id and pass it to the environments
String GITCOMMIT = bat( script: 'git rev-parse HEAD', returnStdout: true).trim().tokenize(' ').last().trim()
env.GIT_COMMIT=GITCOMMIT
gitlabCommitStatus {
stage('Configure - ' + name ) {
bat 'JI\\Configure-'+stageName+'.bat'
}
stage('Build - ' + name) {
bat 'JI\\Build-'+stageName+'.bat'
}
stage('Test - ' + name ) {
bat 'JI\\Test-'+stageName+'.bat'
}
stage('Package - ' + name ) {
bat 'JI\\Package-'+stageName+'.bat'
}
}
archiveArtifacts artifacts: '**/rel/*.exe', fingerprint: true
}
}
} ,
'VS2015 Qt-5.6.0 x32': {
node ('Qt5.6.0 && VS2015') {
String VisualStudio = 'VS2015';
String QtVersion = 'Qt-5.6.0';
String Arch = 'x32';
String name = VisualStudio + ' ' + QtVersion + ' ' + Arch;
String stageName = VisualStudio + '-' + QtVersion + '-' + Arch;
// Create a workspace that contains Project and branch name
// Required to get a shorter name working around max pathlength on windows
ws("workspace/${env.JOB_NAME.replaceAll('/', '-')}/"+stageName) {
stage('Checkout - ' + name) {
// Configured in jenkins !!
checkout scm
}
// Extract the current commit id and pass it to the environments
String GITCOMMIT = bat( script: 'git rev-parse HEAD', returnStdout: true).trim().tokenize(' ').last().trim()
env.GIT_COMMIT=GITCOMMIT
stage('Configure - ' + name ) {
bat 'JI\\Configure-'+stageName+'.bat'
}
stage('Build - ' + name ) {
bat 'JI\\Build-'+stageName+'.bat'
}
stage('Test - ' + name ) {
bat 'JI\\Test-'+stageName+'.bat'
}
stage('Package - ' + name ) {
bat 'JI\\Package-'+stageName+'.bat'
}
archiveArtifacts artifacts: '**/rel/*.exe', fingerprint: true
}
}
} ,
'VS2013 Qt-5.5.1 x64': {
node ('Qt5.5.1 && VS2013 ') {
String VisualStudio = 'VS2013';
String QtVersion = 'Qt-5.5.1';
String Arch = 'x64';
String name = VisualStudio + ' ' + QtVersion + ' ' + Arch;
String stageName = VisualStudio + '-' + QtVersion + '-' + Arch;
// Create a workspace that contains Project and branch name
// Required to get a shorter name working around max pathlength on windows
ws("workspace/${env.JOB_NAME.replaceAll('/', '-')}/"+stageName) {
stage('Checkout - ' + name) {
// Configured in jenkins !!
checkout scm
}
// Extract the current commit id and pass it to the environments
String GITCOMMIT = bat( script: 'git rev-parse HEAD', returnStdout: true).trim().tokenize(' ').last().trim()
env.GIT_COMMIT=GITCOMMIT
stage('Configure - ' + name ) {
bat 'JI\\Configure-'+stageName+'.bat'
}
stage('Build - ' + name ) {
bat 'JI\\Build-'+stageName+'.bat'
}
stage('Test - ' + name ) {
bat 'JI\\Test-'+stageName+'.bat'
}
stage('Package - ' + name ) {
bat 'JI\\Package-'+stageName+'.bat'
}
archiveArtifacts artifacts: '**/rel/*.exe', fingerprint: true
}
}
}
)
......@@ -156,13 +156,6 @@ if (NOT CATCH_SIGSEGV)
add_definitions( -DNO_CATCH_SIGSEGV )
endif()
if (WIN32)
set ( WIN_GET_DEBUG_CONSOLE False CACHE BOOL "Whether a debug console should be visible on windows" )
if (WIN_GET_DEBUG_CONSOLE)
add_definitions( -DWIN_GET_DEBUG_CONSOLE )
endif()
endif ()
......
......@@ -105,7 +105,7 @@ You can change view modes of cmake-gui via the select box on the top. </li>
</ul>
\note If you want to build OpenFlipper as release on windows, you don't have to set the CMAKE_BUILD_TYPE variable to "Release" before configuring
generating the Visual Studio solution file. Instead, choose the build type "Release" in Visual Studio and build the solution.
generating the Visual Studio solution file. Instead, choose the build type "Release" in Visual Studio and build the solution. Console outputs are only available in Visual Studio, when the "Debug" configuration is selected, or the -c option is passed as command line option.
Don't forget setting up the "OpenFlipper" target as startup project as shown in the image below to run the debugger with OpenFlipper right out of Visual Studio.
\image html windows_build_set_as_startup.png
......
/*! \page changelog Changelog
- <b>OpenFlipper 4.0 ( ?/?/? )</b>
- <b>Build System</b>
- Enable C++-11 by default
- Drop support for Qt 4
- <b>OpenFlipper 3.1 ( 2016/10/12 )</b>
- <b>General</b>
- Fix missleading indentation warnings on gcc 6.x
......
......@@ -12,6 +12,8 @@
*
* Log options:\n
* --log-to-console ( -c ) : Write logger window contents to console\n
* \note On Window Systems, using the --log-to-console option causes the creation of a console if OpenFlipper was started without one.
* Otherwise the parent Console will be used for outputs.
*
* Other options:\n
* -b : Batch mode, you have to provide a script for execution and the system will start without gui\n
......
......@@ -108,14 +108,6 @@
*
* ==========================================================*/
// Includes for windows debugging console
#ifdef WIN32
#ifdef WIN_GET_DEBUG_CONSOLE
#include <fcntl.h>
#include <io.h>
#endif
#endif
#ifdef WIN32
void attachConsole()
......@@ -131,6 +123,14 @@
else
{
//create and attach a new console if needed
#ifndef NDEBUG
//always open a console in debug mode
AllocConsole();
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
return;
#endif
if (OpenFlipper::Options::logToConsole())
{
AllocConsole();
......@@ -140,30 +140,7 @@
}
}
}
#ifdef WIN_GET_DEBUG_CONSOLE
void getConsole() {
//Create a console for this application
AllocConsole();
//Redirect unbuffered STDOUT to the console
HANDLE ConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
int SystemOutput = _open_osfhandle(intptr_t(ConsoleOutput), _O_TEXT);
FILE *COutputHandle = _fdopen(SystemOutput, "w" );
*stdout = *COutputHandle;
setvbuf(stdout, NULL, _IONBF, 0);
//Redirect unbuffered STDERR to the console
HANDLE ConsoleError = GetStdHandle(STD_ERROR_HANDLE);
int SystemError = _open_osfhandle(intptr_t(ConsoleError), _O_TEXT);
FILE *CErrorHandle = _fdopen(SystemError, "w" );
*stderr = *CErrorHandle;
setvbuf(stderr, NULL, _IONBF, 0);
//Redirect unbuffered STDIN to the console
HANDLE ConsoleInput = GetStdHandle(STD_INPUT_HANDLE);
int SystemInput = _open_osfhandle(intptr_t(ConsoleInput), _O_TEXT);
FILE *CInputHandle = _fdopen(SystemInput, "r" );
*stdin = *CInputHandle;
setvbuf(stdin, NULL, _IONBF, 0);
}
#endif
#endif
/* ==========================================================
......@@ -393,12 +370,6 @@ int main(int argc, char **argv)
OpenFlipper::Options::windowTitle(TOSTRING(PRODUCT_STRING)" v" + OpenFlipper::Options::coreVersion());
#ifdef WIN32
#ifdef WIN_GET_DEBUG_CONSOLE
getConsole();
#endif
#endif
if ( !OpenFlipper::Options::nogui() ) {
// OpenGL check
......@@ -427,10 +398,10 @@ int main(int argc, char **argv)
delete w;
return 1;
}
#ifdef WIN32
#ifndef WIN_GET_DEBUG_CONSOLE //only attach to parent console if no separate debug console is requested
//attach a console if necessary
attachConsole();
#endif
#endif
QString tLang = OpenFlipperSettings().value("Core/Language/Translation","en_US").toString();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment