Implemented texture and VBO swapping system that keeps GPU memory utilization within limits
--HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4091
This commit is contained in:
@@ -296,6 +296,7 @@
|
|||||||
E4BBBB961512A46700F43B5B /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; };
|
E4BBBB961512A46700F43B5B /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
E4BBBB981512A47500F43B5B /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreData.framework; sourceTree = DEVELOPER_DIR; };
|
E4BBBB981512A47500F43B5B /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreData.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
E4BBBB9A1512A48200F43B5B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
|
E4BBBB9A1512A48200F43B5B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
|
E4CE184815FEEDA200F80870 /* font.pvr */ = {isa = PBXFileReference; lastKnownFileType = file; name = font.pvr; path = Shaders/font.pvr; sourceTree = "<group>"; };
|
||||||
E4D133B91538F7480070068C /* light_directional.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.fsh; path = Shaders/light_directional.fsh; sourceTree = "<group>"; };
|
E4D133B91538F7480070068C /* light_directional.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.fsh; path = Shaders/light_directional.fsh; sourceTree = "<group>"; };
|
||||||
E4D133BB1538F7560070068C /* light_directional.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.vsh; path = Shaders/light_directional.vsh; sourceTree = "<group>"; };
|
E4D133BB1538F7560070068C /* light_directional.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.vsh; path = Shaders/light_directional.vsh; sourceTree = "<group>"; };
|
||||||
E4F711A41512BB56007EE923 /* libfbxsdk-2012.2-static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfbxsdk-2012.2-static.a"; path = "../../../../../../../../Applications/Autodesk/FBXSDK20122/lib/gcc4/ub/libfbxsdk-2012.2-static.a"; sourceTree = "<group>"; };
|
E4F711A41512BB56007EE923 /* libfbxsdk-2012.2-static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfbxsdk-2012.2-static.a"; path = "../../../../../../../../Applications/Autodesk/FBXSDK20122/lib/gcc4/ub/libfbxsdk-2012.2-static.a"; sourceTree = "<group>"; };
|
||||||
@@ -547,12 +548,12 @@
|
|||||||
E491016613C99B9E0098455B /* KREngine */ = {
|
E491016613C99B9E0098455B /* KREngine */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
E4CE184615FEED6800F80870 /* Standard Assets */,
|
||||||
E491016E13C99BAE0098455B /* Classes */,
|
E491016E13C99BAE0098455B /* Classes */,
|
||||||
E4924C2415EE95E700B965C6 /* KROctree.cpp */,
|
E4924C2415EE95E700B965C6 /* KROctree.cpp */,
|
||||||
E4924C2515EE95E800B965C6 /* KROctree.h */,
|
E4924C2515EE95E800B965C6 /* KROctree.h */,
|
||||||
E4924C2915EE96AA00B965C6 /* KROctreeNode.cpp */,
|
E4924C2915EE96AA00B965C6 /* KROctreeNode.cpp */,
|
||||||
E4924C2A15EE96AA00B965C6 /* KROctreeNode.h */,
|
E4924C2A15EE96AA00B965C6 /* KROctreeNode.h */,
|
||||||
E45772E313C99F160037BEEA /* Shaders */,
|
|
||||||
E491016713C99B9E0098455B /* Supporting Files */,
|
E491016713C99B9E0098455B /* Supporting Files */,
|
||||||
);
|
);
|
||||||
path = KREngine;
|
path = KREngine;
|
||||||
@@ -627,6 +628,15 @@
|
|||||||
name = "OSX Frameworks";
|
name = "OSX Frameworks";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
E4CE184615FEED6800F80870 /* Standard Assets */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
E4CE184815FEEDA200F80870 /* font.pvr */,
|
||||||
|
E45772E313C99F160037BEEA /* Shaders */,
|
||||||
|
);
|
||||||
|
name = "Standard Assets";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
E4F9753815362A5200FD60B2 /* 3rdparty */ = {
|
E4F9753815362A5200FD60B2 /* 3rdparty */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|||||||
@@ -416,6 +416,7 @@ void KRCamera::renderFrame(KRScene &scene, KRMat4 &viewMatrix, KRVector3 &lightD
|
|||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_TRUE);
|
||||||
|
|
||||||
|
|
||||||
|
fprintf(stderr, "VBO Mem: %i Kbyte Texture Mem: %i Kbyte\n", (int)m_pContext->getModelManager()->getMemUsed() / 1024, (int)m_pContext->getTextureManager()->getMemUsed() / 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ double const PI = 3.141592653589793f;
|
|||||||
NSFileManager* fileManager = [NSFileManager defaultManager];
|
NSFileManager* fileManager = [NSFileManager defaultManager];
|
||||||
NSString *bundle_directory = [[NSBundle mainBundle] bundlePath];
|
NSString *bundle_directory = [[NSBundle mainBundle] bundlePath];
|
||||||
for (NSString* fileName in [fileManager contentsOfDirectoryAtPath: bundle_directory error:nil]) {
|
for (NSString* fileName in [fileManager contentsOfDirectoryAtPath: bundle_directory error:nil]) {
|
||||||
if([fileName hasSuffix: @".vsh"] || [fileName hasSuffix: @".fsh"]) {
|
if([fileName hasSuffix: @".vsh"] || [fileName hasSuffix: @".fsh"] || [fileName isEqualToString:@"font.pvr"]) {
|
||||||
NSString* path = [NSString stringWithFormat:@"%@/%@", bundle_directory, fileName];
|
NSString* path = [NSString stringWithFormat:@"%@/%@", bundle_directory, fileName];
|
||||||
_context->loadResource([path UTF8String]);
|
_context->loadResource([path UTF8String]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
KRModelManager::KRModelManager(KRContext &context) : KRContextObject(context) {
|
KRModelManager::KRModelManager(KRContext &context) : KRContextObject(context) {
|
||||||
m_currentVBO.handle = 0;
|
m_currentVBO.handle = 0;
|
||||||
m_currentVBO.data = NULL;
|
m_currentVBO.data = NULL;
|
||||||
|
m_vboMemUsed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
KRModelManager::~KRModelManager() {
|
KRModelManager::~KRModelManager() {
|
||||||
@@ -74,20 +75,23 @@ void KRModelManager::bindVBO(const GLvoid *data, GLsizeiptr size) {
|
|||||||
assert(m_currentVBO.size == size);
|
assert(m_currentVBO.size == size);
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, m_currentVBO.handle);
|
glBindBuffer(GL_ARRAY_BUFFER, m_currentVBO.handle);
|
||||||
} else {
|
} else {
|
||||||
|
m_vboMemUsed += size;
|
||||||
|
|
||||||
while(m_vbos.size() >= KRENGINE_MAX_VBO_HANDLES) {
|
while(m_vbos.size() >= KRENGINE_MAX_VBO_HANDLES || m_vboMemUsed >= KRENGINE_MAX_VBO_MEM) {
|
||||||
// TODO - This should maintain a max size limit for VBO's rather than a limit on the number of VBO's. As meshes are split to multiple small VBO's, this is not too bad, but still not optimial.
|
// TODO - This should maintain a max size limit for VBO's rather than a limit on the number of VBO's. As meshes are split to multiple small VBO's, this is not too bad, but still not optimial.
|
||||||
std::map<const GLvoid *, vbo_info_type>::iterator first_itr = m_vbos.begin();
|
std::map<const GLvoid *, vbo_info_type>::iterator first_itr = m_vbos.begin();
|
||||||
vbo_info_type firstVBO = first_itr->second;
|
vbo_info_type firstVBO = first_itr->second;
|
||||||
glDeleteBuffers(1, &firstVBO.handle);
|
glDeleteBuffers(1, &firstVBO.handle);
|
||||||
|
m_vboMemUsed -= firstVBO.size;
|
||||||
m_vbos.erase(first_itr);
|
m_vbos.erase(first_itr);
|
||||||
fprintf(stderr, "VBO Swapping...");
|
fprintf(stderr, "VBO Swapping...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_currentVBO.handle = -1;
|
m_currentVBO.handle = -1;
|
||||||
glGenBuffers(1, &m_currentVBO.handle);
|
glGenBuffers(1, &m_currentVBO.handle);
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, m_currentVBO.handle);
|
glBindBuffer(GL_ARRAY_BUFFER, m_currentVBO.handle);
|
||||||
glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
|
glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
|
||||||
|
|
||||||
m_currentVBO.size = size;
|
m_currentVBO.size = size;
|
||||||
m_currentVBO.data = data;
|
m_currentVBO.data = data;
|
||||||
|
|
||||||
@@ -96,3 +100,7 @@ void KRModelManager::bindVBO(const GLvoid *data, GLsizeiptr size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long KRModelManager::getMemUsed()
|
||||||
|
{
|
||||||
|
return m_vboMemUsed;
|
||||||
|
}
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
#ifndef KRMODELMANAGER_H
|
#ifndef KRMODELMANAGER_H
|
||||||
#define KRMODELMANAGER_H
|
#define KRMODELMANAGER_H
|
||||||
|
|
||||||
#define KRENGINE_MAX_VBO_HANDLES 50
|
#define KRENGINE_MAX_VBO_HANDLES 1000
|
||||||
|
#define KRENGINE_MAX_VBO_MEM 100000000
|
||||||
|
|
||||||
#import "KREngine-common.h"
|
#import "KREngine-common.h"
|
||||||
#import "KRContextObject.h"
|
#import "KRContextObject.h"
|
||||||
@@ -59,6 +60,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void bindVBO(const GLvoid *data, GLsizeiptr size);
|
void bindVBO(const GLvoid *data, GLsizeiptr size);
|
||||||
|
long getMemUsed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<std::string, KRModel *> m_models;
|
std::map<std::string, KRModel *> m_models;
|
||||||
@@ -69,6 +71,7 @@ private:
|
|||||||
const GLvoid *data;
|
const GLvoid *data;
|
||||||
} vbo_info_type;
|
} vbo_info_type;
|
||||||
|
|
||||||
|
long m_vboMemUsed;
|
||||||
vbo_info_type m_currentVBO;
|
vbo_info_type m_currentVBO;
|
||||||
|
|
||||||
std::map<const GLvoid *, vbo_info_type> m_vbos;
|
std::map<const GLvoid *, vbo_info_type> m_vbos;
|
||||||
|
|||||||
@@ -274,7 +274,6 @@ KRScene *KRScene::Load(KRContext &context, const std::string &name, KRDataBlock
|
|||||||
{
|
{
|
||||||
data->append((void *)"\0", 1); // Ensure data is null terminated, to read as a string safely
|
data->append((void *)"\0", 1); // Ensure data is null terminated, to read as a string safely
|
||||||
tinyxml2::XMLDocument doc;
|
tinyxml2::XMLDocument doc;
|
||||||
fprintf(stderr, "Scene Content: %s\n", data->getStart());
|
|
||||||
doc.Parse((char *)data->getStart());
|
doc.Parse((char *)data->getStart());
|
||||||
KRScene *new_scene = new KRScene(context, name);
|
KRScene *new_scene = new KRScene(context, name);
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,8 @@ KRTexture::KRTexture(KRDataBlock *data, KRTextureManager *manager) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
KRTexture::~KRTexture() {
|
KRTexture::~KRTexture() {
|
||||||
releaseHandle();
|
long textureMemFreed = 0;
|
||||||
|
releaseHandle(textureMemFreed);
|
||||||
delete m_pData;
|
delete m_pData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,10 +206,14 @@ bool KRTexture::createGLTexture() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint KRTexture::getHandle() {
|
GLuint KRTexture::getHandle(long &textureMemUsed) {
|
||||||
if(m_iName == 0) {
|
if(m_iName == 0) {
|
||||||
if(!createGLTexture()) {
|
if(!createGLTexture()) {
|
||||||
createGLTexture(); // FINDME - HACK! The first texture fails with 0x501 return code but loads on second try
|
if(createGLTexture()) { // FINDME - HACK! The first texture fails with 0x501 return code but loads on second try
|
||||||
|
textureMemUsed += getMemSize();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
textureMemUsed += getMemSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
createGLTexture();
|
createGLTexture();
|
||||||
@@ -216,9 +221,14 @@ GLuint KRTexture::getHandle() {
|
|||||||
return m_iName;
|
return m_iName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KRTexture::releaseHandle() {
|
void KRTexture::releaseHandle(long &textureMemUsed) {
|
||||||
if(m_iName != 0) {
|
if(m_iName != 0) {
|
||||||
|
textureMemUsed -= getMemSize();
|
||||||
glDeleteTextures(1, &m_iName);
|
glDeleteTextures(1, &m_iName);
|
||||||
m_iName = 0;
|
m_iName = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long KRTexture::getMemSize() {
|
||||||
|
return m_pData->getSize(); // TODO - This is not 100% accurate, as loaded format may differ in size while in GPU memory
|
||||||
|
}
|
||||||
|
|||||||
@@ -49,8 +49,10 @@ public:
|
|||||||
~KRTexture();
|
~KRTexture();
|
||||||
|
|
||||||
bool createGLTexture();
|
bool createGLTexture();
|
||||||
GLuint getHandle();
|
GLuint getHandle(long &textureMemUsed);
|
||||||
void releaseHandle();
|
void releaseHandle(long &textureMemUsed);
|
||||||
|
|
||||||
|
long getMemSize();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -72,6 +74,7 @@ private:
|
|||||||
bool load();
|
bool load();
|
||||||
|
|
||||||
KRTextureManager *m_pManager;
|
KRTextureManager *m_pManager;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
KRTextureManager::KRTextureManager(KRContext &context) : KRContextObject(context) {
|
KRTextureManager::KRTextureManager(KRContext &context) : KRContextObject(context) {
|
||||||
|
m_textureMemUsed = 0;
|
||||||
for(int iTexture=0; iTexture<KRENGINE_MAX_TEXTURE_UNITS; iTexture++) {
|
for(int iTexture=0; iTexture<KRENGINE_MAX_TEXTURE_UNITS; iTexture++) {
|
||||||
m_activeTextures[iTexture] = NULL;
|
m_activeTextures[iTexture] = NULL;
|
||||||
}
|
}
|
||||||
@@ -81,7 +82,7 @@ void KRTextureManager::selectTexture(int iTextureUnit, KRTexture *pTexture) {
|
|||||||
glActiveTexture(GL_TEXTURE0 + iTextureUnit);
|
glActiveTexture(GL_TEXTURE0 + iTextureUnit);
|
||||||
if(pTexture != NULL) {
|
if(pTexture != NULL) {
|
||||||
m_textureCache.erase(pTexture); // Ensure that the texture will not be deleted while it is bound to a texture unit, and return it to the top of the texture cache when it is released
|
m_textureCache.erase(pTexture); // Ensure that the texture will not be deleted while it is bound to a texture unit, and return it to the top of the texture cache when it is released
|
||||||
glBindTexture(GL_TEXTURE_2D, pTexture->getHandle());
|
glBindTexture(GL_TEXTURE_2D, pTexture->getHandle(m_textureMemUsed));
|
||||||
// TODO - These texture parameters should be assigned by the material or texture parameters
|
// TODO - These texture parameters should be assigned by the material or texture parameters
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||||
@@ -91,6 +92,7 @@ void KRTextureManager::selectTexture(int iTextureUnit, KRTexture *pTexture) {
|
|||||||
}
|
}
|
||||||
if(m_activeTextures[iTextureUnit] != NULL) {
|
if(m_activeTextures[iTextureUnit] != NULL) {
|
||||||
KRTexture *unloadedTexture = m_activeTextures[iTextureUnit];
|
KRTexture *unloadedTexture = m_activeTextures[iTextureUnit];
|
||||||
|
m_activeTextures[iTextureUnit] = NULL;
|
||||||
bool bActive = false;
|
bool bActive = false;
|
||||||
for(int iTexture=0; iTexture < KRENGINE_MAX_TEXTURE_UNITS; iTexture++) {
|
for(int iTexture=0; iTexture < KRENGINE_MAX_TEXTURE_UNITS; iTexture++) {
|
||||||
if(m_activeTextures[iTexture] == unloadedTexture) {
|
if(m_activeTextures[iTexture] == unloadedTexture) {
|
||||||
@@ -101,10 +103,10 @@ void KRTextureManager::selectTexture(int iTextureUnit, KRTexture *pTexture) {
|
|||||||
// Only return a texture to the cache when the last texture unit referencing it is re-assigned to a different texture
|
// Only return a texture to the cache when the last texture unit referencing it is re-assigned to a different texture
|
||||||
if(m_textureCache.find(unloadedTexture) == m_textureCache.end()) {
|
if(m_textureCache.find(unloadedTexture) == m_textureCache.end()) {
|
||||||
m_textureCache.insert(unloadedTexture);
|
m_textureCache.insert(unloadedTexture);
|
||||||
while(m_textureCache.size() > KRENGINE_MAX_TEXTURE_HANDLES) {
|
while(m_textureCache.size() > KRENGINE_MAX_TEXTURE_HANDLES || m_textureMemUsed > KRENGINE_MAX_TEXTURE_MEM) {
|
||||||
// Keep texture size within limits
|
// Keep texture size within limits
|
||||||
KRTexture *droppedTexture = (*m_textureCache.begin());
|
KRTexture *droppedTexture = (*m_textureCache.begin());
|
||||||
droppedTexture->releaseHandle();
|
droppedTexture->releaseHandle(m_textureMemUsed);
|
||||||
m_textureCache.erase(droppedTexture);
|
m_textureCache.erase(droppedTexture);
|
||||||
fprintf(stderr, "Texture Swapping...\n");
|
fprintf(stderr, "Texture Swapping...\n");
|
||||||
}
|
}
|
||||||
@@ -115,3 +117,7 @@ void KRTextureManager::selectTexture(int iTextureUnit, KRTexture *pTexture) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long KRTextureManager::getMemUsed() {
|
||||||
|
return m_textureMemUsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#define KRENGINE_MAX_TEXTURE_UNITS 8
|
#define KRENGINE_MAX_TEXTURE_UNITS 8
|
||||||
#define KRENGINE_MAX_TEXTURE_HANDLES 20
|
#define KRENGINE_MAX_TEXTURE_HANDLES 1000
|
||||||
|
#define KRENGINE_MAX_TEXTURE_MEM 100000000
|
||||||
|
|
||||||
#ifndef KRTEXTUREMANAGER_H
|
#ifndef KRTEXTUREMANAGER_H
|
||||||
#define KRTEXTUREMANAGER_H
|
#define KRTEXTUREMANAGER_H
|
||||||
@@ -58,11 +59,15 @@ public:
|
|||||||
|
|
||||||
KRTexture *getTexture(const char *szFile);
|
KRTexture *getTexture(const char *szFile);
|
||||||
|
|
||||||
|
long getMemUsed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<std::string, KRTexture *> m_textures;
|
std::map<std::string, KRTexture *> m_textures;
|
||||||
|
|
||||||
KRTexture *m_activeTextures[KRENGINE_MAX_TEXTURE_UNITS];
|
KRTexture *m_activeTextures[KRENGINE_MAX_TEXTURE_UNITS];
|
||||||
std::set<KRTexture *> m_textureCache;
|
std::set<KRTexture *> m_textureCache;
|
||||||
|
|
||||||
|
long m_textureMemUsed;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
BIN
KREngine/KREngine/Shaders/font.pvr
Normal file
BIN
KREngine/KREngine/Shaders/font.pvr
Normal file
Binary file not shown.
@@ -41,6 +41,7 @@
|
|||||||
E49EB29C13806C5D00A4E727 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = E49EB29B13806C5D00A4E727 /* MainWindow-iPad.xib */; };
|
E49EB29C13806C5D00A4E727 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = E49EB29B13806C5D00A4E727 /* MainWindow-iPad.xib */; };
|
||||||
E4A9DEC715412923009DF363 /* light_point.fsh in Resources */ = {isa = PBXBuildFile; fileRef = E4A9DEC2154128F0009DF363 /* light_point.fsh */; };
|
E4A9DEC715412923009DF363 /* light_point.fsh in Resources */ = {isa = PBXBuildFile; fileRef = E4A9DEC2154128F0009DF363 /* light_point.fsh */; };
|
||||||
E4A9DEC815412923009DF363 /* light_point.vsh in Resources */ = {isa = PBXBuildFile; fileRef = E4A9DEC515412906009DF363 /* light_point.vsh */; };
|
E4A9DEC815412923009DF363 /* light_point.vsh in Resources */ = {isa = PBXBuildFile; fileRef = E4A9DEC515412906009DF363 /* light_point.vsh */; };
|
||||||
|
E4CE184A15FEEE8500F80870 /* font.pvr in Resources */ = {isa = PBXBuildFile; fileRef = E4CE184915FEEE8500F80870 /* font.pvr */; };
|
||||||
E4FF48C51538FBF8002053FC /* light_directional.fsh in Resources */ = {isa = PBXBuildFile; fileRef = E4FF48C01538FBF0002053FC /* light_directional.fsh */; };
|
E4FF48C51538FBF8002053FC /* light_directional.fsh in Resources */ = {isa = PBXBuildFile; fileRef = E4FF48C01538FBF0002053FC /* light_directional.fsh */; };
|
||||||
E4FF48C61538FBFC002053FC /* light_directional.vsh in Resources */ = {isa = PBXBuildFile; fileRef = E4FF48C11538FBF0002053FC /* light_directional.vsh */; };
|
E4FF48C61538FBFC002053FC /* light_directional.vsh in Resources */ = {isa = PBXBuildFile; fileRef = E4FF48C11538FBF0002053FC /* light_directional.vsh */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
@@ -84,6 +85,7 @@
|
|||||||
E49EB29B13806C5D00A4E727 /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainWindow-iPad.xib"; path = "iPad/MainWindow-iPad.xib"; sourceTree = "<group>"; };
|
E49EB29B13806C5D00A4E727 /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainWindow-iPad.xib"; path = "iPad/MainWindow-iPad.xib"; sourceTree = "<group>"; };
|
||||||
E4A9DEC2154128F0009DF363 /* light_point.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_point.fsh; path = ../KREngine/KREngine/Shaders/light_point.fsh; sourceTree = "<group>"; };
|
E4A9DEC2154128F0009DF363 /* light_point.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_point.fsh; path = ../KREngine/KREngine/Shaders/light_point.fsh; sourceTree = "<group>"; };
|
||||||
E4A9DEC515412906009DF363 /* light_point.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_point.vsh; path = ../KREngine/KREngine/Shaders/light_point.vsh; sourceTree = "<group>"; };
|
E4A9DEC515412906009DF363 /* light_point.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_point.vsh; path = ../KREngine/KREngine/Shaders/light_point.vsh; sourceTree = "<group>"; };
|
||||||
|
E4CE184915FEEE8500F80870 /* font.pvr */ = {isa = PBXFileReference; lastKnownFileType = file; name = font.pvr; path = ../KREngine/KREngine/Shaders/font.pvr; sourceTree = "<group>"; };
|
||||||
E4FF48C01538FBF0002053FC /* light_directional.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.fsh; path = ../KREngine/KREngine/Shaders/light_directional.fsh; sourceTree = "<group>"; };
|
E4FF48C01538FBF0002053FC /* light_directional.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.fsh; path = ../KREngine/KREngine/Shaders/light_directional.fsh; sourceTree = "<group>"; };
|
||||||
E4FF48C11538FBF0002053FC /* light_directional.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.vsh; path = ../KREngine/KREngine/Shaders/light_directional.vsh; sourceTree = "<group>"; };
|
E4FF48C11538FBF0002053FC /* light_directional.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = light_directional.vsh; path = ../KREngine/KREngine/Shaders/light_directional.vsh; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
@@ -180,6 +182,7 @@
|
|||||||
E400687C1373AB6400B3D28B /* Assets */ = {
|
E400687C1373AB6400B3D28B /* Assets */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
E4CE184915FEEE8500F80870 /* font.pvr */,
|
||||||
E46FED2013C9A472009F5814 /* Shaders */,
|
E46FED2013C9A472009F5814 /* Shaders */,
|
||||||
);
|
);
|
||||||
name = Assets;
|
name = Assets;
|
||||||
@@ -308,6 +311,7 @@
|
|||||||
E49EB29C13806C5D00A4E727 /* MainWindow-iPad.xib in Resources */,
|
E49EB29C13806C5D00A4E727 /* MainWindow-iPad.xib in Resources */,
|
||||||
E40611D714E4E98B0065996A /* README.txt in Resources */,
|
E40611D714E4E98B0065996A /* README.txt in Resources */,
|
||||||
E40611D814E4E98B0065996A /* release_notes.txt in Resources */,
|
E40611D814E4E98B0065996A /* release_notes.txt in Resources */,
|
||||||
|
E4CE184A15FEEE8500F80870 /* font.pvr in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user