Skip to content

Commit a1f2840

Browse files
Fix for loss of context on Android not recreating the VAOs
1 parent 4d6db69 commit a1f2840

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Documents/ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
ChilliSource Change Log
22
=======================
33

4+
Version 2.2.1, 2017-03-14
5+
-------------------------
6+
* HotFix: Fix for potential issue of the vertex attribute objects not being rebuilt when the context is lost on Android
7+
48
Version 2.2.0, 2017-03-14
59
-------------------------
610
* Removed: Render component factory. Just use the constructors of the render components instead (to replicate CreatePerspectiveCamera pass screenWidth/screenHeight for aspect ratio)

Source/CSBackend/Rendering/OpenGL/Model/GLMesh.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,14 @@ namespace CSBackend
132132
//------------------------------------------------------------------------------
133133
void GLMesh::Restore() noexcept
134134
{
135-
if(m_vertexDataBackup && m_invalidData)
135+
if(m_invalidData == true)
136136
{
137-
BuildMesh(m_vertexDataBackup.get(), m_vertexDataSize, m_indexDataBackup.get(), m_indexDataSize);
137+
m_vaoCache.clear();
138+
139+
if(m_vertexDataBackup)
140+
{
141+
BuildMesh(m_vertexDataBackup.get(), m_vertexDataSize, m_indexDataBackup.get(), m_indexDataSize);
142+
}
138143

139144
m_invalidData = false;
140145
}

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![alt link](Documents/Images/ChilliSourceLogo.png)
22

3-
ChilliSource v2.2.0
3+
ChilliSource v2.2.1
44
====================
55

66
ChilliSource is an open source, cross-platform game engine designed by game developers for game developers. It is completely free to use (now and forever), released under the MIT License.

0 commit comments

Comments
 (0)