- removed 10 CR characters - removed 39 trailing whitespaces - replaced 243 tabs with spaces - fixed 60 svn:eol-style propertiesundefined
| @@ -31,7 +31,7 @@ private: | |||||
| int m_i_cur; | int m_i_cur; | ||||
| public: | public: | ||||
| //GET/SET exec | |||||
| //GET/SET exec | |||||
| int GetCmdNb() { return m_commands.Count(); } | int GetCmdNb() { return m_commands.Count(); } | ||||
| int GetCmd(int i) | int GetCmd(int i) | ||||
| { | { | ||||
| @@ -41,7 +41,7 @@ public: | |||||
| return m_commands[i].m1; | return m_commands[i].m1; | ||||
| } | } | ||||
| //cmd storage | |||||
| //cmd storage | |||||
| void AddCmd(int cmd) { m_commands.Push(cmd, m_floats.Count(), m_ints.Count()); } | void AddCmd(int cmd) { m_commands.Push(cmd, m_floats.Count(), m_ints.Count()); } | ||||
| //GETTER | //GETTER | ||||
| @@ -41,8 +41,8 @@ EasyMesh::EasyMesh(const EasyMesh& em) | |||||
| m_cursors = em.m_cursors; | m_cursors = em.m_cursors; | ||||
| m_build_data = nullptr; | m_build_data = nullptr; | ||||
| m_gpu_data = GpuEasyMeshData(); | m_gpu_data = GpuEasyMeshData(); | ||||
| if (em.m_build_data) | |||||
| m_build_data = new EasyMeshBuildData(*em.m_build_data); | |||||
| if (em.m_build_data) | |||||
| m_build_data = new EasyMeshBuildData(*em.m_build_data); | |||||
| if (m_indices.Count() && m_vert.Count() && m_cursors.Count()) | if (m_indices.Count() && m_vert.Count() && m_cursors.Count()) | ||||
| m_state = MeshRender::NeedConvert; | m_state = MeshRender::NeedConvert; | ||||
| else | else | ||||
| @@ -238,8 +238,8 @@ void EasyMesh::MeshConvert(GpuShaderData* new_gpu_sdata) | |||||
| { | { | ||||
| m_gpu_data.AddGpuData(new_gpu_sdata, this); | m_gpu_data.AddGpuData(new_gpu_sdata, this); | ||||
| for (int i = DebugRenderMode::Default; i < DebugRenderMode::Max; i++) | for (int i = DebugRenderMode::Default; i < DebugRenderMode::Max; i++) | ||||
| if (!m_gpu_data.HasData(i)) | |||||
| m_gpu_data.AddGpuData(new DefaultShaderData(DebugRenderMode(i)), this); | |||||
| if (!m_gpu_data.HasData(i)) | |||||
| m_gpu_data.AddGpuData(new DefaultShaderData(DebugRenderMode(i)), this); | |||||
| } | } | ||||
| m_state = MeshRender::CanRender; | m_state = MeshRender::CanRender; | ||||
| } | } | ||||
| @@ -184,30 +184,30 @@ void VertexDictionnary::AddVertex(const int vert_id, const vec3 vert_coord) | |||||
| //Will update the given list with all the vertices on the same spot. | //Will update the given list with all the vertices on the same spot. | ||||
| void VertexDictionnary::RemoveVertex(const int vert_id) | void VertexDictionnary::RemoveVertex(const int vert_id) | ||||
| { | { | ||||
| int j = 0; | |||||
| int j = 0; | |||||
| for (; j < vertex_list.Count(); j++) | for (; j < vertex_list.Count(); j++) | ||||
| if (vertex_list[j].m1 == vert_id) | if (vertex_list[j].m1 == vert_id) | ||||
| break; | break; | ||||
| if (vertex_list[j].m3 == VDictType::Master) | |||||
| { | |||||
| int jf = -1; | |||||
| //change all the master ref in the list | |||||
| for (int i = 0; i < vertex_list.Count(); i++) | |||||
| { | |||||
| if (vertex_list[i].m3 == j) | |||||
| { | |||||
| if (jf < 0) | |||||
| { | |||||
| jf = i; | |||||
| vertex_list[i].m3 = VDictType::Master; | |||||
| } | |||||
| else | |||||
| vertex_list[i].m3 = jf; | |||||
| } | |||||
| } | |||||
| } | |||||
| vertex_list.Remove(j); | |||||
| if (vertex_list[j].m3 == VDictType::Master) | |||||
| { | |||||
| int jf = -1; | |||||
| //change all the master ref in the list | |||||
| for (int i = 0; i < vertex_list.Count(); i++) | |||||
| { | |||||
| if (vertex_list[i].m3 == j) | |||||
| { | |||||
| if (jf < 0) | |||||
| { | |||||
| jf = i; | |||||
| vertex_list[i].m3 = VDictType::Master; | |||||
| } | |||||
| else | |||||
| vertex_list[i].m3 = jf; | |||||
| } | |||||
| } | |||||
| } | |||||
| vertex_list.Remove(j); | |||||
| for (int i = 0; i < master_list.Count(); i++) | for (int i = 0; i < master_list.Count(); i++) | ||||
| if (master_list[j] == j) | if (master_list[j] == j) | ||||
| break; | break; | ||||
| @@ -196,7 +196,7 @@ public: | |||||
| m_texcoord_scale = vec2(1.f); | m_texcoord_scale = vec2(1.f); | ||||
| m_texcoord_scale2 = vec2(1.f); | m_texcoord_scale2 = vec2(1.f); | ||||
| m_build_flags = 0; | m_build_flags = 0; | ||||
| m_i_cmd = 0; | |||||
| m_i_cmd = 0; | |||||
| m_exec_nb = -1; | m_exec_nb = -1; | ||||
| for (int i = 0; i < MeshType::Max; ++i) | for (int i = 0; i < MeshType::Max; ++i) | ||||
| { | { | ||||
| @@ -239,11 +239,11 @@ void GpuEasyMeshData::AddGpuData(GpuShaderData* gpudata, EasyMesh* src_mesh) | |||||
| m_indexcount = indexlist.Count(); | m_indexcount = indexlist.Count(); | ||||
| } | } | ||||
| //init to a minimum of gpudata->m_render_mode size | |||||
| //init to a minimum of gpudata->m_render_mode size | |||||
| if (m_gpudatas.Count() <= gpudata->m_render_mode) | if (m_gpudatas.Count() <= gpudata->m_render_mode) | ||||
| { | { | ||||
| int i = m_gpudatas.Count(); | |||||
| int max = gpudata->m_render_mode + 1; | |||||
| int i = m_gpudatas.Count(); | |||||
| int max = gpudata->m_render_mode + 1; | |||||
| m_gpudatas.Reserve(max); | m_gpudatas.Reserve(max); | ||||
| for (; i < max; i++) | for (; i < max; i++) | ||||
| m_gpudatas << nullptr; | m_gpudatas << nullptr; | ||||
| @@ -378,8 +378,8 @@ void GpuEasyMeshData::SetupVertexData(uint16_t vflags, EasyMesh* src_mesh) | |||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| void GpuEasyMeshData::RenderMeshData(mat4 const &model, int render_mode) | void GpuEasyMeshData::RenderMeshData(mat4 const &model, int render_mode) | ||||
| { | { | ||||
| ASSERT(0 <= render_mode && render_mode < m_gpudatas.Count(), "render mode is not in the defined range"); | |||||
| ASSERT(m_gpudatas[render_mode], "gpu datas for this render mode don't exist"); | |||||
| ASSERT(0 <= render_mode && render_mode < m_gpudatas.Count(), "render mode is not in the defined range"); | |||||
| ASSERT(m_gpudatas[render_mode], "gpu datas for this render mode don't exist"); | |||||
| GpuShaderData& gpu_sd = *(m_gpudatas[render_mode]); | GpuShaderData& gpu_sd = *(m_gpudatas[render_mode]); | ||||
| int vdecl_idx = 0; | int vdecl_idx = 0; | ||||
| @@ -90,7 +90,7 @@ public: | |||||
| protected: | protected: | ||||
| uint16_t m_vert_decl_flags; | uint16_t m_vert_decl_flags; | ||||
| Shader* m_shader; | Shader* m_shader; | ||||
| int m_render_mode; | |||||
| int m_render_mode; | |||||
| Array<lol::String, ShaderUniform> m_shader_uniform; | Array<lol::String, ShaderUniform> m_shader_uniform; | ||||
| Array<ShaderAttrib> m_shader_attrib; | Array<ShaderAttrib> m_shader_attrib; | ||||
| }; | }; | ||||
| @@ -121,7 +121,7 @@ public: | |||||
| //--- | //--- | ||||
| void AddGpuData(GpuShaderData* gpudata, class EasyMesh* src_mesh); | void AddGpuData(GpuShaderData* gpudata, class EasyMesh* src_mesh); | ||||
| void RenderMeshData(mat4 const &model, int render_mode=Video::GetDebugRenderMode()); | void RenderMeshData(mat4 const &model, int render_mode=Video::GetDebugRenderMode()); | ||||
| bool HasData(int render_mode) { return (0 <= render_mode && render_mode < m_gpudatas.Count() && !!m_gpudatas[render_mode]); } | |||||
| bool HasData(int render_mode) { return (0 <= render_mode && render_mode < m_gpudatas.Count() && !!m_gpudatas[render_mode]); } | |||||
| private: | private: | ||||
| void SetupVertexData(uint16_t vdecl_flags, EasyMesh* src_mesh); | void SetupVertexData(uint16_t vdecl_flags, EasyMesh* src_mesh); | ||||
| @@ -323,7 +323,7 @@ void android_main(android_app* native_app) | |||||
| { | { | ||||
| int ident, fdesc, events; | int ident, fdesc, events; | ||||
| struct android_poll_source* source; | struct android_poll_source* source; | ||||
| ident = ALooper_pollAll(0, &fdesc, &events, (void**)&source); | ident = ALooper_pollAll(0, &fdesc, &events, (void**)&source); | ||||
| if (ident >= 0 && source) | if (ident >= 0 && source) | ||||