-
Notifications
You must be signed in to change notification settings - Fork 193
OpenGL rendering #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenGL rendering #250
Conversation
Has a few caveats: - still very messy - libRocket doesn't work, so no GUI
Still on the render thread, next commit should move it to game thread at last
+ move font loading accordingly to FARender::Renderer
# Conflicts: # apps/freeablo/engine/enginemain.cpp # apps/freeablo/farender/renderer.cpp # apps/freeablo/farender/renderer.h # components/render/render.h # components/render/sdl2backend.cpp
Corruption would only occur if we attempted to setImmortal() a raw sprite before we had ever rendered it. get() in SpriteManager handles raw sprites with directInsert, but calling setImmortal would skip straight to SpriteCache::setImmortal, which ensures the sprite exists by calling get() and then setting the immortal flag. However, since this was implemented inside SpriteCache, it wasn't handling raw sprites, so it woul give an invalid sprite cache lookup error, and corrupt the mUsedList member. The solution is to call get() in SpriteManager::setImmortal before calling SpriteCache::SetImmortal, to ensure that the raw sprite is created before we go into SpriteCache.
| # Use C++11 | ||
| if (CMAKE_VERSION VERSION_LESS "3.1") | ||
| if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
| set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use c++14? I've had it set locally ever since I've started working on this project and everything seems to work just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis is still using gcc 4.6.3, I'm not sure how much of c++14 is supported in that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. No big deal I guess, as far as I can tell we're not using any new features. But it's good to preemptively use newer standards if possible.
7a3f64b to
50b1dfd
Compare
-librocket doesn't work, but I want to get rid of it anyway
(probably for myGui + lua)Nuklear! https://github.com/vurtun/nuklear-probably won't be merged until this is done