Commit Graph

136 Commits

Author SHA1 Message Date
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
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
cutealien
2d5673a1d4 Switch SMaterial to default copy constructor and assignment operator
It's not 100% identical to what we had as I only copied up to MATERIAL_MAX_TEXTURES_USED before, but I think that was rather premature optimiziation.
(the cost for the extra textures is really in other places, don't think the copy here ever matters).
Was a bit based on Mintest patch, but they messed it up: 4931b34625
(because they didn't notice the difference between MATERIAL_MAX_TEXTURES_USED and MATERIAL_MAX_TEXTURES).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6363 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-26 19:22:45 +00:00
cutealien
77d5df9b1b Remove virtual destructor for IShader
I had somewhat rashly removed operator = in [r6280]
But since c++11 implicit defined copy assignment operator is deprecated when a user-declared destructor exists.
Still... alternative would be adding copy assignment operator but neither that nor the virtual destructor seem to be needed.
So rather removind destructor which seems to add an unnecessary virtual function table for it (seems to be just used like a POD throughout the code)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6362 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-26 18:40:44 +00:00
cutealien
af5a6802fe Remove virtual destructors ~SMD3QuaternionTag and ~SMD3QuaternionTagList
See no reason for them. And would have to put back operator= and copy constructor otherwise (realized creating those is now deprecated when having a destructor defined).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6361 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-26 18:19:30 +00:00
cutealien
2fa3b0d1ee Fix CVertexBuffer::setType when switching no empty vertex arrays. IVertexBuffer interface changes.
Previously vertex buffer did some invalid casts to references which could cause it to copy whatever was in memory into the vertex-arrays.
Generally it worked up to S3DVertex - but switch from another type to S3DVertex2TCoords or S3DVertexTangents caused it to be filled with whatever was in memory behind it.
Setter functions in IVertexBuffer have now overloads for all known vertex types.
Also adding const version of IVertexBuffer::getData.
And some warnings in comments about using the array functions (if even we mess it up...)
Also de-deprecate IIndexBuffer::pointer() again. I don't like having 2 functions for same stuff, but in the end it doesn't really hurt keeping it around.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6360 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-25 16:19:20 +00:00
cutealien
f77ae3aaf5 S3DVertex initialize color always. It's derived classes now both accept const S3DVertex& constructor.
color intitialization has some cost, but we initialized all other values already (vectors are always set to 0).
Don't think it's a good idea to have one value around which is random.
S3DVertex2TCoords(S3DVertex& o) to S3DVertex2TCoords(const S3DVertex& o) simply because it makes more sense
S3DVertexTangents(const S3DVertex& o) added because I'll need it later (and no idea why only S3DVertex2TCoords got one of those before).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6359 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-25 14:24:43 +00:00
cutealien
92564435f4 Fix bad cast in CIndexBuffer. Modify IIndexBuffer interface for cleanup and safety.
CIndexBuffer::setType could end up casting a temporary u16 variable to u32& (reference!).
Probably never noticed as this tended to mostly works (guess next byte on stack often 0?).
To prevent this from happening again I modifed IIndexBuffer::push_back to work with copies instead of references.
While breaking the interface anyway I also deprecated pointer() which is just identical to getData() anyway.
I get the idea of staying similar to core::array interface, but it's just confusing (and not same due to lack of types anyway).
Also added a const version for getData()

On a side-note - same setType bug still in CVertexBuffer, but a bit harder to fix there. So will be an new patch.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6357 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-22 16:28:29 +00:00
cutealien
8a9e82fed9 Bit cleanup of IDynamicMeshBuffer.
No point in repeating pure virtual functions
(maybe wasn't meant to be derived from IMeshBuffer at first?)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6356 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-22 14:22:41 +00:00
cutealien
5163d74e3f Remove trivial copy constructors and assignment operators
Thanks @sfan5 for patch for Mintest: 4931b34625
Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819
Note - patch is not applied exaclty yet. SMaterial and matrix4 still missing (might be applied later).
Also patch was based on older Irrlicht and we removed a few already earlier this year (around r6280).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6355 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-21 22:24:14 +00:00
cutealien
8cd7e46506 Add non-const version of IVertexBuffer::operator[]
Yeah, setValue is not enough and if getLast() works then this should work as well (when users are very careful...)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6345 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-20 11:03:23 +00:00
cutealien
57bcc52ca1 Add IVertexBuffer::setValue. Add comments.
Same as in IIndexBuffer. Needed as replacement for non const operator[] which can't be done for this interface (as type is dynamic).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6344 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-20 10:38:26 +00:00
cutealien
dd36699ad2 Set default for MeshLoader IndexTypeHint to EITH_OPTIMAL.
Did some tests and the overhead speed cost on loading and rendering where both not really measurable even in a pretty huge scene.
While some Irrlicht parts might still have a problem with 32-bit meshes (octree for example, also some meshmanipulator functions), it's probably still less of a problem than having broken meshes and just a nicer default. Also the troubling parts in Irrlicht can be improved over time.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6343 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-19 21:44:50 +00:00
cutealien
a2bb74096d IVertexBuffer and IIndexBuffer reallocate functions now pass through canShrink parameter to array
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6341 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-19 15:43:39 +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
d484711f2e CVertexBuffer no longer re-allocates stuff when type doesn't change
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6339 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-19 12:21:44 +00:00
cutealien
49616fd438 CIndexBuffer no longer re-allocates stuff when type doesn't change
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6338 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-19 12:18:15 +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
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
f9c85f380d Adding comments.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6331 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-12 16:04:56 +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
engineer_apple
2ddd6f5355 typo
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6328 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-04-04 16:37:55 +00:00
cutealien
5785b73d47 Add documentation that sourceRect of draw2dImage is based on the OriginalSize
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6324 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-30 10:49:13 +00:00
cutealien
60538c3646 Fix comment.
(Did I have a stroke when I was typing the old one?)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6316 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-24 22:24:13 +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
530ddbf32f line2d::intersectWith now using f64 instead of f32 internally
Avoid losing precision when working with line2d<f64>

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6305 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-14 15:11:05 +00:00
cutealien
709cbe9df6 Avoid some more warnings when working with CMatrix4<f64>
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6304 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-10 12:51:10 +00:00
cutealien
c5fd5bc4cd Avoid warnings when working with CMatrix4<f64>
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6303 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-10 12:24:03 +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
57f518737d vector3d scalar operator/ and operator/= no longer multiply by the inverse but use the expected division.
That was a bad case of premature optimization.
Multiplication is indeed faster, but when working with floats this can introduce some rather unexpected inaccuracies.
Like x/x suddenly no longer being 1.0 (something guaranteed by division). 
If someone really needs this back, then please add some new function which makes it clear we don't just have a typical division here.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6298 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-03 14:47:41 +00:00
cutealien
0fb6891267 Avoid some warnings from static code analysis.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6296 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-22 15:54:43 +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
b11c4c142c Remove several copy-constructors and assignment operators which did nothing special.
They all just implemented the same the default functions do.
This causes now warnings with newer gcc -Wdeprecated settings (otherwise they would have had to implement always both, but makes no sense as they did nothing special).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6280 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-06 14:02:12 +00:00
cutealien
1e7ceac26c Remove assignment operator in quaternion.
It's identical to the implicit one generated, so we don't need that.
And it triggers warnings with -Wdeprecated in newer gcc.
It's because the implicit definition of a copy constructor is deprecated if the class has a user-declared copy assignment operator.

There's a few more warnings about that in Irrlicht, will have to check them in detail as the other cases are not as trivial to fix as this one.



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6279 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-06 12:01:36 +00:00
cutealien
66f9511745 Fix: 64 bit integer typedefs have different definitions in different compilation units Mac OS
Thanks @edo9300 for reporting: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=7&t=52795
This is also once more trying to fix bug #433


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6278 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-04 18:44:35 +00:00
cutealien
60b245bf4f de-deprecate clearZBuffer
Lets just keep this one around. Easy to use, downward compatible and generally works as expected.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6259 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-10-13 10:12:04 +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
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
0c2049610a Add missing _IRR_OVERRIDE_
Clang complained.
Slightly interesting case - pure virtual function with override - I suppose for documentation purposes.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6245 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:00:31 +00:00
cutealien
7812d914f2 Add comments in IRenderTarget interface.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6244 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 16:49:47 +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
075c64bebb Add equals and set_data functions to core::array for easier working with blocks of data.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6242 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 16:41:14 +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
ef85ff7fba Add comment in path.h that the corresponding functions for path are in coreutil.h
Not going to change that as it breaks too much code moving it into another namespace (and arguably both are ok),
but should at least be mentioned somehwere.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6240 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-25 17:39:35 +00:00
cutealien
806665354d Fix include guard in leakHunter.h
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6238 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-25 17:23:16 +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
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
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
dfba4bd4e5 Comment fix.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6223 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-06-25 16:28:44 +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
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
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
3fa6370cea Merging r6172 through r6199 from branch releases/1.8 to trunk
Changes are all related to automatic creation of documentation.
Note: It's not yet fully working in trunk due to changes since 1.8


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6200 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-03-18 20:33:59 +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
83d011019f Fix bug in rect::clipAgainst that had caused rects completely outside the rect to be clipped against ending up with one corner outside.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6188 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-02-11 13:57:53 +00:00
cutealien
97ad8388b2 Add getAlign functions to IGUIElement
getAlignLeft, getAlignRight, getAlignTop, getAlignBottom.
Deliberately not mirroring setAlignment function, as that takes 4 parameters and that's always a bit ugly to return.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6187 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-01-25 16:15:44 +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
cutealien
c90238e87f Add getActiveColor functions to IGUIStaticText and IGUIButton
Returns currently used color - depending on state and if override color is set.
Note: Not adding this to editbox for now as it's a bit more tricky there (selection changing color, so it has no single color).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6165 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-12-10 14:45:30 +00:00
cutealien
bd2b44aa1c Add IGUIEnvironment::addToDeletionQueue to allow save removal of gui elements while iterating over them
Basically same as ISceneManager::addToDeletionQueue.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6164 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-12-09 16:26:25 +00:00
cutealien
0368c5b09d IGUIEnvironment::drawAll has now a parameter to allow disabling the automatic resize to driver screensize.
That makes it easier to use partial screens, while using automatic alignment. 
Default is still automatic resizing as before, thought it got changed a bit as it looked a bit strange.
Before it only set the lower-right corner, but compared to driver screensizes, so it behaved a bit strange
when the leftTop corner of the rootGuiElement was changed (different than when the rightBottom corner was set).
Could be the idea before was that only clipping matters.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6163 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-12-01 13:42:44 +00:00
cutealien
42b881ee74 Fix Bug #451 IDynamicMeshBuffer.h missing some _IRR_OVERRIDE_
Thanks @ Maksim Gamarnik  for report.
https://sourceforge.net/p/irrlicht/bugs/451


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6160 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-11-14 16:42:29 +00:00
engineer_apple
5cb28ea357 Burningsvideo 0.52
- scissor for 2D
- downscaled internal rendertargets,interlaced drawing
- supertuxkart gui ok

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6154 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-11-10 18:49:39 +00:00
cutealien
0cc51b74a6 Merge branch releases/1.8 revisions r5898 through r6137 into trunk.
Documentation fixes.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6138 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-08-31 20:11:14 +00:00
cutealien
54f5ac4982 Remove 'register' keyword in all c++ code.
It's never really done much in c++, was deprecated in c++11 and is reserved since c++17.
Thanks @Maksym Hamarnyk for remdinding me about this.
Note: there are few more register commands in third library .c code. It's still a valid keyword there.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6130 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-06-21 11:38:31 +00:00
cutealien
9062ac91af ICursorControl::isVisible is now always returning the flag that was set in setVisible.
This changes the behaviour on Win32 somewhat when Windows returned a CURSOR_SUPPRESSED state (touch-screen input hiding cursor globally).
Previously we set IsVisible it to false when CURSOR_SUPPRESSED was set.
Also we handle the CURSOR_SUPPRESSED state slightly different now and still try to hide cursors once when requested.
Reason for the change is that the old behaviour made it harder to recover from touch-screens hiding the cursor because Irrlicht didn't
know anymore which state is _should_ have. This also unifies the behaviour on all drivers as the other drivers already returned the visible
flag independent of the system being able to actually show the cursor.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6109 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-05-05 13:19:42 +00:00
cutealien
a67b616fc9 Add another render pass ESNRP_GUI which is drawn last and is p.E. useful for rendering gui nodes in the scenemanager.
UI and scenenodes are often connected. And while it was possible to work around this already by using custom draw functions
or deriving from gui and scene-nodes at the same time, it did already lead a few times to uglier code for me. 
So I guess adding one more pass to the engine has it's uses.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6107 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-03-30 16:04:53 +00:00
cutealien
7b1ee6468d Added 'uint' GLSL uniform support.
Thanks @devsh for the patch.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6073 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-02-10 15:01:11 +00:00
cutealien
f1a3995965 Add define IRR_CASE_IIMAGE_COMPRESSED_FORMAT to help getting rid of a few more warnings.
Unlikely we ever support conversions with compressed image format.
Define is a bit ugly I guess, but nicest way I could think off.
Can probably be used in some image writers as well, have to check which support/don't support compressed formats first.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6042 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-01-04 18:42:12 +00:00
cutealien
5d0b042a65 Use f64 version of reciprocal_squareroot in quaternion::normalize for more precision.
The f32 version jumped around more on gcc/linux (didn't do so with VisualStudio, mabye sqrt on VS already uses double internally).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6036 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-01-03 17:09:39 +00:00
cutealien
0b71328102 Use BlendFactor only when MaterialType != EMT_ONETEXTURE_BLEND
The way this was implemented BlendFactor and MaterialTypeParam could conflict otherwise as they both send the blend functions.

We could probably rewrite all places which use EMT_ONETEXTURE_BLEND+MaterialTypeParam to additionally check for BlendFactor, but it would still set the blend-functions twice. 
I'm not sure if BlendFactor works with 2D materials currently? (but we can't set those to shaders yet anyway except in the gles branch...).

I've also started documenting a few things about how I suppose it's working, I hope I got it all right.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6034 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-01-03 14:58:46 +00:00
cutealien
473ab1ea58 Unify checks if materials should use transparent render pass with new IVideoDriver::needsTransparentRenderPass function.
Fix bug that AnimatedMeshSceneNode ignored ReadOnlyMaterials flag when checking materials for transparent render passes.
Make IVideoDriver::getMaterialRenderer const.
Fix bugs in COctreeSceneNode, CMeshSceneNode and CAnimatedMeshSceneNode where check for transparency in OnRegisterSceneNode() and in render() where no longer identical (those got added after Irrlicht 1.8).

Some notes for future:
- Maybe we should have a getRenderPass instead of just needsTransparentRenderPass, but this way the code didn't need so much changes and behaves (aside from fixes) pretty much as before.
- Still wondering if the default implementation in CNullDriver::needsTransparentRenderPass should always return false when SMaterial.ZWriteEnable is set to EZW_ON.
  This might be nicer with another material flag. Thought then we might want a material enum to choose the renderpass and that's more work.
  And we get some recursion as needsTransparentRenderPass might want to check result of getWriteZBuffer which calls needsTransparentRenderPass, so we might need a second function or an additional flag there.
  But return false when SMaterial.ZWriteEnable == EZW_ON could still be done as EZW_ON is a new flag so existing behavior shouldn't break. I just don't know right now if having an extra render pass for transparent nodes might still make sense even when zbuffer is not written or if that's really the only reason to do that. Any feedback anyone?



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6033 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-01-03 11:13:57 +00:00
cutealien
2928a632a4 Material.ZWriteEnable is now of type E_ZWRITE instead of bool and ZWriteFineControl get removed (or merged into ZWriteEnable).
This breaks compiling. To have old values replace false with EZW_OFF and true with EWZ_AUTO.

There's a bit history to this change. ZWriteFineControl got introduced after 1.8 so it was never in a released version.
Basically it was needed after some changes had been made to allow shaders to have zwrite enabled independent
of the material-type (which worked badly for shaders). This had caused other problems as it was then enabled too often instead. 
So to quickly fix those bugs and avoid breaking compatibility I had introduced a new enum ZWriteFineControl in SMaterial.
This worked and didn't break compiling - but I noticed by now that introducing a second flag for this made maintainance for an already 
very hard to understand problem (figuring out the implementation of transparency and zwriting) even more complicated. 
So to keep maintance somewhat sane I decided to break compiling now and merge those two flags. 
The behavior should not be affected by this commit - except for users which set this flag already in their code and have to switch to the enum now.

Serialization is switched on loading old files (so SMaterial has enum already and writes that out).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6026 dfc29bdd-3216-0410-991c-e03cc46cb475
2020-01-02 15:34:52 +00:00
cutealien
fc37b383ed Fixing comments for E_ZWRITE_FINE_CONTROL.
(and considering replacing it and breaking binary serialization of SMaterial - having 2 flags for zwrite is simply too confusing).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6023 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-31 18:21:45 +00:00
cutealien
c661373121 EMT_REFLECTION_2_LAYER and EMT_TRANSPARENT_REFLECTION_2_LAYER on OpenGL now same as D3D9 version.
Before OpenGL used GL_SPHERE_MAP instead of GL_REFLECTION_MAP in COpenGLMaterialRenderer. 
Not sure why, but documentation mentioned GL not being implemented, so maybe it was forgotten?
Or maybe I'm  missing something as this was a big too easy to fix :-)
Anyway - I tested it and with that change they seem to look now identical to the D3D9 version, so I think it's fine.
Obviously means whoever used the material before on OpenGL has now a changed material.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6014 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-17 14:05:34 +00:00
cutealien
3acf725ae3 Work on IRRLICHT_FAST_MATH troubles. Document round_ and round32 troubles.
- Add warnings to round_, round32 about different (and sometimes worse) behavior than the standard library, especially at high numbers.
  For example with input 8388609 standard library corrrectly returns 8388609, but we get 8388610.
  But as we still don't use C99/c++11 in Irrlicht 1.9 I have no easy way to fix this.
- reciprocal_squareroot with IRRLICHT_FAST_MATH is less exact than it claims to be. Just commenting it.
- document slightly different behavior of reciprocal with IRRLICHT_FAST_MATH around 0.
- Kick out IRRLICHT_FAST_MATH for floor32, ceil32, round32. Their results are simply wrong, especially for uneven numbers.
  Like floor32(1) will be 0. or ceil32(-1) will also be 0. round32 wasn't as bad, but also down-rounding 0.5 and less exact.
  I know Burnings still wants those functions, so next commmit will add them again, but with new names and only an internal header.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6011 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-16 15:48:35 +00:00
cutealien
79800125ae No longer try to use __asm on _WIN64 in VisualStudio.
64-bit asm isn't supported on VS (and I suppose we used 32-bit asm anyway).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6010 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-16 13:57:31 +00:00
cutealien
5c8f0484da Remove clearFPUException which did nothing.
That function just returned true for years not doing anything.
As far as I can see from the web it's about some rare cases in DOS compatibility mode with 32-bit apps. 
But not sure why it was called exactly in this place in the past.
So no comments, no idea what it's about and not actually doing anything and probably not needed on any platform anyone still uses ... lets just kick it out.
(it did break compiling IRRLICHT_FAST_MATH on x64 which is why I noticed it)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6009 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-16 13:49:38 +00:00
cutealien
44fd5d37ea Change string::split once more
- Delimiters now end up in their own token when keepSeparators is true.
- When ignoreEmptyTokens is false we now add a token at the end when the last character is a delimiter.
While this means some changes, the ignoreEmptyTokens=false didn't work correct in 1.8 anyway, so another change shouldn't break much.
Thanks @manni63 for bringing this up in forum: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=51584&p=299634#p299634


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6007 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-13 15:30:07 +00:00
cutealien
421000e00d Avoid warning on gcc/linux.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6006 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-13 11:28:45 +00:00
cutealien
8310a3fbad Avoid warning and make local variable lower-case.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6000 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-12-12 16:32:41 +00:00