Commit Graph

28 Commits

Author SHA1 Message Date
paramat
25ba96fcac Meshes: Make object mesh face shading consistent
Previously, object meshes had their North and South faces darker than
East and West faces, the opposite of nodes and meshnodes. This commit
corrects this.
State constants as float-literals not double-literals.
Simplify code.
Add comment.
2017-01-13 02:42:18 +00:00
RealBadAngel
68f5b877c7 Halo: Highlight selected face
This is a slightly modified and cleaned up version of #3774 by RealBadAngel.
By sofar: Remove color change (just make it lighter) and some minor cleanups.
2016-11-12 06:41:04 +00:00
nerzhul
fefa148d69 v2d & aabbox3d<f32> & sky cleanups
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
2016-02-11 16:55:15 +01:00
RealBadAngel
9357294cfc Use single box for halo mesh 2016-02-11 13:11:25 +01:00
RealBadAngel
b44da4916a Cleanup selection mesh code, add shaders for halo and selection boxes 2016-02-08 03:57:42 -05:00
Kahrl
da686160c3 Make all mesh manipulators in mesh.cpp work with any vertex type
cloneMesh() has to use a switch in order to create a different
mesh buffer type depending on vertex type. (Credit: the new cloneMesh
was written by RealBadAngel.)

To avoid repetitive code, all other methods use getVertexPitchFromType()
to automatically adapt the indexing to the vertex type at runtime.
2016-01-15 04:18:32 +01:00
David Jones
34b7a147dc Change i++ to ++i 2015-08-25 18:33:52 -04:00
RealBadAngel
60350699c7 Add wielded (and CAOs) shader 2015-07-21 23:56:41 +02:00
est31
ee38bcd307 Automated whitespace error fix for last commit 2015-06-14 23:15:20 +02:00
RealBadAngel
43fcfbfe05 Improved parallax mapping. Generate heightmaps on the fly. 2015-06-14 21:13:36 +02:00
RealBadAngel
0164483310 Port createForsythOptimizedMesh from Irrlicht 1.8
Mesh rotation helpers.
2014-11-23 00:51:08 +01:00
Kahrl
9b551d5cbc Implement WieldMeshSceneNode which improves wield mesh rendering
- Don't create and cache an extruded mesh for every (non-node) item.
  Instead use a single one per image resolution.

- For cubic nodes reuse a single wield mesh too

- Improve lighting of the wielded item

- Increase far value of wield mesh scene camera, fixes #1770

- Also includes some minor refactorings of Camera and GenericCAO.
2014-11-08 23:11:57 +01:00
RealBadAngel
0066bd77d2 Add meshnode drawtype. 2014-10-18 16:42:23 +02:00
sapier
68bbdf1b2c Fix invalid usage of texture->getSize() where actually texture->getOriginalSize() was meant 2013-11-03 23:00:54 +01:00
Kahrl
4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
Kahrl
3607fae75a Fix possible NULL dereference in createExtrudedMesh 2013-07-06 06:16:51 +02:00
Kahrl
8f1d5d34a6 Move generateTextureFromMesh to TextureSource to fix a texture leak
TextureSource has a list of textures to delete (m_texture_trash) so this
provides a proper, non-hacky way to delete RTT textures. Also, the prior,
hacky way of deleting them seems to be broken (see pull request #803).

To avoid header file clutter by repeating the same long list of
arguments over and over again, store the arguments of
generateTextureFromMesh in a struct called TextureFromMeshParams.

Also fix issue #782 (Only use bilinear (and others) on item textures
when settings allow it).
2013-07-03 03:24:28 +02:00
Kahrl
2c09e8a84c Fix double free in createExtrudedMesh, reported by ptitSeb 2013-05-12 06:28:33 +02:00
sapier
04c3b17c78 fix various memory leaks 2013-04-09 02:23:07 -04:00
Sfan5
6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Jürgen Doser
870f7bcc93 fix screen flickering black when rendering to texture 2012-12-06 19:56:49 +02:00
Perttu Ahola
e02b95741b Revert "Don't leak textures all over the place"
This causes textures to be deleted before they are no longer accessed,
resulting in a segmentation fault. This needs to be rewritten in such a way
that textures are deleted when the client disconnects from a server.

This reverts commit 41c00e87d42580881d8c7001f39014814e3b55f2.
2012-11-25 16:39:07 +02:00
Kahrl
41c00e87d4 Don't leak textures all over the place 2012-11-02 18:45:39 +02:00
Perttu Ahola
037b259197 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Jonathan Neuschäfer
3a89c40e26 mesh: warn only once about render-to-target not being supported 2012-02-24 23:27:01 +01:00
Kahrl
6a76c226e1 The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef 2012-01-12 06:10:39 +01:00
Kahrl
392485aa45 inventorycube: use all three specified textures; also moved mesh creation / modification functions to mesh.cpp; in lua, inventorycube is now called minetest.inventorycube 2011-12-03 11:47:37 +02:00