Commit Graph

249 Commits

Author SHA1 Message Date
cutealien
1803413b49 Fix: SDL device can support FPS camera animator again
Also no longer restricting mouse position to 0-windowsize (restriction for other devices got removed earlier)
And adding some commented out lines to Makesfile for easier testing of SDL. We probably should use some parameter which can be passed to Makefiles for that in the future.
Note: This does not fix all cursor troubles for SDL - it still does not support relative rectangle
Bit arguably how to handle setting/getting mouse position for SDL, for example it still doesn't support a reference rectangle.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6424 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-09-22 21:47:19 +00:00
cutealien
a69969d6f9 Fix MouseButtonStates for mouse events in CIrrDeviceSDL when middle or right button are released
Needed to use bitwise not instead of logical not to clear bits for EMBSM_RIGHT and EMBSM_MIDDLE.
Thanks @gcc for it's warnings


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6423 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-09-22 21:34:08 +00:00
cutealien
31965fe599 CMeshManipulator::createMeshWelded now cloning buffers it can't weld.
Not optimal, but making this real 32-bit is sadly a bit more work.
This way at lest meshes with mixed 16/32 bit buffers can weld the 16-bit ones.
And hopefully a bit of step in the right direction to fully support 32-bit another day.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6417 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-08-24 22:14:50 +00:00
cutealien
38e5bfe234 Fix Collada (.dae) writing with 32 bit meshbuffers
Was still handling them as 16-bit buffers.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6416 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-08-24 12:55:45 +00:00
cutealien
7d2dbdd0c8 Unify & improve log messages
Lots of places where coders did not realize our Printer::log with hint adds a ": " string between message and hint
Which caused uglier messages in a few places (added documentation for that, maybe helps?)
Some added info in a few places
Some whitespace unification
Some spelling unification


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6414 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-06-30 16:23:48 +00:00
cutealien
17c7a1bd6e CGUIContextMenu no longer marks EMIE_MOUSE_MOVED as handled
This got in the way of allowing to move a camera with right-mouse-button while having a context menu.
Hard to tell which way is "more" correct as this break of behavior probably can also mess up some situations.
There also would be 3rd option of only catching the event when highlighting happens.
Anyway - usually if this should be caught it should be caught for all ui elements and people will check focused or hovered.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6412 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-06-23 13:25:55 +00:00
cutealien
501185e9cc Fix checkDataSizeLimit test in png loader.
I thought BitDepth was per pixel back then, but it's per channel. So limit could be broken.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6409 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-06-21 18:19:00 +00:00
cutealien
8dbeba57cd Fix camera render when it wasn't animated. Tiny improvement for fps camera animator. Add documentation.
Cameras can render even when they are not in the scenemanager or onAnimate didn't get called for example because they are their parent are invisible.
So let's be safe and add another call to updateAbsolutePosition(). Some cost, but usually we don't have that many rendering cameras, so shouldn't matter (if it ever matters I suppose we could override OnAnimate and add a flag if it _was_ animated since last render call. Maybe that's even useful in general for SceneNodes?).
Similar CSceneNodeAnimatorCameraFPS was using getAbsolutePosition which was only updated after animators, so it was one frame behind.
And documented ICameraSceneNode functions a bit. Especially updateMatrices is a bit of a confusing name unfortunately.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6406 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-06-16 13:59:58 +00:00
cutealien
94e84b1686 Prevent crash when creating CCameraSceneNode while rendertarget has height 0
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6405 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-30 20:13:28 +00:00
cutealien
4450b532c2 Amendment to [r6389] Change all CColorConverter functions to work with u32 instead of s32 for sizes
Missed it as that part is only use by OGL_ES branch.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6403 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-15 15:51:55 +00:00
cutealien
5d27ca38a7 Minor const changes.
Also kicked out "Use constexpr for constants" warning in VS analyser ruleset (we haven't switched to c++11 yet)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6402 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-15 13:43:32 +00:00
cutealien
f9e5ef76bd IVideoDriver::getOcclusionQueryResult works now with const node pointer.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6401 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-15 11:51:42 +00:00
cutealien
ca4bbcb71f Fix compiling on MinGW (broke in [r6394])
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6397 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-14 15:10:22 +00:00
cutealien
66dcb86e5f Make SCollisionHit::TriangleSelector and SCollisionTriangleRange::Selector both const.
Avoids lots of const casts and there shouldn't be a good reason to have those non-const.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6396 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-14 14:29:56 +00:00
cutealien
bd7e357f77 Add checks for valid skin pointer in CGUIMenu
Found with VS analyser

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6395 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-14 14:03:30 +00:00
cutealien
3eee408cac Avoid potential call to GetProcAddress with 0 for HMODULE
Found by VS code analyser

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6394 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-13 15:03:27 +00:00
cutealien
c0f5b839a0 Avoid potential number overflows.
Found by VS code analyser

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6393 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-13 14:56:22 +00:00
cutealien
cc9edcb973 CIrrMeshFileLoader::readMeshBuffer avoid accessing pointer before it's not 0 check.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6391 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-13 14:20:41 +00:00
cutealien
10f0e39e46 Change all CColorConverter functions to work with u32 instead of s32 for sizes.
Nothing good could come out of putting negative values into any of those functions.
And they are used a lot in image loaders which often can be tricked into passing large enough values to make those functions be called with negative numbers.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6389 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-08 15:40:38 +00:00
engineer_apple
f64732cd7e CBillboardTextSceneNode null-pointer check on missing Texture
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6388 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-08 14:43:24 +00:00
cutealien
cfde879801 Add checks for sane image sizes in some image loaders (bmp, jpg, tga, png)
Thanks @sfan5 for the original patch (got modified a bit): dbd39120e7
Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819&p=306518
Those are the common formats, but rest of image loaders should also call this some day.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6387 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-08 14:42:59 +00:00
cutealien
72b1522083 Add IImage::checkDataSizeLimit and make IImage getDataSizeFromFormat return size_t
It's to allow image loader to check for sane limits for image sizes.
Idea came from this patch from sfan5 for Minetest: dbd39120e7
Thought solution is a bit different. 
Image loader checks not yet added (will come soon).
Also note that limit is to s32. While u32 might work mostly it will run into some troubles with color converter for now (which maybe could be changes). Also 2GB ought to be enough for anybody, right?

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6386 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-06 19:47:38 +00:00
cutealien
76d013d9d6 Fix crash with large jpg files.
Based somewhat on a patch in Minetest from sfan5 594de99153
There might be more problems which may be the reason they checked for other values in Minetest, but don't have more info for now and so far this works.
Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819&p=306518

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6385 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-06 16:00:26 +00:00
cutealien
156463da4f Simplify/unify IGUIListBox interface.
Only needs one addItem function when using default parameters for icon.
Add default parameters for setIcon, insertIcon so they can be used easier with pure text.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6384 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-05 15:19:35 +00:00
cutealien
7b6115bcf1 Update VS and c::b project files for burningvideo 0.54
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6381 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-05 13:07:45 +00:00
engineer_apple
83851413a6 clang warnings (OnSetMaterial multiple inheritance IMaterialRendererServices,IShaderConstantSetCallBack)
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6378 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-04 10:29:41 +00:00
engineer_apple
f0efd5857d undo remove warnings
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6377 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-03 23:00:00 +00:00
engineer_apple
62db29bfd4 remove warnings
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6373 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-03 20:49:27 +00:00
engineer_apple
5bd1c1d68b vs2019 projectfiles
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6372 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-03 20:48:57 +00:00
engineer_apple
21e2569e5b burningvideo 0.54
removed CTRGouraudAlpha2.cpp
added CTRParallaxMap.cpp

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6371 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-03 20:47:32 +00:00
cutealien
9db39e8534 Separate GLX window from X11 window.
Thanks @numberZero and sfan5 for patches:
c4503eaf17
57ff34b1ed
Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?p=306549#p306549


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6370 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-02 16:17:03 +00:00
cutealien
296824e8b6 COSOperator::getSystemMemory now returns some value on OSX. Also it's kb not bytes.
Before the value was checked, but not put into the return variables.
Header update to show that information in kb not bytes (on all systems, was just documented wrong)
Some cleanup of code.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6369 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-02 15:19:37 +00:00
engineer_apple
d19d6939d4 GUIText
a) SpriteBank. error check on non existing textureNumber. Seen in broken Fonts. unified getFrameNr
b) CBillboardTextSceneNode. use getOriginalSize

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6368 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-01 09:50:32 +00:00
engineer_apple
61bc7d3a22 MacOS SoftwareDriver Window and warnings
Xcode 12.4 MacOS 10.15.7

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6367 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-01 02:43:12 +00:00
engineer_apple
3285a0147a a) debug Camera Matrices. enable with _IRR_COMPILE_WITH_90_DEGREE_CAMERA.
- allow ICameraSceneNode to accept any values and correct in buildCameraLookAtMatrixLH with normalize_camera_direction.
 if disabled defaults to the current v1.9 normalize
b) add initial Rotation to MayaCamera Constructor default 0,0
c) switchToMayaCamera in Examples. Clones FPSCamera default disabled


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6366 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-01 01:11:45 +00:00
engineer_apple
e08e37fc0f burning v0.53 g++ warning remove
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6365 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-05-01 00:59:58 +00:00
engineer_apple
4fe6a16165 burning v0.53
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6364 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-30 22:57:17 +00:00
cutealien
532675ffa4 Fix string deserialization in CGUITable.
Use now getAttributeAsStringW instead of getAttributeAsString. 
Thanks @chronologicaldot for report and patch: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=7&t=52821

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6358 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-25 09:48:26 +00:00
cutealien
df17e52a05 CXMeshFileLoader: initialize normals (and other S3DVertex values ) to 0 when loading
Thanks @sfan5 for patch in Minetest: 0500a7798b
Changed it slightly as more value were not initialized than just normals.
Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819&p=306518#p306518


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6354 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-21 21:11:48 +00:00
cutealien
8fcc572845 CB3DMeshFileLoader: abort if offsets point outside of file
Thanks @sfan5 for patch in Mintest: 195759100f
Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819&p=306518


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6353 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-21 20:50:15 +00:00
cutealien
0317f678fb Fix bounds checking in CMemoryWriteFile::seek
Thanks @sfan5 for patch: a3d848ff8b
Note I also modified the bounds checks for CMemoryReadFile once more to unify it with how Minetest fixed it. 
Due to some strange coincidence I had run into that bug yesterday for CMemoryReadFile and fixed it without realizing a fix was also part of a bunch of patches I had gotten 3 days earlier in the forum:
https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819&p=306518#p306518


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6352 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-21 20:39:31 +00:00
cutealien
a48b3a8d00 Fix not properly resizing on macOS due to incorrect window size
Thanks @torleif, Jordach and sfan5 for patch in Minetest: fa7a5dbdef
Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819&p=306518#p306518
Note: Not tested by me, as usual with OSX patches I just apply it as it seems to make sense.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6351 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-21 20:21:56 +00:00
cutealien
4d8d638ce2 Avoid warning
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6350 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-20 22:16:33 +00:00
cutealien
439667b369 Speed up stl format loading, especially with text format.
Loading whole file now in memory (unless it's already a memory file).
And avoiding lots of memory allocations otherwise by buffering token string in class object.
Was a bit unusable before for large files (several minute loading times now down to a second)-

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6349 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-20 22:09:03 +00:00
cutealien
9504b3da21 Prevent CMemoryFile to seek to a point before the start.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6348 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-20 21:57:25 +00:00
cutealien
3f2f98d7bd stl mesh writer can now write 32 bit meshbuffers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6347 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-20 18:31:03 +00:00
cutealien
28e092673f b3d writer can now write 32-bit meshbuffers.
Still can't read it though - reader needs SSkinMeshBuffer which only supports 16 bit so far
(changes in loader are just spelling fixes in comments)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6346 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-20 17:56:40 +00:00
cutealien
3ce2f0c0dd stl meshloader can now load 32 bit buffers (with corresponding hint)
Thanks @Foaly for the patch (https://irrlicht.sourceforge.io/forum/viewtopic.php?f=9&t=51441)
Applied with some minor changes.
Also mesh-type in that loader now set to EAMT_STATIC (was EAMT_OBJ before, probably some copy-pasting going on).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6342 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-19 21:32:11 +00:00
cutealien
24f2a1e9ab Rename IMeshLoader::setPreferredIndexType to setIndexTypeHint and give it a new enum.
Giving the loader it's own enum allowed me to add more options. 
EITH_OPTIMAL which reduces buffers back to 16-bit if they don't need 32-bit.
Using that in obj loader.
Also 32-bit meshes with EMT_PARALLAX_MAP_SOLID material should now work in obj loader (untested as I got no test-case)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6340 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-19 13:10:16 +00:00
cutealien
fc1e2c3b91 Rename some internal/unused draw2DImage function in COpenGLDriver to draw2DImageQuad to avoid warnings.
Also added a bit documentation about what it's purpose seems to be (hope I got it right...).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6336 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-15 18:36:56 +00:00
cutealien
c5b349ddb0 Add IMeshBufffer::clone for buffer copies, use it in CMeshManipulator::createMeshCopy
CMeshManipulator::createMeshCopy creates new meshes which have copies of the actual meshbuffers instead of copying everything into SMeshBuffers (which didn't support 32 bit or any of the other special features).



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6335 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-14 16:54:06 +00:00
cutealien
8447d3f531 obj writer can now write 32 bit buffers
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6334 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-14 14:39:31 +00:00
cutealien
c58afe8038 IMeshLoader can now set hints to prefer 16/32 bit buffers. Obj loader can now load 32 bit buffers.
- IMeshLoader::setPreferredIndexType and getPreferredIndexType allow setting hints for the loaders if users prefer 16 or 32 bit meshbuffers. Loaders are free to ignore those hints (all but .obj will do that for now).
- obj meshloader loads now 32-bit buffers when setPreferredIndexType is set to EIT_32BIT.
NOTE: It's 16 bit meshes use now also an IDynamicMeshbuffer instead of an SMeshBuffer.
That will break the code of people who accessed meshbuffer before by casting to SMeshBuffer*
And might even be somewhat slower (lot's of virtual functions...), but shouldn't really matter and can maybe be a bit improved.
Sorry about that, I considered keeping SMeshBuffer for 16-bit (still considering it), but it would add some overhead in code and I don't think it's worth that. If there are any complains I'll maybe consider it again.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6333 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-14 14:03:39 +00:00
cutealien
456bf86e66 Add missing IRR_OVERRIDE in some functions.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6332 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-12 21:58:35 +00:00
cutealien
71e9798d2a Add IMeshBuffer::getType
Allows to find out which class a meshbuffer has.
I used the same kind of style as ISceneNode::getType. So using four CC codes and virtual functions (instead of type variable).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6330 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-11 14:36:49 +00:00
cutealien
64fc9113fc Split CNullDriver::checkImage into 2 functions to avoid some memory allocations in addTexture
Avoid creating dummy arrays when we work with non array images.
Just a minor speed improvement.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6329 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-06 20:20:36 +00:00
cutealien
669ad7860a Add new cube mesh type ECMT_1BUF_24VTX_NP. CubeSceneNodes can now use different cube mesh types.
1 Meshbuffer with 24 vertices, so each side has it's own vertices.
Normals perpendicular to the cube-sides.
CubeSceneNode accepts now a ECUBE_MESH_TYPE
CubeSceneNode::clone now also clones rotation and scale (not sure why it didn't do that before - hope there was no reason, but can't think of any).
ISceneManager::addCubeSceneNode accepts now a ECUBE_MESH_TYPE and passes it through.
Example 22.MaterialViewer using new cube type. Also a few more beauty fixes there.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6313 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-22 22:08:33 +00:00
cutealien
3ad07543be Add IGUIImage::flip to allow flipping/mirroring images.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6301 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-08 18:44:23 +00:00
cutealien
3da5987f4b IVideoDriver::setMaterialRendererName now using u32 for index like other similar functions
Other functions like getMaterialRendererName got switched to u32 in the past. I can see no reason why this one was left out, so changing it to be same as the rest.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6300 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-09 19:28:45 +00:00
cutealien
19b003a840 IBillboardSceneNode got functions to access meshbuffers.
So uv-coordinates can now be modified directly (previously only possible via texture matrix).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6299 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-08 21:00:12 +00:00
cutealien
62cf8296b1 Bugfix: XML reader no longer drops last character in strings after certain character replacments
Due an off-by-one error it went wrong where there a special character replacement for the second-last character going on.
So something like "&lt;X" became "<" instead of "<X".

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6295 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-11 14:45:08 +00:00
cutealien
1dbab53e5a Prefer static_cast to reinterpret_cast where possible.
Just safer. Could probably do in a lot more places... another time.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6293 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 18:22:20 +00:00
cutealien
cfb27d9a74 Add some error checking in COSOperator::copyToClipboard
GlobalAlloc and GlobalLock can return NULL

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6292 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 17:36:20 +00:00
cutealien
9e27a6d4bf Avoid allocating more than 16k on stack in OCT loader.
Also avoid potential heap overwrites in there.
Sadly I have no examples for OCT files and it doesn't seem like a very common format as I couldn't even find any examples online.
So just assuming my changes work.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6291 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 17:30:06 +00:00
cutealien
98aed6ba67 utf8ToWchar and wcharToUtf8 work with sizeof checks instead of defines now to call correct conversion
Tiny speed hit, but old solution caused warnings. 
And it was not very safe by assuming all non _WIN32 platforms would use 32 bit sizes for wchar_t.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6290 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 15:19:46 +00:00
cutealien
c2ff824550 Define out unused functions in dmf loader to avoid warnings.
I don't know enough about DeleD from Delgine to fix this. 
But keeping the functions defined out as long as they don't get in the way.
Also I'm a bit suspicious about the license... for use in Irrlicht core only under zlib license?
That's not really zlib license then :-(


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6289 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 17:24:38 +00:00
cutealien
ed693fddca Avoid some warnings.
gcc does not like mixing enums and numbers


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6288 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 16:47:56 +00:00
cutealien
3e7a4666d5 Merging r6283 through r6284 from branch releases/1.8 to trunk
- Updating to zlib 1.2.11


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6285 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 16:23:03 +00:00
cutealien
30b78dab9b Merging r6274 through r6281 from branch releases/1.8 to trunk.
- Updates bzip2 to 1.0.8 (which sadly didn't reduce the amount of compile warnings, but let's hope it still improves something)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6282 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 15:45:58 +00:00
cutealien
dadbf64a8c Merging r6274 through r6276 from branch releases/1.8 to trunk
- Security fix for md2 loader


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6277 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-02 20:15:24 +00:00
cutealien
e7c7e36347 obj file loader now allows using mtl files with spaces in the filename.
mtllib commands previously used only the first word, now they use the rest of the line.
Different obj format descriptions describe the mtllib command in 2 different ways:
- http://paulbourke.net says it can load several mtl files separated by spaces
- Wikipedia says it can load one mtl file (but there can be several mtllib commands)
We previously loaded 1 file - using the name up to the first space character, so it basically was not correct for either solution. We now go with Wikipedia, because it allows using space in filenames and I tested several other tools and they all handled it like this.

Also COBJMeshFileLoader::copyLine no longer copies the newline character (didn't do that always anyway and we don't need it)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6275 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-12-22 16:19:59 +00:00
cutealien
2bed22acbb Merging r6270 from branch releases/1.8 to trunk
- Prevent buffer overflow in md2 loader


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6271 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-12-12 13:55:03 +00:00
cutealien
73d562d745 Merging r6266 through r6268 from branch releases/1.8 to trunk
- Spelling fixes
- Makefile adding to CFLAGS instead of replacing them.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6269 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-12-05 20:25:26 +00:00
cutealien
377e9c59df Change _IRR_OVERRIDE to IRR_OVERRIDE also on OSX headers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6256 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 19:19:09 +00:00
cutealien
b691098fae Unify VS project files some more.
Trying to clarify comments in irrLegacyDefines.h

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6254 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 18:09:14 +00:00
cutealien
3d2a55e788 Replace header guards in source folder to avoid using identifiers reserved by c++
Basically fixing original Bug#427 reported by MArkus Elfring.
Unfortunately there are still more defines (in IrrCompileConfig.h) which also are not nice c++
Lots of files touched for very minor cleanup *sigh*

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6253 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 15:55:04 +00:00
cutealien
0c6385cb92 Replace public header guards to avoid using indentifiers reserved by c++
Usually something like __IRR_SOME_GUARD_INCLUDED__ replaced by IRR_SOME_GUARD_INCLUDED.
Removing underscores at the end wasn't necessary, but more symmetric (probably the reason they got added there as well).
While this touches every header it shouldn't affect users (I hope).

Also a few whitespace changes to unify whitespace usage a bit.
And a bunch of spelling fixes in comments.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6252 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 15:03:34 +00:00
cutealien
ffd7b63af0 API BREAKER: Replacing defines in irrTypes.h which are conflicting with c++ reserved identifier rules.
C++ has undefined behavior for identifiers starting with __ or with _ followed by an uppercase letter.
We still have many more (in IrrCompileConfig.h and in all header-guards), will likely replace those later as well.
As a workaround for users which might use irrlicht defines in their code, I've added the header irrLegacyDefines.h
Including that allows to continue using old defines for a while - or make it easier to have code which compiles 
with old and new Irrlicht library versions.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6251 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 12:55:10 +00:00
cutealien
ee180dbd24 Unify VS project files and add a few more headers into them.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6250 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 10:47:05 +00:00
cutealien
dba40bb36f PACK_STRUCT was likely ignored in ieee654 struct.
clang warned about that and I think warning made sense. Also still works on gcc - will test on VS tomorrow.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6248 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:32:17 +00:00
cutealien
9564827d57 Avoid clang warning.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6247 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:30:44 +00:00
cutealien
8e149ffb40 Avoid gcc warning and fix some indention/whitespace.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6246 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:09:08 +00:00
cutealien
d03881b83a Reworking IRenderTarget interface to avoid constant memory allocations.
setTexture functions for single textures (more or less the usual case) IRenderTarget no longer need memory allocations 
on each call.
Also calling IRenderTarget::setTexture with a nullpointer no longer sets a rendertarget with an array which contains a single nullpointer but clears the array instead.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6243 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 16:45:20 +00:00
cutealien
a5f38804a3 Fix singular/plural in some variable names used in rendertargets.
Still can't decide on fixing/leaving function names... brr

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6241 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 14:09:35 +00:00
cutealien
feb3d07466 SIrrlichtCreationParameters::IgnoreInput set to false works again on X11.
Thanks @ Victor Gaydov for report + patch + very good test cases! (bug #401)
This had been broken since Irrlicht 1.6
The reason was that Irrlicht 1.6 wanted to ensure Irrlicht renders to given parent window instead of creating a child window in the parent window. That still works, but only with SIrrlichtCreationParameters::IgnoreInput set to true.
Added a few comments about further improvements as rendering to the given parent Window is likely also possible for this case, but that will need more work.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6237 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-25 14:33:22 +00:00
cutealien
4cebe6fbde Remove commented out code.
Forgot to remove that earlier.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6235 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-20 16:44:23 +00:00
cutealien
fab0c53b85 Add steer parameter to CSceneNodeAnimatorFollowSpline which allows rotating node toward direction of movement.
Thanks @ Bate for the patch (patch #175 with minor changes).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6234 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-20 16:39:37 +00:00
cutealien
54e10d0dbe Fix problem with legacy mipmap code on legacy ATI radeon X cards.
This was patch #285 from Danyal Zia and is about old radeon cards not supporting npot textures despite claiming so I think.
Was never applied as needed some rewrite first (did string-comparisons a bit too often), so got stuck on patch-tracker.
Well, lets hope this fixes it in case anyone ever needs that specific combination ever again ;-)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6233 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-20 14:46:12 +00:00
cutealien
7ce229a658 Add missing break in CGUIModalScreen::OnEvent.
Recently added code to allow using tab-key's inside modal dialogs could also be called when moving the mouse while the tab-key was pressed.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6232 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-20 12:27:05 +00:00
cutealien
e98b3bed57 Cast away warning in gcc
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6231 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-20 12:22:44 +00:00
cutealien
84b1fa30f0 Add a workaround for XWarpPointer bug mentioned reported by vikaig (#450)
Problem is that the mouse jumps when users have set a coordinate transformation matrix for their mouse on X11.
XWarpPointer first sets the correct coordinates, but X11 then moves the mouse wrongly to the scaled position on the next mouse event.
On X-Org bugtracker it's this bug: https://gitlab.freedesktop.org/xorg/xserver/-/issues/600
The fix needs compiling with _IRR_LINUX_X11_XINPUT2_ enabled (so far disabled by default)
Note: We only use XINPUT2 so far for touch-input... I hope this patch won't conflict with that.
Also I mix now IInput2 and X11 functions as getting the mouse-position still uses X11. But seems to work in my tests.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6230 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-19 17:25:08 +00:00
cutealien
34f4ae4797 Cast away gcc warning.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6229 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-16 13:04:43 +00:00
cutealien
27db3a6a0c Make sure all headers in include can be compiled independently
Also adding some to VS2010 project file (for better project search)
Some empty line removal.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6228 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-07-29 18:50:03 +00:00
cutealien
b0876d1e1a Fix compiling with _IRR_COMPILE_WITH_PROFILING_ enabled
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6227 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-07-20 18:46:21 +00:00
cutealien
ccd0b13fd0 Add documentation about LOCALE_DECIMAL_POINTS
Include fast_atof.h header in VS2010 project file.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6226 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-07-15 19:33:28 +00:00
cutealien
38e2aa1338 createTorusMesh can now create a partial torus
Capping the torus also supported.
Bit arguably if caps belong in this function, but default for caps is off and they can be useful.
(one could also code partial minor circles ... but I'm stopping there)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6225 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-28 14:33:08 +00:00
cutealien
28fd5f8a4f Reduce warnings in CGeometryCreator::createTorusMesh
Also simplify it a bit.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6224 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-28 12:22:04 +00:00
cutealien
9ba392e902 Add createTorusMesh function to IGeometryCreator
Mmmm .... Donuts!


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6222 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-25 16:19:11 +00:00
cutealien
479358755b No longer try loading broken image files twice with same image loader
This is mainly about getting rid of double error messages for same file.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6221 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-11 15:32:24 +00:00
cutealien
e7143ef977 Make CImageLoaderJPG thread safe. Thanks @ Edoardo Lolletti for report and patch (patch #324)
Replace a static variable which was used in error-reporting but wasn't thread-safe.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6220 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-11 15:09:02 +00:00