aboutsummaryrefslogtreecommitdiff
path: root/build/android/src/main/java
Commit message (Collapse)AuthorAge
* Android: build fixes & compat fixesMoNTE482019-11-09
|
* Fix misuse of AsyncTask (#8799)Linjie Pan2019-09-19
|
* Drop libgmp on Android and use mini-gmp (#8047)Loïc Blot2019-01-04
|
* Android: Fix start-up crashes on version 4.x (#8003)stujones112018-12-22
| | | | | | * Android: Load shared STL library * Android: Fix exception with window background image
* Update Android java code (#7820)Maksim2018-12-02
| | | | | | | | | | | | | | | Targets SDK 26 as required by the playstore. Fixes screen auto-rotation closing game. Hides on-screen navigation bar if present. Update gradlew. Fix display aspect on 18+/:9 displays (like a Samsung Galaxy S9). Remove small app icons, not required. Fix xml in unpacking activity. Support Android permission: On Android 6.0+ you need to manually give write permission (as required by google). Background during unpacking (just a demo for now). Material Design: no more Android 2 interface. Immersive mode (Android 4.4+ - hide NavBar for fullscreen mode).
* Android build fixes for c++11stujones112018-03-11
|
* Prevent Android from automatically locking display (#6876)Wayward One2018-01-04
| | | As mentioned in #5759
* Tell irrlicht if we handle a key or not.est312016-05-26
| | | | | | | | | We can remove the function in MtNativeActivity now as it serves precisely that purpose: to tell irrlicht that we handled the esc key. TODO for later: * Perhaps try to find a more performant container than KeyList
* Fix locked hardware buttons on AndroidMaksim Gamarnik2016-05-14
| | | | | | | | | | | | | | | | | Fixes #2122 Fixes #1454 Addendum (est31) According from its docs in android_native_app_glue.h (from the NDK), the onInputEvent should "Return 1 if you have handled the event, 0 for any default dispatching". Before, we always returned 1, meaning we blocked all hardware keys to be given to the OS. This broke the volume keys and has caused #2122 and #1454. Although it bases on lots of guesswork, it can probably safely be said that CGUIEnvironment::postEventFromUser returns true if the event was handled, and false if not. Therefore, set the status variable depending on what postEventFromUser returned.
* Upgrade Android build to Gradle build systemShadowNinja2016-04-28
The old Ant build system has been deprecated for a while and new development is focused on Gradle. I also removed a hardcoded string that lint caught and moved the patch files to a subdirectory. I left the JNI files in the root directory.
span class="hl opt">}; bool dirty{false}; }; class ShadowRenderer { public: ShadowRenderer(IrrlichtDevice *device, Client *client); ~ShadowRenderer(); void initialize(); /// Adds a directional light shadow map (Usually just one (the sun) except in /// Tattoine ). size_t addDirectionalLight(); DirectionalLight &getDirectionalLight(u32 index = 0); size_t getDirectionalLightCount() const; f32 getMaxShadowFar() const; /// Adds a shadow to the scene node. /// The shadow mode can be ESM_BOTH, or ESM_RECEIVE. /// ESM_BOTH casts and receives shadows /// ESM_RECEIVE only receives but does not cast shadows. /// void addNodeToShadowList(scene::ISceneNode *node, E_SHADOW_MODE shadowMode = ESM_BOTH); void removeNodeFromShadowList(scene::ISceneNode *node); void update(video::ITexture *outputTarget = nullptr); void drawDebug(); video::ITexture *get_texture() { return shadowMapTextureFinal; } bool is_active() const { return m_shadows_enabled; } void setTimeOfDay(float isDay) { m_time_day = isDay; }; s32 getShadowSamples() const { return m_shadow_samples; } float getShadowStrength() const { return m_shadow_strength; } float getTimeOfDay() const { return m_time_day; } private: video::ITexture *getSMTexture(const std::string &shadow_map_name, video::ECOLOR_FORMAT texture_format, bool force_creation = false); void renderShadowMap(video::ITexture *target, DirectionalLight &light, scene::E_SCENE_NODE_RENDER_PASS pass = scene::ESNRP_SOLID); void renderShadowObjects(video::ITexture *target, DirectionalLight &light); void mixShadowsQuad(); void updateSMTextures(); // a bunch of variables IrrlichtDevice *m_device{nullptr}; scene::ISceneManager *m_smgr{nullptr}; video::IVideoDriver *m_driver{nullptr}; Client *m_client{nullptr}; video::ITexture *shadowMapClientMap{nullptr}; video::ITexture *shadowMapClientMapFuture{nullptr}; video::ITexture *shadowMapTextureFinal{nullptr}; video::ITexture *shadowMapTextureDynamicObjects{nullptr}; video::ITexture *shadowMapTextureColors{nullptr}; std::vector<DirectionalLight> m_light_list; std::vector<NodeToApply> m_shadow_node_array; float m_shadow_strength; float m_shadow_map_max_distance; float m_shadow_map_texture_size; float m_time_day{0.0f}; int m_shadow_samples; bool m_shadow_map_texture_32bit; bool m_shadows_enabled; bool m_shadow_map_colored; u8 m_map_shadow_update_frames; /* Use this number of frames to update map shaodw */ u8 m_current_frame{0}; /* Current frame */ video::ECOLOR_FORMAT m_texture_format{video::ECOLOR_FORMAT::ECF_R16F}; video::ECOLOR_FORMAT m_texture_format_color{video::ECOLOR_FORMAT::ECF_R16G16}; // Shadow Shader stuff void createShaders(); std::string readShaderFile(const std::string &path); s32 depth_shader{-1}; s32 depth_shader_entities{-1}; s32 depth_shader_trans{-1}; s32 mixcsm_shader{-1}; ShadowDepthShaderCB *m_shadow_depth_cb{nullptr}; ShadowDepthShaderCB *m_shadow_depth_trans_cb{nullptr}; shadowScreenQuad *m_screen_quad{nullptr}; shadowScreenQuadCB *m_shadow_mix_cb{nullptr}; };