Linux fix

This commit is contained in:
jonasstrandstedt
2014-10-21 21:44:29 +02:00
parent 0e52e759db
commit 490fbc4869
6 changed files with 17 additions and 5 deletions

View File

@@ -78,8 +78,8 @@ private:
GLenum _mode;
unsigned int _isize;
unsigned int _vsize;
Vertex *_varray;
int *_iarray;
Vertex* _varray;
int* _iarray;
glm::dmat3 _stateMatrix; // might need this

View File

@@ -114,7 +114,6 @@ bool ABuffer::reinitialize() {
void ABuffer::resolve() {
if( ! _validShader) {
SleepEx(0, TRUE);
generateShaderSource();
updateShader();
_validShader = true;

View File

@@ -323,7 +323,8 @@ bool OpenSpaceEngine::create(int argc, char** argv,
if (!FileSys.directoryExists(token)) {
std::string p = absPath(token);
LDEBUG("Directory '" << p <<"' does not exsist, creating.");
FileSys.createDirectory(p, true);
if(FileSys.createDirectory(p, true))
LERROR("Directory '" << p <<"' could not be created");
}
}

View File

@@ -51,6 +51,10 @@ RenderableWavefrontObject::RenderableWavefrontObject(const ghoul::Dictionary& di
, _programObject(nullptr)
, _fovProgram(nullptr)
, _texture(nullptr)
, _isize(0)
, _vsize(0)
, _varray(nullptr)
, _iarray(nullptr)
{
std::string name;
bool success = dictionary.getValue(constants::scenegraphnode::keyName, name);
@@ -108,6 +112,7 @@ void RenderableWavefrontObject::loadObj(const char *filename){
fi = fopen(filename, "r");
if (fi == NULL) {
LERROR("Null Object\n");
}
while (fgets(line, 150, fi) != NULL)
{
@@ -256,6 +261,9 @@ RenderableWavefrontObject::~RenderableWavefrontObject(){
bool RenderableWavefrontObject::initialize()
{
if(_isize == 0)
return false;
bool completeSuccess = true;
if (_programObject == nullptr)
completeSuccess

View File

@@ -292,6 +292,10 @@ bool RenderableStars::deinitialize(){
//#define TMAT
void RenderableStars::render(const RenderData& data){
if(!_haloProgram)
return;
if(!_texture)
return;
assert(_haloProgram);
//printOpenGLError();
// activate shader