Commit Graph

3421 Commits (master)

Author SHA1 Message Date
cutealien 97472da9c2 Add (commented-out) linker flag for SDL to Makefile.
Just as minor hint to users when trying to link with SDL.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5862 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-09-03 20:23:57 +00:00
cutealien 0096ba7c7d Fix compilation with SDL device enabled and Windows device disabled.
Thanks @kas1e for reporting (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52083&p=304892#p304892)
Also did change some indention for readability.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5861 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-30 15:16:17 +00:00
cutealien ea7efdde45 Fix comment.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5860 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-29 22:31:48 +00:00
cutealien 3c31fb4730 Allow to override MaterialType in SOverrideMaterial.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5859 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-26 14:42:44 +00:00
cutealien 40d14b7c5c Cleanup: Remove some no longer needed const-casts
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5858 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-21 18:20:29 +00:00
cutealien 004d250e8f Adding a few const's and relaxing the Irrlicht.ruleset.
No more checking for all the VS specific annotation stuff in code analysis (we don't use this anyway).
Also less const checks (arguably make code nicer, but not really helping finding suspcious code places, just lots of noise).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5857 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-21 17:37:28 +00:00
cutealien eb02bd0c56 Code cleanup.
Mainly making a few variables const and declaring variables at each place where they are used instead of once at top.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5856 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 20:19:00 +00:00
cutealien ede858d56f Make S3DVertex::getType a static instead of const function. Same for other vertex classes.
Hopefully this makes it more obvious that we're not dealing with a virtual function here (like all the other getType() functions in Irrlicht).
Should maybe be renamed (classType or classTypeId?).
Also vertexbuffers can now use it without having to create an object first.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5855 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 18:09:07 +00:00
cutealien 32585c5ed0 Cleanup: Make some variables const.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5854 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 17:52:32 +00:00
cutealien 5ff51c947e Cleanup: Avoid using identical variable names in outer and inner scopes.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5853 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 16:30:41 +00:00
cutealien cc07570496 Let's not have a global variable called 'b'.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5852 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 15:03:24 +00:00
cutealien a57584d320 Fix indention.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5851 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 14:26:36 +00:00
cutealien b5f139f8a7 Use _IRR_OVERRIDE_throughout.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5850 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 14:00:50 +00:00
cutealien 1d6ab9674f Add ruleset file for static code analysis in VS.
Specific rules we should use for Irrlicht can be figured out later (probably too many enabled right now)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5849 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 12:43:36 +00:00
cutealien c5286d77ac Fix signed/unsigned conversion warnings.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5848 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-17 09:55:07 +00:00
cutealien f78e7b17f8 Avoid using identical variable name in inner and outer scope in SOverrideMaterial
Wasn't a bug in this case, but I just got lucky.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5847 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-16 13:02:10 +00:00
cutealien 1b4444e044 Remove E_GPU_SHADING_LANGUAGE in IGPUProgrammingServices.
Thx @greenya for noticing this is no longer needed as it was only ever used for the CG shader language which we kicked out already.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5846 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-15 20:43:50 +00:00
cutealien 3469582bac Make CD3D9RenderTarget::setTexture code more similar to COpenGLCoreRenderTarget::setTexture.
Add log warnings when users try to set depth/stencil textures which have no depth color format.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5845 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-15 20:18:45 +00:00
cutealien 8a33852395 SOverrideMaterial can now override layers, textures and the layer-flags can now be for more than just first layer.
Just completing SOverrideMaterial somewhat (some values still can't be set as they have no flags...).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5844 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-15 16:27:17 +00:00
cutealien 4d32f93c21 Add SOverrideMaterial.h to the VS project files.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5843 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-15 15:51:46 +00:00
cutealien 53bc690af6 Minor optimization when creating opengl textures
Delay switching back to previous active texture until mipmap generation is done. 
Avoids 4 GL calls in most cases (not really noticable for speed, but makes reading api-traces of GL calls a bit easier).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5842 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-08 13:35:44 +00:00
cutealien fd155bead0 Add operator[] to vector2d and vector3d
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5841 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-23 15:30:50 +00:00
cutealien 2178368d71 Update mouse position for CSceneNodeAnimatorCameraMaya also on click events.
Before it updated only on move events. That could lead to troubles when the camera was actived by click as it then started the rotation with the position of the last move event it had.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5835 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-11 15:25:54 +00:00
cutealien 985b3ba3a2 Initialize COpenGLExtensionHandler::pGlActiveStencilFaceEXT to 0
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5834 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-07 15:18:29 +00:00
cutealien 7aaf3cce9d Refactor COpenGLCoreRenderTarget::setTexture slightly.
Just making it easier to see when DepthStencil can be set (we never have a depth texture format when we have no texture).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5833 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-04 21:54:57 +00:00
cutealien 52e41751a8 Marks some function parameters (for internal functions) as const
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5832 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-04 21:30:20 +00:00
cutealien 56a037ff14 Fix wrong index used in CMatrix4<T>::transformVec4
Thx @Thomas Alten for reporting.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5831 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-04 20:13:49 +00:00
cutealien 1dd0b4338e Bugfix: IrrlichtDevice::isWindowMinimized no longer returns true when it's maximized on Windows.
SW_SHOWMINIMIZED isn't a bitflag as was probably assumed.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5827 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-03 13:53:13 +00:00
cutealien c89676d042 Ignore degenerated faces in obj file loader when they would generate triangles where 2 vertices use identical indices.
This mostly happens because we merge vertices by position in the meshloader. But such triangles tend to cause troubles and won't render, so kick them out.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5826 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-06-24 10:13:09 +00:00
cutealien 29b2fa974e Documenation fixes. Thx @ greenya.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5825 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-06-23 15:47:34 +00:00
cutealien 7d92f4c514 Set old values as default values in IGUIElement::deserializeAttributes.
Thx @ chronologicaldot for reporting that this was missing (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=52370)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5824 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-06-15 09:59:35 +00:00
cutealien a57e1c07d2 Initialize new GL function pointers and re-order intialization.
GenerateTextureMipmap had been forgotten in initialization when they got added recently.
Re-ordering initialization to avoid compiler warnings.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5823 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-06-06 13:46:27 +00:00
cutealien cb1d2f7706 Fix typos. Thanks @ greenya
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5822 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-06-06 13:39:58 +00:00
cutealien 949a1de2f2 Make aabbox3d::isValid const
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5821 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-31 13:33:41 +00:00
cutealien 5c10d53a20 Add aabbox3d::isValid() function to check if MaxEdge > MinEdge
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5820 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-31 13:31:40 +00:00
cutealien 294da48122 Add CMatrix4::transformVec4 to transform vectors with 4 elements
Thx @devsh for noting this was missing.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5819 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-31 13:05:59 +00:00
cutealien 8db58f1505 Add more GL functions and function-pointers to OpenGLExtensionHandler.
Thx @ criss and devsh for this patch (got applied with minor adaptions).
New functions are about functions using new direct state access functions from GL 4.5
And array textures.
Not yet used internally in the engine (but possible to access it with some hacks from apps, we probably should make the extension handler public at some point).

Also now using glActiveTexture as default instead of glActiveTextureARB.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5818 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-30 15:58:35 +00:00
cutealien 1a6d8e2913 Replace polygon offsetting in SMaterial with a new implementation.
Deprecate PolygonOffsetFactor and PolygonOffsetDirection in SMaterial.
Replace it by PolygonOffsetDepthBias and PolygonOffsetSlopeScale.
Old values still work for now (as well as they did), but will be removed after Irrlicht 1.9.
The old implementation was based a lot on the way Direct3D8 had worked.
- We only had values -1 and 1 for the slope bias before, but sometimes other values are necessary.
- An int value for PolygonOffsetFactor couldn't worked for Direct3D9 which (unlike D3D8) uses a value range of -1 to 1. 
Thx @ Criss and devsh for implementing some code which showed that different slope scaling is sometimes needed.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5817 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-29 19:48:08 +00:00
cutealien 93b308554d Set line-endings in new header to \n\r as usual in Irrlicht.
(was still unix-style as I just copied this header from khronos).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5816 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-29 14:01:50 +00:00
cutealien 6021b1c856 Updating OpenGL headers.
Note: Khronos made glext.h now depend on a new file KHR/khrplatform.h
The idea seems to be that some common types can be shared with other gl headers (for gles versions).
But I run into some problem with that as it was included with <> instead of "" so Visual Studio wouldn't find 
it without adding include paths to all projects for new KHR folder. Didn't want that (can't test that for example on iOS), 
so I modified official khronos header by changing the include to using "".


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5815 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-28 17:20:35 +00:00
cutealien 3a39815633 Add COpenGLCoreCacheHandler::getDepthTest (thx@ Criss)
While COpenGLCoreCacheHandler wasn't meant to be accessed externally, it is possible with some hacks (a few casts and including internal headers) and sometimes necessary.
And that's one of the state-flags people have a need to know from outside the engine.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5814 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-28 15:00:54 +00:00
cutealien dcfe4bcc0a Octree triangleselector nodes now release memory they don't need.
Before they could get pretty large as each node used the maximum memory it started with.
Also some changes to avoid unnecessary memory re-alloction when creating it.
Thanks @Squarefox for reporting the problem and proposing a patch.
See discussion at: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52484


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5813 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-26 16:03:08 +00:00
cutealien 574357cb28 Reduce memory fragmentation in COctreeTriangleSelector.
Thx@  Squarefox for reporting (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52484)
Basically the loop was split into 2 loops so children do their allocations after the parent node
has finished his. Otherwise we got fragmentation by chaotic allocation order where parents/childs
switched all the time.
Also indention of loop changed (sorry, should have done that before).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5812 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-26 15:45:19 +00:00
cutealien 278f5f14e4 Enable broken cubescenenodes again.
In r5805 they got broken when adding compile-flags for them.
Copy-paste error, define was missing a '_' at the end in some places, sorry.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5810 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-01 10:32:24 +00:00
cutealien b3a156b1bb Add ITexture::getOriginalColorFormat to access color format of images used to create a texture.
We already had the variable, just no access function.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5809 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-04-30 15:59:41 +00:00
cutealien 37ccfe58a2 Remove define _IRR_COMPILE_WITH_B3D_WRITER_ in CB3DMeshWriter.
(probably was added accidental, as it was always enabled that way which kills it's original purpose).
Thx@ LunaRebirth for report (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=52471)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5807 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-04-24 21:03:35 +00:00
cutealien 040aa5043a Add compileflags to allow removing specific scene-nodes from the engine.
Following flags got added: 
_IRR_COMPILE_WITH_OCTREE_SCENENODE_
_IRR_COMPILE_WITH_TERRAIN_SCENENODE_
_IRR_COMPILE_WITH_SHADOW_VOLUME_SCENENODE_
_IRR_COMPILE_WITH_BILLBOARD_SCENENODE_
_IRR_COMPILE_WITH_WATER_SURFACE_SCENENODE_
_IRR_COMPILE_WITH_SKYDOME_SCENENODE_
_IRR_COMPILE_WITH_CUBE_SCENENODE_
_IRR_COMPILE_WITH_SPHERE_SCENENODE_
Also the corresponding _NO_IRR_COMPILE_WITH... flags certainly.
More such flags might be added in future, but will test first if it really makes a difference for WebGL apps which were the main reason to add this.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5805 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-04-23 20:05:09 +00:00
cutealien 4aa790812f Add new headers to c::b project file.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5801 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-03-30 14:06:55 +00:00
cutealien 6b7b5204d1 Sorry, forgot to add new header IMemoryReadFile.h in last check-in.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5800 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-03-30 13:58:38 +00:00
cutealien c87c63f31e Add IMemoryReadFile interface which allows direct access to memory block used as file.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5799 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-03-30 13:51:44 +00:00