Skip to content

Commit

Permalink
Prepare for Eyescale/CMake#533
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Eilemann authored and Stefan Eilemann committed Feb 7, 2017
1 parent ff84577 commit 12b1721
Show file tree
Hide file tree
Showing 24 changed files with 137 additions and 267 deletions.
2 changes: 1 addition & 1 deletion .gitsubprojects
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- mode: cmake -*-
git_subproject(vmmlib https://github.com/Eyescale/vmmlib.git 8795629)
git_subproject(Servus https://github.com/HBPVIS/Servus 2da95ea)
git_subproject(Lunchbox https://github.com/Eyescale/Lunchbox.git aae4011)
git_subproject(Lunchbox https://github.com/Eyescale/Lunchbox.git 1f66e47)
git_subproject(Pression https://github.com/Eyescale/Pression.git 5c9d135)
git_subproject(hwsd https://github.com/Eyescale/hwsd.git 2898f91)
git_subproject(Collage https://github.com/Eyescale/Collage.git e6801ce)
Expand Down
3 changes: 3 additions & 0 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog {#Changelog}

# git master

* [611](https://github.com/Eyescale/Equalizer/pull/611)
Add eq::getHelp(), eq::Client::getHelp() and seq::Application::getHelp(),
improve help for all applications
* [609](https://github.com/Eyescale/Equalizer/pull/609):
Clean up magellan event API
* [608](https://github.com/Eyescale/Equalizer/pull/608):
Expand Down
8 changes: 5 additions & 3 deletions examples/eVolve/localInitData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2007-2014, Stefan Eilemann <eile@equalizergraphics.com>
/* Copyright (c) 2007-2017, Stefan Eilemann <eile@equalizergraphics.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -87,7 +87,8 @@ void LocalInitData::parseArguments( const int argc, char** argv )

const std::string& desc = EVolve::getHelp();
po::options_description options( desc + " Version " +
eq::Version::getString( ));
eq::Version::getString(),
lunchbox::term::getSize().first );
options.add_options()
( "help,h", po::bool_switch(&showHelp)->default_value(false),
"produce help message" )
Expand Down Expand Up @@ -133,7 +134,8 @@ void LocalInitData::parseArguments( const int argc, char** argv )
// Evaluate parsed command line options
if( showHelp )
{
std::cout << options << std::endl;
std::cout << options << std::endl
<< eq::getHelp() << eq::Client::getHelp() << std::endl;
eq::exit(); // cppcheck-suppress unreachableCode
::exit( EXIT_SUCCESS );
}
Expand Down
15 changes: 13 additions & 2 deletions examples/eqAsync/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* Copyright (c) 2007-2014, Stefan Eilemann <eile@equalizergraphics.com>
* 2010-2011, Maxim Makhinya <maxmah@gmail.com>
/* Copyright (c) 2007-20147, Stefan Eilemann <eile@equalizergraphics.com>
* Maxim Makhinya <maxmah@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -48,6 +48,17 @@ class NodeFactory : public eq::NodeFactory

int main( const int argc, char** argv )
{
for( int i=1; i < argc; ++i )
{
if( std::string( argv[ i ]) == "--help" )
{
std::cout << lunchbox::getFilename( argv[0] )
<< ": asynchronous GPU upload example" << std::endl
<< eq::getHelp() << eq::Client::getHelp() << std::endl;
return EXIT_SUCCESS;
}
}

// 1. Equalizer initialization
NodeFactory nodeFactory;
if( !eq::init( argc, argv, &nodeFactory ))
Expand Down
15 changes: 14 additions & 1 deletion examples/eqCPU/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2009-2015, Stefan.Eilemann@epfl.ch
/* Copyright (c) 2009-2017, Stefan.Eilemann@epfl.ch
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -29,12 +29,14 @@
#include "channel.h"
#include "pipe.h"
#include "window.h"

#include <eq/client.h>
#include <eq/config.h>
#include <eq/init.h>
#include <eq/nodeFactory.h>
#include <eq/server.h>
#include <eq/fabric/configParams.h>
#include <lunchbox/file.h>

class NodeFactory : public eq::NodeFactory
{
Expand All @@ -49,6 +51,17 @@ class NodeFactory : public eq::NodeFactory

int main( int argc, char** argv )
{
for( int i=1; i < argc; ++i )
{
if( std::string( argv[ i ]) == "--help" )
{
std::cout << lunchbox::getFilename( argv[0] )
<< ": minimal OpenGL-free Equalizer example " << std::endl
<< eq::getHelp() << eq::Client::getHelp() << std::endl;
return EXIT_SUCCESS;
}
}

// 1. initialization of local node
NodeFactory nodeFactory;
if( !eq::init( argc, argv, &nodeFactory ))
Expand Down
23 changes: 21 additions & 2 deletions examples/eqHello/hello.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2007-2016, Stefan Eilemann <eile@equalizergraphics.com>
/* Copyright (c) 2007-2017, Stefan Eilemann <eile@equalizergraphics.com>
* Daniel Nachbaur <danielnachbaur@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -30,7 +30,11 @@
* rendering spinning quads around the origin.
*/

#include <seq/sequel.h>
#include <seq/seq.h>

#include <eq/gl.h>
#include <lunchbox/file.h>

#include <stdlib.h>

#include <eqHello/fragmentShader.glsl.h>
Expand Down Expand Up @@ -80,6 +84,21 @@ class Application : public seq::Application
virtual ~Application() {}
public:
virtual seq::Renderer* createRenderer() { return new Renderer( *this ); }

bool init( int argc, char** argv, co::Object* initData ) final
{
for( int i=1; i < argc; ++i )
{
if( std::string( argv[ i ]) == "--help" )
{
std::cout << lunchbox::getFilename( argv[0] )
<< ": Equalizer Hello, world!" << std::endl
<< getHelp() << std::endl;
::exit( EXIT_SUCCESS );
}
}
return seq::Application::init( argc, argv, initData );
}
};
typedef lunchbox::RefPtr< Application > ApplicationPtr;
}
Expand Down
13 changes: 12 additions & 1 deletion examples/eqPixelBench/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2007-2014, Stefan Eilemann <eile@equalizergraphics.com>
/* Copyright (c) 2007-2017, Stefan Eilemann <eile@equalizergraphics.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -44,6 +44,17 @@ class NodeFactory : public eq::NodeFactory

int main( int argc, char** argv )
{
for( int i=1; i < argc; ++i )
{
if( std::string( argv[ i ]) == "--help" )
{
std::cout << lunchbox::getFilename( argv[0] )
<< ": benchmark CPU-GPU transfers" << std::endl
<< eq::getHelp() << eq::Client::getHelp() << std::endl;
return EXIT_SUCCESS;
}
}

// 1. initialization of local node
NodeFactory nodeFactory;
if( !eq::init( argc, argv, &nodeFactory ))
Expand Down
8 changes: 5 additions & 3 deletions examples/eqPly/localInitData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2007-2013, Stefan Eilemann <eile@equalizergraphics.com>
/* Copyright (c) 2007-2017, Stefan Eilemann <eile@equalizergraphics.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -104,7 +104,8 @@ void LocalInitData::parseArguments( const int argc, char** argv )

const std::string& desc = EqPly::getHelp();
po::options_description options( desc + " Version " +
eq::Version::getString( ));
eq::Version::getString(),
lunchbox::term::getSize().first );
options.add_options()
( "help,h", po::bool_switch(&showHelp)->default_value( false ),
"produce help message" )
Expand Down Expand Up @@ -160,7 +161,8 @@ void LocalInitData::parseArguments( const int argc, char** argv )
// Evaluate parsed command line options
if( showHelp )
{
std::cout << options << std::endl;
std::cout << options << std::endl
<< eq::getHelp() << eq::Client::getHelp() << std::endl;
eq::exit(); // cppcheck-suppress unreachableCode
::exit( EXIT_SUCCESS );
}
Expand Down
10 changes: 4 additions & 6 deletions examples/seqPly/application.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2011-2016, Stefan Eilemann <eile@eyescale.ch>
/* Copyright (c) 2011-2017, Stefan Eilemann <eile@eyescale.ch>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -106,11 +106,9 @@ eq::Strings Application::_parseArguments( const int argc, char** argv )
po::options_description options(
std::string("seqPly - Sequel polygonal rendering example ")
+ eq::Version::getString( ));
bool showHelp(false);

options.add_options()
( "help,h", po::bool_switch(&showHelp)->default_value(false),
"produce help message" )
( "help,h", "produce help message" )
( "model,m", po::value<std::string>(&userDefinedModelPath),
"ply model file name" );

Expand All @@ -122,9 +120,9 @@ eq::Strings Application::_parseArguments( const int argc, char** argv )
po::notify( variableMap );

// Evaluate parsed command line options
if( showHelp )
if( variableMap.count( "help" ))
{
LBWARN << options << std::endl;
std::cout << options << getHelp() << std::endl;
::exit( EXIT_SUCCESS );
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/seqPly/application.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2011-2016, Stefan Eilemann <eile@eyescale.ch>
/* Copyright (c) 2011-2017, Stefan Eilemann <eile@eyescale.ch>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -29,7 +29,7 @@
#ifndef SEQ_PLY_H
#define SEQ_PLY_H

#include <seq/sequel.h>
#include <seq/seq.h>

#include <frameData.h>
#include <triply/vertexBufferDist.h>
Expand Down
5 changes: 2 additions & 3 deletions examples/seqPly/renderer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2011-2012, Stefan Eilemann <eile@eyescale.ch>
/* Copyright (c) 2011-2017, Stefan Eilemann <eile@eyescale.ch>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -30,7 +30,7 @@
#define SEQ_PLY_RENDERER_H

#include "application.h"
#include <seq/sequel.h>
#include <seq/seq.h>

namespace seqPly
{
Expand All @@ -54,4 +54,3 @@ namespace seqPly
}

#endif // SEQ_PLY_RENDERER_H

3 changes: 1 addition & 2 deletions seq/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Copyright (c) 2011-2015 Stefan Eilemann <eile@eyescale.ch>
# Copyright (c) 2011-2017 Stefan Eilemann <eile@eyescale.ch>

set(SEQUEL_PUBLIC_HEADERS
application.h
error.h
objectType.h
renderer.h
sequel.h
types.h
viewData.h
)
Expand Down
2 changes: 2 additions & 0 deletions seq/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#define EQSEQUEL_RENDERER_H

#include <co/objectFactory.h> // interface

#include <eq/util/objectManager.h> // imported type
#include <seq/types.h>

namespace seq
Expand Down
41 changes: 0 additions & 41 deletions seq/sequel.h

This file was deleted.

15 changes: 14 additions & 1 deletion seq/types.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2011-2016, Stefan Eilemann <eile@eyescale.ch>
/* Copyright (c) 2011-2017, Stefan Eilemann <eile@eyescale.ch>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 2.1 as published
Expand All @@ -21,8 +21,21 @@
#include <seq/api.h>

#include <eq/types.h>

#include <eq/util/shader.h>

#include <eq/fabric/event.h>

/**
* @namespace seq
* @brief Sequel - A simple interface to the Equalizer parallel rendering
* framework.
*
* This namespace provides a simple programming interface to the Equalizer
* parallel rendering framework. Sequel allows rapid development of clustered
* multi-GPU applications while not sacrificing the flexibility and power of the
* underlying Equalizer framework.
*/
namespace seq
{
using namespace eq::util::shader;
Expand Down
8 changes: 6 additions & 2 deletions tests/sequel/reliabilityOff.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2011-2014, Stefan Eilemann <eile@eyescale.ch>
/* Copyright (c) 2011-2017, Stefan Eilemann <eile@eyescale.ch>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 2.1 as published
Expand All @@ -17,7 +17,11 @@

#define EQ_SYSTEM_INCLUDES
#include <lunchbox/test.h>
#include <seq/sequel.h>

#include <seq/seq.h>

#include <lunchbox/clock.h>

#include <stdlib.h>

#ifdef _WIN32
Expand Down

0 comments on commit 12b1721

Please sign in to comment.