pre Kernel full commit
This commit is contained in:
parent
0f3574298d
commit
327d8e9b2f
@ -5,7 +5,7 @@
|
|||||||
# James Turk (jpt2433@rit.edu)
|
# James Turk (jpt2433@rit.edu)
|
||||||
#
|
#
|
||||||
# Version:
|
# Version:
|
||||||
# $Id: SConstruct,v 1.3 2005/03/02 08:46:45 cozman Exp $
|
# $Id: SConstruct,v 1.4 2005/03/04 13:06:49 cozman Exp $
|
||||||
|
|
||||||
import os,os.path
|
import os,os.path
|
||||||
import glob
|
import glob
|
||||||
@ -89,6 +89,10 @@ class Builder:
|
|||||||
self.namedBuild('photon', os.path.join('lib',libName), 'Library',
|
self.namedBuild('photon', os.path.join('lib',libName), 'Library',
|
||||||
default=True,
|
default=True,
|
||||||
source = self.srcFiles, CPPPATH = self.incDirs)
|
source = self.srcFiles, CPPPATH = self.incDirs)
|
||||||
|
self.namedBuild('test00', 'test00', 'Program', default=False,
|
||||||
|
source = 'test00.cpp', CPPPATH = self.incDirs,
|
||||||
|
LIBPATH='./lib',
|
||||||
|
LIBS=['photon','openal32','glfw','opengl32','glu32','physfs'])
|
||||||
self.buildSuperHeader(libName)
|
self.buildSuperHeader(libName)
|
||||||
ndoc = self.env.Command('docs/index.html', './include',
|
ndoc = self.env.Command('docs/index.html', './include',
|
||||||
"""NaturalDocs -nag -i $SOURCES -o HTML ./docs -p ./ndoc""",
|
"""NaturalDocs -nag -i $SOURCES -o HTML ./docs -p ./ndoc""",
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// James Turk (jpt2433@rit.edu)
|
// James Turk (jpt2433@rit.edu)
|
||||||
//
|
//
|
||||||
// Version:
|
// Version:
|
||||||
// $Id: AppCore.hpp,v 1.3 2005/03/02 08:40:51 cozman Exp $
|
// $Id: AppCore.hpp,v 1.4 2005/03/04 13:06:49 cozman Exp $
|
||||||
|
|
||||||
#ifndef PHOTON_APPCORE_HPP
|
#ifndef PHOTON_APPCORE_HPP
|
||||||
#define PHOTON_APPCORE_HPP
|
#define PHOTON_APPCORE_HPP
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// James Turk (jpt2433@rit.edu)
|
// James Turk (jpt2433@rit.edu)
|
||||||
//
|
//
|
||||||
// Version:
|
// Version:
|
||||||
// $Id: entrypoint.hpp,v 1.2 2005/02/16 06:58:05 cozman Exp $
|
// $Id: entrypoint.hpp,v 1.3 2005/03/04 13:06:49 cozman Exp $
|
||||||
|
|
||||||
|
|
||||||
#ifndef PHOTON_ENTRYPOINT_HPP
|
#ifndef PHOTON_ENTRYPOINT_HPP
|
||||||
@ -37,17 +37,18 @@ int mainclass(int argc, char *argv[])
|
|||||||
StrVec args;
|
StrVec args;
|
||||||
for(int i=0; i < argc; ++i)
|
for(int i=0; i < argc; ++i)
|
||||||
args.push_back(argv[i]);
|
args.push_back(argv[i]);
|
||||||
App app(argv[0]);
|
App::setInitOptions(argv[0]);
|
||||||
|
App app;
|
||||||
return app.main(args);
|
return app.main(args);
|
||||||
}
|
}
|
||||||
catch(photon::Exception &e)
|
catch(photon::Exception &e)
|
||||||
{
|
{
|
||||||
photon::log.error() << e;
|
photon::Log::getInstance().error() << e;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
catch(photon::Error &e)
|
catch(photon::Error &e)
|
||||||
{
|
{
|
||||||
photon::log.critical() << e;
|
photon::Log::getInstance().critical() << e;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,13 @@
|
|||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "entrypoint.hpp"
|
#include "entrypoint.hpp"
|
||||||
#include "exceptions.hpp"
|
#include "exceptions.hpp"
|
||||||
|
#include "Kernel.hpp"
|
||||||
#include "Log.hpp"
|
#include "Log.hpp"
|
||||||
#include "LogSink.hpp"
|
#include "LogSink.hpp"
|
||||||
#include "photon.hpp"
|
#include "photon.hpp"
|
||||||
#include "ResourceManaged.hpp"
|
#include "ResourceManaged.hpp"
|
||||||
#include "ResourceManager.hpp"
|
#include "ResourceManager.hpp"
|
||||||
|
#include "Task.hpp"
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
#include "audio/AudioCore.hpp"
|
#include "audio/AudioCore.hpp"
|
||||||
#include "glfw/types_glfw.hpp"
|
#include "glfw/types_glfw.hpp"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// James Turk (jpt2433@rit.edu)
|
// James Turk (jpt2433@rit.edu)
|
||||||
//
|
//
|
||||||
// Version:
|
// Version:
|
||||||
// $Id: Singleton.hpp,v 1.5 2005/03/03 09:25:20 cozman Exp $
|
// $Id: Singleton.hpp,v 1.6 2005/03/04 13:06:49 cozman Exp $
|
||||||
|
|
||||||
#ifndef PHOTON_UTIL_SINGLETON_HPP
|
#ifndef PHOTON_UTIL_SINGLETON_HPP
|
||||||
#define PHOTON_UTIL_SINGLETON_HPP
|
#define PHOTON_UTIL_SINGLETON_HPP
|
||||||
@ -43,7 +43,7 @@ namespace util
|
|||||||
//
|
//
|
||||||
// Using The Singleton:
|
// Using The Singleton:
|
||||||
// (code)
|
// (code)
|
||||||
// YourClass::initialize();
|
// YourClass::initialize(); //optional
|
||||||
// YourClass& yc(YourClass::getInstance());
|
// YourClass& yc(YourClass::getInstance());
|
||||||
//
|
//
|
||||||
// // use yc
|
// // use yc
|
||||||
@ -56,7 +56,9 @@ class Singleton : public boost::noncopyable
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Function: initialize
|
// Function: initialize
|
||||||
// Initialize the instance of the singleton, must be done explicitly.
|
// Initialize the instance of the singleton, can be done explicitly if
|
||||||
|
// order of construction matters. Will be done on first call to
|
||||||
|
// getInstance otherwise.
|
||||||
static void initialize();
|
static void initialize();
|
||||||
|
|
||||||
// Function: destroy
|
// Function: destroy
|
||||||
@ -110,8 +112,7 @@ T& Singleton<T>::getInstance()
|
|||||||
{
|
{
|
||||||
if(instance_.get() == 0)
|
if(instance_.get() == 0)
|
||||||
{
|
{
|
||||||
throw PreconditionException("Attempt to get instance of uninitialized "
|
initialize(); //initialize if nonexistant
|
||||||
"singleton.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return *instance_; //return dereferenced version
|
return *instance_; //return dereferenced version
|
||||||
|
@ -34,10 +34,12 @@ Group: photon:: {
|
|||||||
File: Basic Types (types.hpp)
|
File: Basic Types (types.hpp)
|
||||||
File: Entrypoint (entrypoint.hpp)
|
File: Entrypoint (entrypoint.hpp)
|
||||||
File: Exception/Error Types (exceptions.hpp)
|
File: Exception/Error Types (exceptions.hpp)
|
||||||
|
File: Kernel (Kernel.hpp)
|
||||||
File: Log (Log.hpp)
|
File: Log (Log.hpp)
|
||||||
File: Logging Utilities (LogSink.hpp)
|
File: Logging Utilities (LogSink.hpp)
|
||||||
File: ResourceManaged (ResourceManaged.hpp)
|
File: ResourceManaged (ResourceManaged.hpp)
|
||||||
File: ResourceManager (ResourceManager.hpp)
|
File: ResourceManager (ResourceManager.hpp)
|
||||||
|
File: Task (Task.hpp)
|
||||||
|
|
||||||
Group: audio:: {
|
Group: audio:: {
|
||||||
|
|
||||||
@ -70,6 +72,7 @@ Group: photon:: {
|
|||||||
File: VideoCore (video\VideoCore.hpp)
|
File: VideoCore (video\VideoCore.hpp)
|
||||||
} # Group: video::
|
} # Group: video::
|
||||||
|
|
||||||
|
|
||||||
} # Group: photon::
|
} # Group: photon::
|
||||||
|
|
||||||
Group: Index {
|
Group: Index {
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
// James Turk (jpt2433@rit.edu)
|
// James Turk (jpt2433@rit.edu)
|
||||||
//
|
//
|
||||||
// Version:
|
// Version:
|
||||||
// $Id: AppCore.cpp,v 1.3 2005/03/02 08:43:33 cozman Exp $
|
// $Id: AppCore.cpp,v 1.4 2005/03/04 13:06:49 cozman Exp $
|
||||||
|
|
||||||
#include "AppCore.hpp"
|
#include "AppCore.hpp"
|
||||||
|
|
||||||
|
#include <boost/lexical_cast.hpp>
|
||||||
#include "glfw.h" //This file depends on glfw
|
#include "glfw.h" //This file depends on glfw
|
||||||
|
|
||||||
#include "exceptions.hpp"
|
#include "exceptions.hpp"
|
||||||
@ -34,6 +35,8 @@ void AppCore::createDisplay(uint width, uint height,
|
|||||||
dispHeight_ = height;
|
dispHeight_ = height;
|
||||||
|
|
||||||
glfwSetWindowTitle(title.c_str()); // title is set separately
|
glfwSetWindowTitle(title.c_str()); // title is set separately
|
||||||
|
|
||||||
|
quitRequested_ = false; //now that a window is open, no quit requested
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppCore::createDisplay(uint width, uint height, uint bpp,
|
void AppCore::createDisplay(uint width, uint height, uint bpp,
|
||||||
@ -41,7 +44,7 @@ void AppCore::createDisplay(uint width, uint height, uint bpp,
|
|||||||
const std::string &title)
|
const std::string &title)
|
||||||
{
|
{
|
||||||
// call main version of createDisplay with individual values for rgba bits
|
// call main version of createDisplay with individual values for rgba bits
|
||||||
switch(depthBits)
|
switch(bpp)
|
||||||
{
|
{
|
||||||
case 8:
|
case 8:
|
||||||
createDisplay(width, height, 3, 3, 2, 0, depthBits, stencilBits,
|
createDisplay(width, height, 3, 3, 2, 0, depthBits, stencilBits,
|
||||||
@ -61,7 +64,8 @@ void AppCore::createDisplay(uint width, uint height, uint bpp,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw ArgumentException("bpp argument of createDisplay must be "
|
throw ArgumentException("bpp argument of createDisplay must be "
|
||||||
"8,16,24, or 32.");
|
"8,16,24, or 32, passed " +
|
||||||
|
boost::lexical_cast<std::string>(bpp) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user