質問編集履歴

2

まだまだエラーは止まりません

2020/04/25 14:06

投稿

MZK_0104
MZK_0104

スコア23

test CHANGED
File without changes
test CHANGED
@@ -94,7 +94,7 @@
94
94
 
95
95
  hwnd = CreateWindow(
96
96
 
97
- TEXT("WCN"), TEXT("東方紅魔郷"),
97
+ TEXT("WCN"), TEXT("Window"),
98
98
 
99
99
  WS_OVERLAPPEDWINDOW | WS_VISIBLE,
100
100
 

1

コードに少し変更が加わりました。具体的にはバックバッファを表示させるコードの追加です。

2020/04/25 14:06

投稿

MZK_0104
MZK_0104

スコア23

test CHANGED
File without changes
test CHANGED
@@ -44,8 +44,6 @@
44
44
 
45
45
 
46
46
 
47
-
48
-
49
47
  int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
50
48
 
51
49
  PSTR lpCmdLine, int nCmdShow) {
@@ -66,6 +64,8 @@
66
64
 
67
65
  IDirect3DDevice9* m_pD3DDevice = NULL;
68
66
 
67
+
68
+
69
69
 
70
70
 
71
71
  winc.style = CS_HREDRAW | CS_VREDRAW;
@@ -94,7 +94,7 @@
94
94
 
95
95
  hwnd = CreateWindow(
96
96
 
97
- TEXT("WCN"), TEXT("TestWindow"),
97
+ TEXT("WCN"), TEXT("東方紅魔郷"),
98
98
 
99
99
  WS_OVERLAPPEDWINDOW | WS_VISIBLE,
100
100
 
@@ -128,7 +128,7 @@
128
128
 
129
129
  if ((m_pD3D = ::Direct3DCreate9(D3D_SDK_VERSION)) == 0) {
130
130
 
131
- return E_FAIL;
131
+ return E_FAIL;//取得失敗
132
132
 
133
133
  }
134
134
 
@@ -136,7 +136,7 @@
136
136
 
137
137
  ZeroMemory(&m_D3DPP, sizeof(D3DPRESENT_PARAMETERS));
138
138
 
139
- m_D3DPP.BackBufferCount == 1;
139
+ m_D3DPP.BackBufferCount = 1;
140
140
 
141
141
  if (isFullScreen) {
142
142
 
@@ -192,9 +192,27 @@
192
192
 
193
193
  0))) {
194
194
 
195
- return;
195
+ return 0;
196
-
196
+
197
- }
197
+ }
198
+
199
+
200
+
201
+ if (SUCCEEDED(m_pD3DDevice->BeginScene())) {
202
+
203
+ m_pD3DDevice->EndScene();
204
+
205
+ }
206
+
207
+
208
+
209
+ if (FAILED(m_pD3DDevice->Present(0, 0, 0, 0))) {
210
+
211
+ m_pD3DDevice->Reset(&m_D3DPP);
212
+
213
+ }
214
+
215
+
198
216
 
199
217
  ShowWindow(hwnd,nCmdShow);
200
218