Commit Graph

13 Commits (d4ea6ce4b01f662c098870a5042915010a728d75)

Author SHA1 Message Date
kts d4ea6ce4b0 updated TODO. Gui system is as abominable as ever. Need to rework it so offset_x/offset_y contain the absolute x/y(maybe just rename to that) as created during doUpdate(). Added GuiButton/GuiList elements. The former is a basic button that (at the moment) relies on a textured image - will later have a text texture generated with SDL2_ttf. There now exists a SysInfo class, of which the global instance, sysinfo, is provided. This provides the app, user, and external data directories (still needs to be fully implemented). It also provides screen density DPI, xdpi, and ydpi, at least for Android. RenderObjects may now be shown/hidden. 2015-03-05 17:11:11 -08:00
kts 3c534a9b98 SDL2_image is now used. OMesh::loadObj now ensures that UVs and normals are created equal to the # of vertices - this is not exactly right, as it simply zeros values that don't exist, but it's better than nothing. Vertex indexing should be implemented using GL_DRAW_ELEMENTS, but for now we'll deal. Default cube now generates proper normals and uvs attached to triangular faces. GLSL vertex shaders now flip the outputted fragment UV (1.0 - uv.t). The Texture class has been created which is responsible for turning some image format data into an OpenGL texture. It handles things similarly to Mesh, in that it first loads the data then has to be 'built'. 2015-03-04 00:59:46 -08:00
kts f05725438d Implemented some of the GUI subsystem. Events are first passed through the GUI (should limit this to only particular events) before being sent to the top-most state. Later on, the GUI will be capable of locking the sending of particular events, such as motion or mousemove, if an element is currently focused/held. Basic GuiElement added. Each GuiElement may have children, each of which may have children in turn. The Gui will send getHit requests to the top-most/parent GuiElement, after which that GuiElement will send getHit requests down to its children and their children if need be. If a match is found, a pointer to that element is returned, otherwise NULL. More to be added, but hopefully the GUI system is robust enough - it tries to somewhat decouple from the state, in that elements do not have to have their lower level hit detection processed. There may be some oddities in the design that have yet to be discovered due to there being no visual front end (and the creation of RenderObjects for said visuals). 2015-03-03 03:24:07 -08:00
kts 8b93c18bd5 Updated ios, osx, and android builds - all work fine. 2015-03-02 20:08:00 -08:00
kts 0142296949 Added State class and MenuState subclass. Notes added for GUI and STATES in root. iOS, OS X, android, and Linux build environments now use include directories for src/ and src/states. This is to prevent excessive clutter in the src/ directory - although some might say that point was passed long ago. 2015-03-02 01:18:01 -08:00
kts abf9b299b5 Added Android Java JNI functions that set 'app' and 'ext' directories that correspond to the application data directory and the external storage app directory respectively. Shaders now use Assets. Assets no longer exist in a 'data/' directory within an AssetCache directory, but rather as their location relative to the root of the AssetCache directory. fileToMem now exists as a separate function to asset_fileToMem, as the old method does not quite fit the new AssetCache scheme. Windows version needs to be fixed to match this update. Android version needs proper Asset management via the ApkAssetCache class - this involves iterating through files in a JNI acceptable manner. 2015-03-01 05:45:36 -08:00
kts 05a43ddcdb Updated iOS, OSX, and Android projects 2015-02-28 14:43:09 -08:00
kts 00d0ec1c00 Added cube model for testing. Shader textures now start at index 0 rather than 1. Things work on iOS now. closeSystem deletes gl context and destroys window - needs to free textures, etc. still. Added testing finger and mouse motion control. Meshes now generate uv buffer object and normals buffer object. RenderCamera now supports rendering in orthogonal as well as perspective. Orthogonal rendering relies on 'size' float, which indicates the vertical 3D units shown on screen. This is, for RtB, equal to 1 meter. Perspective rendering uses fov_angle, which is the vertical field of view angle. This is, default, pi / 4. Screen resizing now works fine on Android - recreated buffer used non gles type. RenderView now uses nearest mag/min filters rather than linear. Added handleAppEvents which is intended to deal with state changes on mobile devices, such as app minimizing. At the moment, core.closeSystem is called when RtB enters the background. 2015-02-25 04:05:59 -08:00
kts a0eeec21b2 Much added. Basic asset access functions using fopen() techniques. Currently the system attempts to load from the CWD on most platforms, but on Android it attempts to load from the assets archive. Once updated, it will likely attempt to load from at least 3 locations before falling back to the built-in application assets (external device, user directory, application data directory). Creation/Loading of RtB is now managed by a Core class. This class is, to some extent, a service locator combined with larger engine functionality. A global instance of the class is provided as 'core'. It is responsible for updating the yet-to-be-added States, the base rendering, and the management of assets and much more. 2015-02-24 16:55:11 -08:00
kts f8758111dc Updated android, ios, and osx projects. Hopefully nothing is broken. 2015-02-12 07:40:40 -08:00
kts 30d4b87298 Updated ios and osx projects. Added some RenderCamera logic to RenderScene. Also added some basic code to main to test Render* functionality before the State machine is implemented. 2015-02-10 21:44:05 -08:00
kts 710712f8c1 Moved GL.hpp to a common.hpp. common.hpp provides includes for SDL2 and OpenGL(ES) and should be included in any file that wishes to access types or functionality provided by either. 2015-02-10 01:09:39 -08:00
kts 750791f823 Initial commit of RtB skeleton. ios, osx, and android build environments exist and successfully compile, presuming a fully functional SDL2 build environment. Documentation on getting such an environment set up will be forthcoming. 2015-02-04 15:26:15 -08:00