@@ -171,10 +171,10 @@ std::string GetDefaultOutDirectory()
171171
172172struct FmtCapturePrefix
173173{
174- FmtCapturePrefix (int contextIdIn, const std::string &captureLabelIn)
174+ FmtCapturePrefix (gl::ContextID contextIdIn, const std::string &captureLabelIn)
175175 : contextId(contextIdIn), captureLabel(captureLabelIn)
176176 {}
177- int contextId;
177+ gl::ContextID contextId;
178178 const std::string &captureLabel;
179179};
180180
@@ -188,26 +188,26 @@ std::ostream &operator<<(std::ostream &os, const FmtCapturePrefix &fmt)
188188 {
189189 os << fmt.captureLabel ;
190190 }
191- os << " _capture_context" << fmt.contextId ;
191+ os << " _capture_context" << static_cast < int >( fmt.contextId ) ;
192192 return os;
193193}
194194
195195struct FmtReplayFunction
196196{
197- FmtReplayFunction (int contextIdIn, uint32_t frameIndexIn)
197+ FmtReplayFunction (gl::ContextID contextIdIn, uint32_t frameIndexIn)
198198 : contextId(contextIdIn), frameIndex(frameIndexIn)
199199 {}
200- int contextId;
200+ gl::ContextID contextId;
201201 uint32_t frameIndex;
202202};
203203
204204std::ostream &operator <<(std::ostream &os, const FmtReplayFunction &fmt)
205205{
206- os << " ReplayContext" << fmt.contextId << " Frame" << fmt.frameIndex << " ()" ;
206+ os << " ReplayContext" << static_cast < int >( fmt.contextId ) << " Frame" << fmt.frameIndex << " ()" ;
207207 return os;
208208}
209209
210- std::string GetCaptureFileName (int contextId,
210+ std::string GetCaptureFileName (gl::ContextID contextId,
211211 const std::string &captureLabel,
212212 uint32_t frameIndex,
213213 const char *suffix)
@@ -219,7 +219,7 @@ std::string GetCaptureFileName(int contextId,
219219}
220220
221221std::string GetCaptureFilePath (const std::string &outDir,
222- int contextId,
222+ gl::ContextID contextId,
223223 const std::string &captureLabel,
224224 uint32_t frameIndex,
225225 const char *suffix)
@@ -645,7 +645,9 @@ struct SaveFileHelper
645645 std::string filePath;
646646};
647647
648- std::string GetBinaryDataFilePath (bool compression, int contextId, const std::string &captureLabel)
648+ std::string GetBinaryDataFilePath (bool compression,
649+ gl::ContextID contextId,
650+ const std::string &captureLabel)
649651{
650652 std::stringstream fnameStream;
651653 fnameStream << FmtCapturePrefix (contextId, captureLabel) << " .angledata" ;
@@ -658,7 +660,7 @@ std::string GetBinaryDataFilePath(bool compression, int contextId, const std::st
658660
659661void SaveBinaryData (bool compression,
660662 const std::string &outDir,
661- int contextId,
663+ gl::ContextID contextId,
662664 const std::string &captureLabel,
663665 const std::vector<uint8_t > &binaryData)
664666{
@@ -695,7 +697,7 @@ void SaveBinaryData(bool compression,
695697
696698void WriteLoadBinaryDataCall (bool compression,
697699 std::ostream &out,
698- int contextId,
700+ gl::ContextID contextId,
699701 const std::string &captureLabel)
700702{
701703 std::string binaryDataFileName = GetBinaryDataFilePath (compression, contextId, captureLabel);
@@ -704,7 +706,7 @@ void WriteLoadBinaryDataCall(bool compression,
704706
705707void WriteCppReplay (bool compression,
706708 const std::string &outDir,
707- int contextId,
709+ gl::ContextID contextId,
708710 const std::string &captureLabel,
709711 uint32_t frameIndex,
710712 const std::vector<CallCapture> &frameCalls,
@@ -730,7 +732,7 @@ void WriteCppReplay(bool compression,
730732
731733 if (frameIndex == 0 || !setupCalls.empty ())
732734 {
733- out << " void SetupContext" << Str (contextId) << " Replay()\n " ;
735+ out << " void SetupContext" << Str (static_cast < int >( contextId) ) << " Replay()\n " ;
734736 out << " {\n " ;
735737
736738 std::stringstream setupCallStream;
@@ -786,7 +788,7 @@ void WriteCppReplay(bool compression,
786788
787789void WriteCppReplayIndexFiles (bool compression,
788790 const std::string &outDir,
789- int contextId,
791+ gl::ContextID contextId,
790792 const std::string &captureLabel,
791793 uint32_t frameStart,
792794 uint32_t frameEnd,
@@ -834,8 +836,9 @@ void WriteCppReplayIndexFiles(bool compression,
834836 header << " constexpr uint32_t kReplayFrameStart = " << frameStart << " ;\n " ;
835837 header << " constexpr uint32_t kReplayFrameEnd = " << frameEnd << " ;\n " ;
836838 header << " \n " ;
837- header << " void SetupContext" << contextId << " Replay();\n " ;
838- header << " void ReplayContext" << contextId << " Frame(uint32_t frameIndex);\n " ;
839+ header << " void SetupContext" << static_cast <int >(contextId) << " Replay();\n " ;
840+ header << " void ReplayContext" << static_cast <int >(contextId)
841+ << " Frame(uint32_t frameIndex);\n " ;
839842 header << " \n " ;
840843 header << " using FramebufferChangeCallback = void(*)(void *userData, GLenum target, GLuint "
841844 " framebuffer);\n " ;
@@ -946,14 +949,15 @@ void WriteCppReplayIndexFiles(bool compression,
946949 source << " }\n " ;
947950
948951 source << " \n " ;
949- source << " void ReplayContext" << contextId << " Frame(uint32_t frameIndex)\n " ;
952+ source << " void ReplayContext" << static_cast < int >( contextId) << " Frame(uint32_t frameIndex)\n " ;
950953 source << " {\n " ;
951954 source << " switch (frameIndex)\n " ;
952955 source << " {\n " ;
953956 for (uint32_t frameIndex = frameStart; frameIndex < frameEnd; ++frameIndex)
954957 {
955958 source << " case " << frameIndex << " :\n " ;
956- source << " ReplayContext" << contextId << " Frame" << frameIndex << " ();\n " ;
959+ source << " ReplayContext" << static_cast <int >(contextId) << " Frame"
960+ << frameIndex << " ();\n " ;
957961 source << " break;\n " ;
958962 }
959963 source << " default:\n " ;
@@ -1413,9 +1417,8 @@ void CaptureMidExecutionSetup(const gl::Context *context,
14131417 const TextureLevelDataMap &cachedTextureLevelData)
14141418{
14151419 const gl::State &apiState = context->getState ();
1416- gl::State replayState (0 , nullptr , nullptr , nullptr , EGL_OPENGL_ES_API,
1417- apiState.getClientVersion (), false , true , true , true , false ,
1418- EGL_CONTEXT_PRIORITY_MEDIUM_IMG);
1420+ gl::State replayState (nullptr , nullptr , nullptr , EGL_OPENGL_ES_API, apiState.getClientVersion (),
1421+ false , true , true , true , false , EGL_CONTEXT_PRIORITY_MEDIUM_IMG);
14191422
14201423 // Small helper function to make the code more readable.
14211424 auto cap = [setupCalls](CallCapture &&call) { setupCalls->emplace_back (std::move (call)); };
0 commit comments