pre Kernel full commit
This commit is contained in:
parent
0f3574298d
commit
327d8e9b2f
@ -5,7 +5,7 @@
|
||||
# James Turk (jpt2433@rit.edu)
|
||||
#
|
||||
# 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 glob
|
||||
@ -89,6 +89,10 @@ class Builder:
|
||||
self.namedBuild('photon', os.path.join('lib',libName), 'Library',
|
||||
default=True,
|
||||
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)
|
||||
ndoc = self.env.Command('docs/index.html', './include',
|
||||
"""NaturalDocs -nag -i $SOURCES -o HTML ./docs -p ./ndoc""",
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// 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
|
||||
#define PHOTON_APPCORE_HPP
|
||||
@ -50,7 +50,7 @@ public:
|
||||
void createDisplay(uint width, uint height,
|
||||
uint redBits, uint greenBits, uint blueBits,
|
||||
uint alphaBits, uint depthBits, uint stencilBits,
|
||||
bool fullscreen, const std::string &title);
|
||||
bool fullscreen, const std::string& title);
|
||||
|
||||
// Function: createDisplay
|
||||
// This function attempts to create a display with the given parameters.
|
||||
@ -65,7 +65,7 @@ public:
|
||||
// title - title of application
|
||||
void createDisplay(uint width, uint height, uint bpp,
|
||||
uint depthBits, uint stencilBits, bool fullscreen,
|
||||
const std::string &title);
|
||||
const std::string& title);
|
||||
|
||||
// Group: Input
|
||||
public:
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// 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
|
||||
@ -37,17 +37,18 @@ int mainclass(int argc, char *argv[])
|
||||
StrVec args;
|
||||
for(int i=0; i < argc; ++i)
|
||||
args.push_back(argv[i]);
|
||||
App app(argv[0]);
|
||||
App::setInitOptions(argv[0]);
|
||||
App app;
|
||||
return app.main(args);
|
||||
}
|
||||
catch(photon::Exception &e)
|
||||
{
|
||||
photon::log.error() << e;
|
||||
photon::Log::getInstance().error() << e;
|
||||
return 0;
|
||||
}
|
||||
catch(photon::Error &e)
|
||||
{
|
||||
photon::log.critical() << e;
|
||||
photon::Log::getInstance().critical() << e;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -5,11 +5,13 @@
|
||||
#include "Application.hpp"
|
||||
#include "entrypoint.hpp"
|
||||
#include "exceptions.hpp"
|
||||
#include "Kernel.hpp"
|
||||
#include "Log.hpp"
|
||||
#include "LogSink.hpp"
|
||||
#include "photon.hpp"
|
||||
#include "ResourceManaged.hpp"
|
||||
#include "ResourceManager.hpp"
|
||||
#include "Task.hpp"
|
||||
#include "types.hpp"
|
||||
#include "audio/AudioCore.hpp"
|
||||
#include "glfw/types_glfw.hpp"
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// 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
|
||||
#define PHOTON_UTIL_SINGLETON_HPP
|
||||
@ -43,7 +43,7 @@ namespace util
|
||||
//
|
||||
// Using The Singleton:
|
||||
// (code)
|
||||
// YourClass::initialize();
|
||||
// YourClass::initialize(); //optional
|
||||
// YourClass& yc(YourClass::getInstance());
|
||||
//
|
||||
// // use yc
|
||||
@ -56,7 +56,9 @@ class Singleton : public boost::noncopyable
|
||||
public:
|
||||
|
||||
// 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();
|
||||
|
||||
// Function: destroy
|
||||
@ -110,8 +112,7 @@ T& Singleton<T>::getInstance()
|
||||
{
|
||||
if(instance_.get() == 0)
|
||||
{
|
||||
throw PreconditionException("Attempt to get instance of uninitialized "
|
||||
"singleton.");
|
||||
initialize(); //initialize if nonexistant
|
||||
}
|
||||
|
||||
return *instance_; //return dereferenced version
|
||||
|
@ -34,10 +34,12 @@ Group: photon:: {
|
||||
File: Basic Types (types.hpp)
|
||||
File: Entrypoint (entrypoint.hpp)
|
||||
File: Exception/Error Types (exceptions.hpp)
|
||||
File: Kernel (Kernel.hpp)
|
||||
File: Log (Log.hpp)
|
||||
File: Logging Utilities (LogSink.hpp)
|
||||
File: ResourceManaged (ResourceManaged.hpp)
|
||||
File: ResourceManager (ResourceManager.hpp)
|
||||
File: Task (Task.hpp)
|
||||
|
||||
Group: audio:: {
|
||||
|
||||
@ -70,6 +72,7 @@ Group: photon:: {
|
||||
File: VideoCore (video\VideoCore.hpp)
|
||||
} # Group: video::
|
||||
|
||||
|
||||
} # Group: photon::
|
||||
|
||||
Group: Index {
|
||||
|
@ -5,10 +5,11 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// 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 <boost/lexical_cast.hpp>
|
||||
#include "glfw.h" //This file depends on glfw
|
||||
|
||||
#include "exceptions.hpp"
|
||||
@ -34,6 +35,8 @@ void AppCore::createDisplay(uint width, uint height,
|
||||
dispHeight_ = height;
|
||||
|
||||
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,
|
||||
@ -41,7 +44,7 @@ void AppCore::createDisplay(uint width, uint height, uint bpp,
|
||||
const std::string &title)
|
||||
{
|
||||
// call main version of createDisplay with individual values for rgba bits
|
||||
switch(depthBits)
|
||||
switch(bpp)
|
||||
{
|
||||
case 8:
|
||||
createDisplay(width, height, 3, 3, 2, 0, depthBits, stencilBits,
|
||||
@ -61,7 +64,8 @@ void AppCore::createDisplay(uint width, uint height, uint bpp,
|
||||
break;
|
||||
default:
|
||||
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