1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-05 08:37:20 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Filip Gawin
a60bc20585 Fix misaligned memory(UB)
X86 is able to deal with
misaligned memory, but it can hurt perf.
Other arch like for example mips
is not able to digest it.

So in order of portability we should get
rid of this UB.
2018-01-13 00:49:17 +00:00
Anonymous Maarten
90acef28f7 rwlib: iwyu: reduce warnings
- use mapping file
- forward define FileContentsInfo, CutsceneTracks, GameTexts
- no more "#pragma once"
- add mapping file
2018-01-08 22:52:48 +00:00
Anonymous Maarten
7e4e1db85d rwlib: Use ClumpPtr instead of Clump*
Should fix these memory leaks:
==22737== 14,598,040 (131,472 direct, 14,466,568 indirect) bytes in 2,739 blocks are definitely lost in loss record 3,124 of 3,126
==22737==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==22737==    by 0x90FE4B: LoaderDFF::loadFromMemory(std::shared_ptr<FileContentsInfo>) (LoaderDFF.cpp:443)
==22737==    by 0x7BCC86: GameData::loadModel(unsigned short) (GameData.cpp:474)
==22737==    by 0x7DF7BC: GameWorld::createInstance(unsigned short, glm::tvec3<float, (glm::precision)0> const&, glm::tquat<float, (glm::precision)0> const&) (GameWorld.cpp:144)
==22737==    by 0x7DF44C: GameWorld::placeItems(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameWorld.cpp:120)
==22737==    by 0x758D38: RWGame::newGame() (RWGame.cpp:116)
==22737==    by 0x786389: LoadingState::enter() (LoadingState.cpp:9)
==22737==    by 0x75DC59: void StateManager::enter<LoadingState, RWGame*, RWGame::RWGame(Logger&, int, char**)::{lambda()#1}>(RWGame*&&, RWGame::RWGame(Logger&, int, char**)::{lambda()#1}&&) (StateManager.hpp:40)
==22737==    by 0x758484: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:81)
==22737==    by 0x747815: main (main.cpp:13)
2017-10-18 21:52:29 +01:00
Daniel Evans
d798509f93 Use Atomic instead of ModelFrame in ObjectRenderer 2017-02-08 21:44:25 +00:00
Daniel Evans
34c70b0be2 Allow ModelFrame, Atomic, Geometry to exist outside of a Clump
This changes the Clump data structure to simplify it and move some
of the concerns into the Atomic and Frame types.
2017-02-08 21:44:25 +00:00
Daniel Evans
a0eaf5b8b0 Move Atomic and Geometry out of Clump class 2017-02-08 21:44:25 +00:00
Daniel Evans
8e4d73fca9 Rename Model -> Clump 2017-02-08 21:44:25 +00:00
Daniel Evans
15427b8f99 Add texture lookup callback to LoaderDFF 2016-12-03 21:59:37 +00:00
Daniel Evans
981d68713b clang-format files in rwlib/source/loaders 2016-09-09 21:13:21 +01:00
Daniel Evans
bf68ddcd7c Fix compiler warnings in rwlib 2016-04-26 23:51:42 +01:00
Daniel Evans
3e9b0c64e4 Re-implement object rendering using a depth-sorted approach.
This moves the object rendering logic into ObjectRenderer. This makes
GameRenderer a bit smaller.

There are some rendering logic decisions that haven't been brought
back yet since they may be better placed elsewhere.
2016-04-19 01:20:54 +01:00
Daniel Evans
14269d8ae5 Move first of lower level code into rwlib; tear out GLEW. 2016-04-07 01:13:46 +01:00