1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:49:56 +00:00
Commit graph

155 commits

Author SHA1 Message Date
scrawl
9180089a3b Add sharing for more State Attributes, most notably BlendFunc and AlphaFunc, to improve the state tracking in osg::State and reduce the number of GL calls 2017-02-01 06:00:14 +01:00
scrawl
960d4a96c3 Reduce the number of osg::Material state by setting the default state on the graph root 2017-02-01 06:00:14 +01:00
scrawl
e399e10607 Add missing lock in shareMaterial 2017-02-01 06:00:14 +01:00
scrawl
115e563a7a Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)
The first part of the fix is to assign VBO/EBO's upon loading the array in the Nif reader. This avoids triggering the 'addVertexBufferObjectIfRequired' code path in osg::Geometry which has the race condition when two threads add the same Array at the same time. Essentially, we want the Arrays to be 'const' when they come out of the Nif reader.

The second part of the fix is to make sure not to create empty arrays in the Nif reader (importantly, not assigning a VBO to the empty array). This empty array would be deleted when the NIFFile is cleaned up, and the detachment of the VBO assigned to it (which is still in use by other arrays) would cause threading issues.

This rare crash bug was first introduced with commit a7c5beb7c5. When using OSG dev version 3.5 the crashes were a little more prevalent, because 'addVertexBufferObjectIfRequired' in osg::Geometry is now used even when VBO's are disabled (as part of the VAO support changes).
2017-01-19 22:23:41 +01:00
scrawl
aafff1deb6 Fix memory leak 2016-12-16 20:40:15 +01:00
MiroslavR
99bcf47167 Implement NiSphericalCollider (Closes #3644) 2016-12-06 01:32:13 +01:00
Allofich
6ec37b5cfb Fix shadowing warnings 2016-10-02 17:48:54 +09:00
Allofich
a8e9f2df67 Cleanup 2016-09-19 05:20:04 +09:00
Allofich
be96ff1fd1 Remove redundant parameter 2016-09-18 01:57:47 +09:00
Allofich
a033ba3bd2 Override spell textures by NiTexturingProperty 2016-09-14 23:03:04 +09:00
scrawl
a5da3a269e Fix shadowing warnings 2016-08-29 12:20:00 +02:00
scrawl
341e3846c0 Use initial particle state to compute the initial bounding box (Fixes #3500) 2016-08-16 23:28:03 +02:00
scrawl
513e1da8a3 Remove unneeded casts 2016-08-14 16:44:11 +02:00
MiroslavR
721fa28c1e Fix assertion failure with NiTextureEffect missing source texture 2016-07-16 18:59:18 +02:00
MiroslavR
9c6739f1b3 Fix doubled particle spawn range 2016-07-11 22:40:58 +02:00
MiroslavR
2a987b6857 Do not skip inactive keyframe controllers (Bug #1942) 2016-07-10 19:02:28 +02:00
scrawl
62018e802b Minor fix to particle system AutoPlay flag handling
The previous commit broke some magic effects (e.g. shield). The controller's emit start/stop times should control the emitter, while the absence of the ParticleSystem's autoplay flag should freeze the whole particle system if no valid controller source gets assigned. This revised version works for both the Shield effect and the "dagoth ur death sparkles" effect.
2016-05-14 22:55:14 +02:00
scrawl
7202072196 Freeze particle systems on construction if the AutoPlay flag is missing 2016-05-14 22:38:49 +02:00
scrawl
0c08f705c5 Make the ParticleSystemController freeze the particle system instead of the emitter (Bug #3390) 2016-05-14 22:36:53 +02:00
scrawl
e30bb31a79 Handle the particle node's AutoPlay flag (Bug #3390) 2016-05-14 22:35:34 +02:00
scrawl
bc36269617 When a controller is present more than once in the same keyframe file, pick the first one (Fixes #2719) 2016-03-26 14:59:49 +01:00
scrawl
aae43dbff5 Set the MorphGeometry vertex buffer object usage to GL_DYNAMIC_DRAW 2016-03-11 16:10:39 +01:00
scrawl
84b8da7a09 Share the osg::Material on drawables
Reduces the number of GL calls / frame by ~4%.
2016-03-11 01:06:54 +01:00
scrawl
abcfe9bcee Don't add empty text key objects 2016-03-10 17:01:14 +01:00
scrawl
02d23564dc Include cleanup 2016-03-10 14:29:45 +01:00
scrawl
f898bf493f Don't use Geodes 2016-03-10 13:17:01 +01:00
scrawl
82b792f808 Eliminate dynamic_cast in BillboardCallback 2016-03-05 20:02:33 +01:00
scrawl
dd2fbfc0a2 Fix windows build 2016-03-02 21:57:25 +01:00
scrawl
6e7c6fdd7e Implement NiTexturingProperty::DecalTexture 2016-03-01 18:41:36 +01:00
scrawl
30d06bfe0e Add comment 2016-03-01 17:27:54 +01:00
scrawl
64636bd85a Improve error reporting 2016-03-01 17:05:02 +01:00
scrawl
cdccf03228 Fix mismatched delete 2016-02-25 21:32:42 +01:00
scrawl
5f4ace1bc2 Implement support for sphere map NiTextureEffects (Fixes #1827) 2016-02-24 21:06:41 +01:00
scrawl
90a99991d1 Use empty() instead of !size() 2016-02-22 19:06:12 +01:00
scrawl
e647ee5424 Support RGB and RGBA embedded textures in NIF files (Fixes #2295) 2016-02-18 19:37:56 +01:00
scrawl
606758d72f NifLoader: create the BumpTexture slot, but don't use it yet 2016-02-18 19:37:56 +01:00
scrawl
4cd4131da9 NifLoader: assign a name to created textures
This name will tell the shader visitor how to handle that texture.
2016-02-18 19:37:56 +01:00
scrawl
50e92c8136 NifLoader: move texture property handling to a separate function 2016-02-18 19:37:56 +01:00
scrawl
acf44fd9e5 NifLoader: handleTextureControllers outside of the NumTextures loop 2016-02-18 19:37:55 +01:00
scrawl
5824619a95 Clean up includes 2016-02-12 19:28:10 +01:00
scrawl
8b596dfcbe Remove support for OSG 3.2
Since commit e8662bea31, we're using OSG functionality that contains an unfixed crash bug in version 3.2. The bug is fixed in version 3.4 (OSG commit 6351e5020371b0b72b300088a5c6772f58379b84)
2016-02-12 14:46:45 +01:00
scrawl
9e53e12c70 More renaming of TextureManager -> ImageManager 2016-02-05 23:10:27 +01:00
scrawl
f99f403dda Rename TextureManager to ImageManager 2016-02-05 23:03:53 +01:00
scrawl
6ef848b7c5 Remove TextureManager::getTexture2D
Instead use getImage and let the caller create the Texture. Sharing of textures is then handled in post by the SharedStateManager.

This is closer to what the OSG serializer does.

Streamlines the TextureManager and will make it easier to multithread.
2016-02-05 23:01:11 +01:00
scrawl
2eda495f89 Build fix for OSG 3.2 2016-02-03 19:05:15 +01:00
scrawl
06ed20abf8 Use the initial pose of a MorphGeometry for object placement (Fixes #3136) 2016-02-03 18:53:38 +01:00
scrawl
6b48acaf0e Don't optimize TriShapes with controllers (Fixes #3143) 2016-02-01 21:01:17 +01:00
scrawl
723c392a73 NifLoader: fall back to the first UV set when encountering invalid UV set references 2015-12-17 04:05:39 +01:00
scrawl
0731595c2b Wrap a Texture2D in a ref_ptr 2015-12-17 03:38:38 +01:00
scrawl
31c3324705 Don't assume the emitter node is a Group (Fixes #3082)
This would be a correct assumption by default, but is no longer true when the NifLoader::optimize() function optimizes the graph.
2015-12-17 03:38:26 +01:00