Skip to content

Commit 8f33634

Browse files
committed
Some linux fixes
1 parent 212966a commit 8f33634

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

blib.pro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CONFIG -= unicode
99

1010
unix {
1111
CONFIG += object_with_source
12-
CONFIG += object_parallel_to_source
12+
# CONFIG += object_parallel_to_source
1313
}
1414

1515
DEFINES -= UNICODE
@@ -24,7 +24,7 @@ windows {
2424
#QMAKE_EXT_CPP += .c
2525
QMAKE_CXXFLAGS += -Wall -std=c++11
2626
CONFIG += object_with_source
27-
CONFIG += object_parallel_to_source
27+
#CONFIG += object_parallel_to_source
2828

2929
SOURCES += \
3030
blib/Animation.cpp \
@@ -307,6 +307,6 @@ unix {
307307
}
308308

309309
windows {
310-
SOURCES += blib/platform/win32/window.cpp
311-
SOURCES += blib/platform/win32/Registry.cpp
310+
SOURCES +=
311+
SOURCES +=
312312
}

blib/StaticModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace blib
2626

2727
static void loadChildren(blib::StaticModel::Bone* bone, const blib::json::Value &json)
2828
{
29-
bone->name = json["name"];
29+
bone->name = json["name"].asString();
3030
bone->matrix = jsonToMatrix(json["matrix"]);
3131
if (!json.isMember("children"))
3232
return;

blib/gl/Renderer.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ namespace blib
6262
Render* r = toRender[1-activeLayer][i];
6363
if(r->command == Render::Clear)
6464
{
65-
if(r->renderState.activeFbo == NULL)
65+
#ifdef WIN32
66+
if(r->renderState.activeFbo == NULL)
6667
glBindFramebuffer(GL_FRAMEBUFFER, oldFbo);
6768
else
6869
{
6970
r->renderState.activeFbo->bind();
70-
}
71-
71+
}
72+
#endif
7273
glDisable(GL_SCISSOR_TEST);
7374
glClearStencil(0);
7475
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
@@ -160,12 +161,14 @@ namespace blib
160161
glDisable(GL_DEPTH_TEST);
161162
}
162163

164+
#ifdef WIN32
163165
if (!lastRenderState || lastRenderState->activeFbo != r->renderState.activeFbo) {
164166
if(r->renderState.activeFbo == NULL)
165167
glBindFramebuffer(GL_FRAMEBUFFER, oldFbo);
166168
else
167169
r->renderState.activeFbo->bind();
168170
}
171+
#endif
169172

170173
if (!lastRenderState || lastRenderState->stencilTestEnabled != r->renderState.stencilTestEnabled || lastRenderState->stencilWrite != r->renderState.stencilWrite) {
171174
if(r->renderState.stencilTestEnabled)
@@ -319,7 +322,9 @@ namespace blib
319322
//delete takes up a lot of time here, let's see if we can reuse the list of vertices
320323

321324
clearCommands();
322-
glBindFramebuffer(GL_FRAMEBUFFER, oldFbo);
325+
#ifdef WIN32
326+
//TODO glBindFramebuffer(GL_FRAMEBUFFER, oldFbo);
327+
#endif
323328
}
324329

325330
}

blib/platform/linux/window.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ namespace blib
8383

8484
void Window::tick()
8585
{
86-
Log::out<<"WindowTick - Top!"<<Log::newline;
8786
while(XPending(dpy) > 0)
8887
{
89-
Log::out<<"WindowTick while XPending!"<<Log::newline;
9088
XNextEvent(dpy, &xev);
9189

9290
if(xev.type == Expose)
@@ -95,7 +93,7 @@ namespace blib
9593
}
9694
if(xev.type == KeyPress)
9795
{
98-
//exit(0);
96+
exit(0);
9997
}
10098
}
10199
}

blib/util/Log.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ namespace blib
142142
#ifdef ANDROID
143143
LOGI("%s", buffer.c_str());
144144
#else
145-
printf("%s\n", buffer.c_str());
145+
printf("%s\n", buffer.c_str());
146+
fflush(stdout);
146147
#endif
147148
buffer = "";
148149
#ifdef WIN32

0 commit comments

Comments
 (0)