summaryrefslogtreecommitdiff
path: root/game
Commit message (Collapse)AuthorAge
* Fix naming violations in MeshDan Goodliffe2 days
| | | | | They've existed and been annoying since the day I first created it from online examples.
* Add glVertexArray useBufferDan Goodliffe2 days
| | | | | | Wraps glVertexArrayVertexBuffer automatically getting the buffer name from the argument and deriving the stride from the container's value_type.
* Don't create and then replace shadow and billboard texturesDan Goodliffe2 days
|
* Replace glContainer with glAllocatorDan Goodliffe2 days
| | | | | | | glContainer is no longer required, as we can use std::vector with a custom allocator which uses OpenGL buffers for storage. Minor irritation is that the mapped buffers aren't guaranteed to be flushed in the tests, so sometimes we're missing bits in a test render.
* Replace use of VertexArrayObject with glVertexArray/glBuffer DSA versionsDan Goodliffe3 days
|
* Replace basic glVertexArray with a specific class ready for helpersDan Goodliffe5 days
|
* Update stencils and billboards less oftenDan Goodliffe6 days
| | | | | | | No need to update these every frame when little of nothing has changed. Instead, track the angle previously rendered and updated only when the new angle has diverged sufficiently from this. Larger updates update more frequently.
* Calculate an appropriate billboardSize and useMeshClipDistDan Goodliffe7 days
| | | | Removes hard coded arbitrary numbers for 256px sq and 140m.
* Wrap up some low level texture operations in glTexture classDan Goodliffe7 days
| | | | Fixes previously hard coded billboard texture size.
* Billboard foliageDan Goodliffe9 days
| | | | | | Partition the instances by within/without the view frustum, then by proximity to the view point and within/without the sunlight shadow frustum. Use billboards for far away/out of view instances.
* Simplified FrustumDan Goodliffe2026-02-21
| | | | | | | | | | | Don't need to differentiate between shadedBy by contains. The 5 plane/face variant is actually fine in both cases. For a perspective projection, the near plane is essentially at the origin and is handled by the left/right/top/bottom planes meeting. For the directional light case (orthographic projection) the near plane is omitted as objects in front of the clip space still cast shadows into it. Also includes a fix the distance calculation to not add .w, don't know where I got the idea this was right.
* Fix up the preFrame process to use both frustumsDan Goodliffe2026-02-18
| | | | | | (camera and directional light frustums) This has made the whole preFrame process far more fiddly and repetitive than I'd like, but it does work. Maybe we can tidy it up later.
* Initial commit using tesselation shader to create curvesDan Goodliffe2026-01-31
| | | | Disables glslangValidator because of file extension mess up.
* Avoid out parameters with Ray::intersectSphereDan Goodliffe2025-04-24
|
* Avoid out parameters with Ray::intersectTriangleDan Goodliffe2025-04-24
|
* Fix all warnings game/network/*Dan Goodliffe2025-04-23
| | | | Mostly naming of variables.
* Add Asset interface to create an arbitrarily placed instanceDan Goodliffe2025-04-07
| | | | | InstanceProxy is returned out via a std::any containing a std::shared_ptr because any can only contain copyable things.
* Replace call to calc_vertex_normal_correctDan Goodliffe2025-04-05
| | | | | Same code copied inline, but adjusted to avoid normalising using Scalar which is an integral type.
* Add Renderable typed collection to GameState worldObjectsDan Goodliffe2025-03-23
|
* Make Collections::objects protected, extend interfaceDan Goodliffe2025-03-22
| | | | | Keeps all required features accessible, but through a controlled interface.
* Invert how shared/unique is specified for CollectionDan Goodliffe2025-03-22
| | | | Template param is a pointer now, typedefs added for ease.
* Add ManyPtr which tracks specified subclassesDan Goodliffe2025-03-22
| | | | | | This removes the need to repeated dynamic_cast the pointer. Provides interface which enforces the fastest option for the required types.
* Split Terrain::generateMeshes into smaller functionsDan Goodliffe2025-03-12
| | | | | | Also removes incorrect optimisation that a tile's AABB could be assumed from tile base position; in fact some faces cross the boundaries and the AABB needs to account for this.
* Cull terrain meshes from render that don't cast a shadow into the frustumDan Goodliffe2025-03-11
|
* Pass a Frustum to shadow renderersDan Goodliffe2025-03-11
| | | | The frustum might not be correct at this stage.
* Template AxisAlignedBoundingBox on unit typeDan Goodliffe2025-03-11
|
* Current tile in frustum as we loopDan Goodliffe2025-03-11
| | | | Chunk by surface only, render if visible in frustum
* Construct terrain tile AxisAlignedBoundingBox during mesh generationDan Goodliffe2025-03-11
| | | | | No surface is simply the tile bounds, but with a surface, it's constrained to just the bounds of the surface itself.
* Only render terrain tiles which are visible in the frustumDan Goodliffe2025-03-11
|
* Create AxisAlignedBoundingBoxDan Goodliffe2025-03-11
| | | | Used to define the extents of GeoData mesh
* Pass frustum into render functionsDan Goodliffe2025-03-07
| | | | Support for culling objects outside the view frustum
* Work around clang thinking this is unused in lambdasDan Goodliffe2025-03-01
|
* Split meshes by surface and tileDan Goodliffe2025-02-26
| | | | | Tile is derived per face based on the first vertices point rounded to roughly 1km.
* Improve Terrain::generateMeshes performanceDan Goodliffe2025-02-25
| | | | | Creates mesh per surface based on a single buffer of all vertices and a collection of per surfuce indices. Makes ColourBias a uniform instead of a vertex attribute.
* Don't rely on triangle centroid not already having a surfaceDan Goodliffe2025-02-24
|
* Improve number of segments in LinkCurve basesDan Goodliffe2025-02-23
|
* Process set height as required in chunks of target vertexDan Goodliffe2025-02-23
|
* Less allocy/work set based surface/recursive height settingDan Goodliffe2025-02-23
|
* Add adjusted boundary vertices to new/changes/boundary listsDan Goodliffe2025-02-23
|
* Expand new verts collection onceDan Goodliffe2025-02-18
| | | | Before doing vertex normal recalc only, not on every insert
* Only build/run GeoDataMesh::sanityCheck for debugDan Goodliffe2025-02-17
|
* Refactor GeoData::setHeights until a struct made of a logical breakdown of ↵Dan Goodliffe2025-02-17
| | | | the process
* Fixes and tests to new range helpersDan Goodliffe2025-02-15
|
* Range adaptor to make triangle strip triplesDan Goodliffe2025-02-15
|
* Use new helpers to simplify close entity search in GeoData::setPointDan Goodliffe2025-02-14
|
* Move basic setHeights lambdas into proper helper functionsDan Goodliffe2025-02-13
|
* Replace mesh generation counter with afterChange eventDan Goodliffe2025-02-10
|
* Combine GeoData and Terrain class hierarchiesDan Goodliffe2025-02-09
|
* Split GeoData mesh basics into a subclassDan Goodliffe2025-02-09
| | | | Declutters the class for terrain related things
* Move lots of geoData helpers into libDan Goodliffe2025-02-09
|