work on Texture, still not showing up.. but close (fixed segfault/bad viewport error)
This commit is contained in:
parent
7451b89ef4
commit
f34c0ac903
@ -5,7 +5,7 @@
|
||||
# James Turk (jpt2433@rit.edu)
|
||||
#
|
||||
# Version:
|
||||
# $Id: SConstruct,v 1.11 2005/06/10 07:06:06 cozman Exp $
|
||||
# $Id: SConstruct,v 1.12 2005/06/11 05:28:41 cozman Exp $
|
||||
|
||||
import os,os.path
|
||||
import glob
|
||||
@ -91,6 +91,6 @@ for test_src in test_srcs:
|
||||
test_name = test_src.replace('_test.cpp','')
|
||||
tests.append(env.Program(test_name, source=test_src, CPPPATH = INC_DIRS,
|
||||
LIBPATH='./lib', CPPFLAGS = '-Wall -pedantic',
|
||||
LIBS=['photon',OAL_LIB,'glfw',OGL_LIB,GLU_LIB,'physfs']))
|
||||
LIBS=['photon',OAL_LIB,'glfw',OGL_LIB,GLU_LIB,'physfs','corona']))
|
||||
env.Alias('test',tests)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: ResourceManager.hpp,v 1.3 2005/06/10 07:06:06 cozman Exp $
|
||||
// $Id: ResourceManager.hpp,v 1.4 2005/06/11 05:28:41 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_RESOURCEMANAGER_HPP
|
||||
#define PHOTON_RESOURCEMANAGER_HPP
|
||||
@ -53,11 +53,12 @@ public:
|
||||
void delRef(uint id);
|
||||
void cleanUp();
|
||||
|
||||
uint newResource(const std::string& name, const std::string& path);
|
||||
|
||||
private:
|
||||
virtual void loadResource(resT &res, const std::string& path)=0;
|
||||
virtual void freeResource(resT &res)=0;
|
||||
|
||||
uint newResource(const std::string& name, const std::string& path);
|
||||
void deleteResource(uint id);
|
||||
|
||||
protected:
|
||||
|
@ -17,6 +17,10 @@
|
||||
<node ID="Freemind_Link_50716011" TEXT="Texture">
|
||||
<node ID="Freemind_Link_561271163" TEXT="Font"/>
|
||||
<node ID="Freemind_Link_385334177" TEXT="Image"/>
|
||||
<node ID="Freemind_Link_973985797" TEXT="TEST">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
<node ID="Freemind_Link_1851655735" TEXT="Music"/>
|
||||
<node ID="Freemind_Link_1045379727" TEXT="Sound"/>
|
||||
@ -71,7 +75,7 @@
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
</node>
|
||||
<node ID="Freemind_Link_351891371" POSITION="left" TEXT="General Mateinance">
|
||||
<node FOLDED="true" ID="Freemind_Link_351891371" POSITION="left" TEXT="General Mateinance">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_1978849189" TEXT="Clean up CVS">
|
||||
<font NAME="SansSerif" SIZE="12"/>
|
||||
@ -80,7 +84,6 @@
|
||||
</node>
|
||||
<node ID="Freemind_Link_682620075" POSITION="left" TEXT="Current Problems">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_1953928405" TEXT="Tests do not seem to compile (since ResourceManagers)"/>
|
||||
</node>
|
||||
</node>
|
||||
</map>
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: AppCore.cpp,v 1.6 2005/04/21 19:30:19 cozman Exp $
|
||||
// $Id: AppCore.cpp,v 1.7 2005/06/11 05:28:41 cozman Exp $
|
||||
|
||||
#include "AppCore.hpp"
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
#include "Kernel.hpp"
|
||||
#include "exceptions.hpp"
|
||||
#include "video/VideoCore.hpp"
|
||||
|
||||
namespace photon
|
||||
{
|
||||
@ -50,6 +51,7 @@ void AppCore::createDisplay(uint width, uint height,
|
||||
|
||||
dispWidth_ = width;
|
||||
dispHeight_ = height;
|
||||
video::VideoCore::getInstance().setDisplaySize(width,height);
|
||||
|
||||
glfwSetWindowTitle(title.c_str()); // title is set separately
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Application.cpp,v 1.8 2005/05/15 02:50:52 cozman Exp $
|
||||
// $Id: Application.cpp,v 1.9 2005/06/11 05:28:41 cozman Exp $
|
||||
|
||||
#include "Application.hpp"
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
#include "AppCore.hpp"
|
||||
#include "video/VideoCore.hpp"
|
||||
#include "audio/AudioCore.hpp"
|
||||
#include "util/filesys/filesys.hpp"
|
||||
|
||||
|
||||
namespace photon
|
||||
{
|
||||
@ -33,7 +35,7 @@ Application::Application() :
|
||||
new Kernel;
|
||||
new AppCore;
|
||||
new video::VideoCore;
|
||||
new audio::AudioCore;
|
||||
//new audio::AudioCore;
|
||||
|
||||
// StrVec args;
|
||||
//
|
||||
@ -52,7 +54,7 @@ Application::~Application()
|
||||
// destroy the singletons
|
||||
AppCore::destroy();
|
||||
video::VideoCore::destroy();
|
||||
audio::AudioCore::destroy();
|
||||
//audio::AudioCore::destroy();
|
||||
Kernel::destroy();
|
||||
}
|
||||
|
||||
@ -65,7 +67,7 @@ util::VersionInfo Application::initPhysFS()
|
||||
{
|
||||
PHYSFS_Version ver;
|
||||
PHYSFS_init(arg0_.c_str());
|
||||
PHYSFS_addToSearchPath(arg0_.c_str(),0);
|
||||
PHYSFS_addToSearchPath(PHYSFS_getBaseDir(),0);
|
||||
PHYSFS_getLinkedVersion(&ver);
|
||||
return util::VersionInfo(ver.major, ver.minor, ver.patch);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: FileBuffer.cpp,v 1.5 2005/06/10 07:06:06 cozman Exp $
|
||||
// $Id: FileBuffer.cpp,v 1.6 2005/06/11 05:28:41 cozman Exp $
|
||||
|
||||
#include "util/FileBuffer.hpp"
|
||||
|
||||
@ -21,9 +21,10 @@ FileBuffer::FileBuffer() :
|
||||
{}
|
||||
|
||||
|
||||
FileBuffer::FileBuffer(const std::string& filename) :
|
||||
file_( PHYSFS_openRead(filename.c_str()) )
|
||||
{}
|
||||
FileBuffer::FileBuffer(const std::string& filename)
|
||||
{
|
||||
open(filename);
|
||||
}
|
||||
|
||||
FileBuffer::~FileBuffer()
|
||||
{}
|
||||
@ -31,6 +32,10 @@ FileBuffer::~FileBuffer()
|
||||
void FileBuffer::open(const std::string& filename)
|
||||
{
|
||||
file_ = PHYSFS_openRead(filename.c_str());
|
||||
if(file_ == 0)
|
||||
{
|
||||
throw ResourceException();
|
||||
}
|
||||
}
|
||||
|
||||
void FileBuffer::close()
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: VideoCore.cpp,v 1.3 2005/04/21 19:30:19 cozman Exp $
|
||||
// $Id: VideoCore.cpp,v 1.4 2005/06/11 05:28:41 cozman Exp $
|
||||
|
||||
#include "video/VideoCore.hpp"
|
||||
|
||||
@ -126,6 +126,7 @@ void VideoCore::initOpenGL()
|
||||
|
||||
//setup alpha blending of 2D textures with the scene
|
||||
glEnable(GL_BLEND);
|
||||
glDisable(GL_LIGHTING);
|
||||
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user