File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Sample/Rendering-BaseTexture Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ class BaseTexApp final : public Application {
63
63
static constexpr size_t backBufferCount = 2 ;
64
64
65
65
void CreateDevice ();
66
+ void CreateSurface ();
66
67
void CompileAllShaders () const ;
67
68
void FetchShaderInstances ();
68
69
void CreateSwapChain ();
@@ -104,8 +105,10 @@ void BaseTexApp::OnCreate()
104
105
RenderThread::Get ().Start ();
105
106
RenderWorkerThreads::Get ().Start ();
106
107
108
+ CreateDevice ();
109
+ CreateSurface ();
110
+
107
111
RenderThread::Get ().EmplaceTask ([this ]() -> void {
108
- CreateDevice ();
109
112
FetchShaderInstances ();
110
113
CreateSwapChain ();
111
114
CreateVertexAndIndexBuffer ();
@@ -210,6 +213,7 @@ void BaseTexApp::OnDestroy()
210
213
PipelineCache::Get (*device).Invalidate ();
211
214
BufferPool::Get (*device).Invalidate ();
212
215
TexturePool::Get (*device).Invalidate ();
216
+ ShaderMap::Get (*device).Invalidate ();
213
217
});
214
218
RenderThread::Get ().Flush ();
215
219
@@ -226,6 +230,11 @@ void BaseTexApp::CreateDevice()
226
230
.AddQueueRequest (QueueRequestInfo (QueueType::graphics, 1 )));
227
231
}
228
232
233
+ void BaseTexApp::CreateSurface ()
234
+ {
235
+ surface = device->CreateSurface (SurfaceCreateInfo (GetPlatformWindow ()));
236
+ }
237
+
229
238
void BaseTexApp::CompileAllShaders () const
230
239
{
231
240
ShaderCompileOptions options;
You can’t perform that action at this time.
0 commit comments