Baby steps in OpenGL
So far the code is organized in the following classes:
- Scene - Initializes all OpenGL assets - render targets, textures, shaders, as well as manages all the OpenGL states and render passes. This is basically the scene graph and the render class rolled in one. Will need to refactor in the future.
- RenderTarget - contains and sets up FBO and associated textures.
- OGL - contains program/pipeline/shader objects, manages attributes and handles setup and draws.
- Orbit - a derivative of OGL specific to updating and rendering orbits that needs to be refactored back in to OGL
- GameLogic - contains all functions that modifies game state; can be called by Input class or a future AI class
- Input - handles user inputs and populates an action queue that is fed into game logic
- Misc - camera class, check gl error,
- external libraries: glm, assimp, fontstash for rendering (will move over to nanovg in next update)
I’ve spent the last couple of weeks banging my head at shadowmapping, FXAA antialiasing, and hdr/bloom. I can render to screen a depth map, but can’t seem to get depth comparison to work. FXAA returns extremely unsatisfying results: either introduces weird artifacts at edges or does nothing at all. HDR/bloom works some what but looks a bit terrible.
I’m going to put these on the back burner and focus on game play aspects:
- Add target ships in the map
- Track distance to targets
- Spawn ships/missiles at will
- simple firing control to guide missiles
- discrete collission detection
- explotion... sprite? particles?
- continuous collission detection