Commit Graph

27 Commits

Author SHA1 Message Date
614fa53487 Fix broken t-strip rendering logic
Triangle strips were originally by chance were rendering correct for most cases
until collision detection was implemented. Incorrect assumptions about
specifying triangle strip winding order meant that on occasion the last triangle
in a polygon would not be rendered.

This has been amended by strictly ensuring that on rendering of polygon the
order is correct from the vertices that are passed in.
2016-11-23 23:47:23 +11:00
e49984b3d0 Add arbitrary asteroid polygon rendering 2016-11-17 00:50:49 +11:00
339ae38b38 Simplify shaders, enable coloring of primitives 2016-11-12 01:17:30 +11:00
6d67485d49 Add primitive triangle rendering code 2016-11-11 21:43:03 +11:00
3894d33485 Fix rotation on render, change rendering code
Premultiply transformation matrix onto vertices before sending onto GPU to
preserve transformation properties of entities before being batched into
a general group. This removes the model matrix from the shader pipeline- instead
in rendering code we deal in world space (which works out to be more intuitive).
Only in the last step in GLSL we convert back to normalised coordinates.
2016-09-23 18:02:53 +10:00
1f799302c1 Fix sign multiplication error for projectile 2016-09-13 12:57:17 +10:00
80b35d404d Add better input parsing with key repeat tracking 2016-08-17 02:21:02 +10:00
aa505ed0b3 Remove input dependency on GLFW in game code
Create own platform abstraction for keyboard input for use in game code.
2016-08-04 18:19:02 +10:00
630f2eaa5d Add audio looping, simplify audio API
Audio can be played with 1 call, audio_beginVorbisStream which
encapsulates the initialisation of the renderer and release on finish.
OpenAL is quoted to have a limitation of around 32 sources. Audio
renderers hence acquire a source slot on playback and immediately release
on finish. This ensures that sources are held optimally and minimises the
possibility of saturating the available sources.

Renderers hold an index to the source list, which the index reveals the
source ID for their use.
2016-07-27 22:50:14 +10:00
71faaa78c4 Add openal-soft dependency, update opengl macro 2016-07-24 22:19:25 +10:00
a43102ee26 Rotate targetting reticule to mob. Add pivot point
Notion of pivot point now for rotating, i.e. the anchor point at which
rotations are applied. Rotating the reticule is done by using inverse
trigonometry, namely atan2f.
2016-07-23 21:26:15 +10:00
4f5270881f Add utility scripts for finding todos and statics 2016-07-20 17:15:31 +10:00
3e2287e13a Link avatar UI health display to hero health 2016-07-20 01:06:29 +10:00
d0b4c99787 Create empty texture idea, change function scopes
Some functions which should not be exposed in the API have been switched
to INTERNAL scope. We have a notion of an empty texture in World Traveller
that we can pass in situations where we just want to render a solid
colour with no associated texture.

The alternative to this was creating a separate shader for rendering
primitives but would require at some point to expose the AssetManager to
the renderer or the user on behalf has to manually switch shaders before
rendering (non-intuitive).
2016-07-16 17:15:03 +10:00
12fbc1000e Basic framework for scaling text, unimplemented 2016-07-15 18:34:23 +10:00
ea50aeb44e Allow color modulation of sprites, refactor renderer init 2016-07-09 16:08:03 +10:00
13a2152bf6 Correctly align text rendering to baseline 2016-07-07 22:30:06 +10:00
ef112fa4cb Flip font texture vertically on atlas creation 2016-06-29 14:04:35 +10:00
f53325cc6a Batch tiles to single vbo at render pass 2016-06-28 02:28:57 +10:00
d44ddf9371 Sprite switches direction, update vbo on render 2016-06-19 00:34:20 +10:00
bb57f080c9 Draw sprite from offset into tilesheet 2016-06-18 20:45:14 +10:00
68c53dad0a Switch to sprite renderer 2016-06-09 15:49:03 +10:00
6f7f9fa50a Sprite uses unique vao for rendering
Remove notation of "m" in member variables.
2016-06-08 01:35:00 +10:00
761609e1f9 Add sprite functionality, doesn't render yet 2016-06-07 23:54:14 +10:00
d08cc4621b Add zooming by modifying fov in perspective matrix 2016-06-04 17:14:08 +10:00
540b871c58 Add camera linear rotation 2016-06-03 17:05:28 +10:00
04e9f7bf85 Initialise repo 2016-06-03 15:07:40 +10:00