Commit Graph

130 Commits

Author SHA1 Message Date
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
cutealien
224d7c5e2c Vertex texture sampling support in Direct3D 9 now controlled via texture-flag ETCF_SUPPORT_VERTEXT_TEXTURE
It's no longer enabled by default as it causes some costs to all texture switches.
Thanks @ edo9300 for reporting (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52721)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6219 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-04 12:17:01 +00:00
cutealien
ca48a1ac69 CGUIListBox now serializes the state of 'Selected'.
Feature wish by chronologicaldot (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=52719)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6218 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-01 11:05:54 +00:00
cutealien
f31c1be792 Remove CD3D9Driver::getViewPort overload which did the exact same thing as base class.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6217 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-05-31 13:36:25 +00:00
cutealien
f103ea3dac Bugfix: Changing focus with tab-keys now also work when elements are inside a modal screen.
Event got eaten before. It passes it now on partly (enough to arrive at CGUIEnvironment) when the focus will stay inside the modal screen.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6215 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-05-26 13:57:12 +00:00
cutealien
9147d4ade8 COBJMeshFileLoader using a bit more exact color conversion for 0-1 to 0-255 range
Same now as SColorf::toSColor


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6214 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-05-07 12:41:57 +00:00
cutealien
e611f2c571 Speedup for COBJMeshWriter
Avoiding some memory allocations.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6213 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-05-06 15:01:05 +00:00
cutealien
678e06baeb Add blinkMode parameter to IGUIEnvironment::addModalScreen, so blinking can be suppressed
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6212 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-05-05 13:22:02 +00:00
engineer_apple
1766fc7060 reduce warning.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6208 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-04-17 23:02:44 +00:00
cutealien
451134322d Add changes to Makefile
Add -fPIC to linker flags (additional to compiler flags).
This is sometimes necessary as chronologicaldot reported in the forum: 
http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=52708
Also gcc manual says this about the -shared flag: 
"For predictable results, you must also specify the same set of options used for compilation (-fpic, -fPIC, or model suboptions) when you specify this linker option."
Add TODO for this about sharedlib_osx as I can't test that.

Add documentation when "make clean" is needed. So far we only have a single set of .o files written in the same folder.
So this has to be called basically on all changes.

Use CPPFLAGS instead of CFLAGS, CXXFLAGS in a few places for options which should be used for all files.

Add CFLAGS and CXXFLAGS for dependency files (not 100% certain about those, just seems to make more sense to me)



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6207 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-04-17 13:57:33 +00:00
cutealien
bfaffe1171 Speedup: Avoid string copy in CXMLReaderImpl::getAttributeByName
string has operator== for char_type which can save a lot of string allocations when loading xml's.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6206 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-04-16 12:59:29 +00:00
cutealien
1c14ae8988 Change default meaning of SIrrlichtCreationParameters::WindowResizable == 2 to meaning no resizing.
Otherwise I probably break AmigaOS again (which was the reason to add this parameter in first place)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6197 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-03-06 15:58:05 +00:00
cutealien
c83eaa654c SIrrlichtCreationParameters::WindowResizable no longer bool but has 3 states.
New default is that the system decides itself.
Reason is that X11 didn't like the last change (disabling it on start) too much and we got messed up title-bars.
Or at least on some Window Managers. Which makes sense as X11 really requires Windows to be resizable in Windowed mode.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6196 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-03-06 15:49:43 +00:00
cutealien
155c7f7592 Prevent crash in CIrrDeviceMacOSX::setWindowCaption with cyrillic strings.
Thanks @Maksym Hamarnyk for proposing a patch and testing some changes.
May break OSX 10.5 and older (lack of test-system, but probably not much used anymore).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6194 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-02-21 19:07:46 +00:00
cutealien
cb2aaf8255 Trying to fix compiling for Apple silicon.
Thanks at Maksim Gamarnik for patch:
599631f5bd
See bug #452 https://sourceforge.net/p/irrlicht/bugs/452


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6192 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-02-21 16:19:44 +00:00
engineer_apple
12a94ed5b7 BurningVideo: remove align 16 byte on win32
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6191 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-02-13 21:49:03 +00:00
cutealien
748510300d Remove redundant compile flags -fstrict-aliasing -fexpensive-optimizations
Both are already included in -O2 (which is in included in the -O3 we use)
Thanks @randomMesh for reporting: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52692
Note: -fstrict-aliasing also gets removed in debug now where it also was enabled.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6190 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-02-12 11:29:53 +00:00
cutealien
81a392928b Simplify touch-event handling a bit.
Discussion to this in https://sourceforge.net/p/irrlicht/patches/322
Basically last solution caused problems as it send fake-mouse events on top of touch-events.
For now we can probably just enable touch-events and clear masks for everything else for all devices
as we only use the XInput2 events for touch-event handling and nothing else.
At least not noticing conflicts with rest of X11 input so far and user TheBrokenRail said this works for him.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6184 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-01-06 14:43:37 +00:00
cutealien
af380df28f Make previous touch-input patch for X11 a bit more similar to other event code.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6179 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-12-30 14:59:45 +00:00
cutealien
e92ed55afa Add optional multitouch support to X11.
Thanks @TheBrokenRail for a patch proposal based on example code from esjeon (patch #322).
See https://sourceforge.net/p/irrlicht/patches/322
Original example code here: https://github.com/esjeon/xinput2-touch
Users have to enable _IRR_LINUX_X11_XINPUT2_ in IrrCompileConfig and link with Xi to make this work.
I rewrote the patch a bit and have no system for testing here, so this still needs some testing.
I also backported EET_TOUCH_INPUT_EVENT for this from the ogl-es branch.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6178 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-12-29 02:15:27 +00:00