回答編集履歴
1
追記
test
CHANGED
@@ -245,3 +245,119 @@
|
|
245
245
|
}
|
246
246
|
|
247
247
|
```
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
### 追記
|
252
|
+
|
253
|
+
以下の様に修正してみて下さい。
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
```diff
|
258
|
+
|
259
|
+
public void CreateBuffer()
|
260
|
+
|
261
|
+
{
|
262
|
+
|
263
|
+
BackgroundColor = UIColor.Blue;
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
CGRect size = UIScreen.MainScreen.Bounds;
|
268
|
+
|
269
|
+
mWidth = (int)size.Width;
|
270
|
+
|
271
|
+
mHeight = (int)size.Height;
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
CAEAGLLayer layer = (CAEAGLLayer)Layer;
|
276
|
+
|
277
|
+
layer.Opaque = true;
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
// コンテキストの取得
|
282
|
+
|
283
|
+
mContext = new EAGLContext(EAGLRenderingAPI.OpenGLES1);
|
284
|
+
|
285
|
+
EAGLContext.SetCurrentContext(mContext);
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
GL.MatrixMode(All.Projection);
|
290
|
+
|
291
|
+
GL.LoadIdentity();
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
// ビューポートの設定
|
296
|
+
|
297
|
+
GL.Viewport(0, 0, mWidth, mHeight);
|
298
|
+
|
299
|
+
GL.Scale(1.0f, -1.0f, 1.0f); // Y軸を反転させる
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
GL.Enable((All)EnableCap.Texture2D);
|
304
|
+
|
305
|
+
GL.Enable((All)EnableCap.AlphaTest);
|
306
|
+
|
307
|
+
GL.Enable((All)EnableCap.Blend);
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
GL.EnableClientState(All.VertexArray);
|
312
|
+
|
313
|
+
GL.EnableClientState(All.TextureCoordArray);
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
// カリング処理の設定
|
318
|
+
|
319
|
+
GL.Disable((All)EnableCap.CullFace);
|
320
|
+
|
321
|
+
GL.FrontFace((All)FrontFaceDirection.Cw);
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
// 描画バッファの設定
|
326
|
+
|
327
|
+
GL.Oes.GenFramebuffers(1, out mFrameBuffer);
|
328
|
+
|
329
|
+
GL.Oes.BindFramebuffer(All.FramebufferOes, mFrameBuffer);
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
GL.Oes.GenRenderbuffers(1, out mRenderBuffer);
|
334
|
+
|
335
|
+
GL.Oes.BindRenderbuffer(All.RenderbufferOes, mRenderBuffer);
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
GL.Oes.GetRenderbufferParameter(All.RenderbufferOes, All.RenderbufferWidthOes, out mWidth);
|
340
|
+
|
341
|
+
GL.Oes.GetRenderbufferParameter(All.RenderbufferOes, All.RenderbufferHeightOes, out mHeight);
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
mContext.RenderBufferStorage((uint)All.RenderbufferOes, layer);
|
346
|
+
|
347
|
+
GL.Oes.FramebufferRenderbuffer(All.FramebufferOes, All.ColorAttachment0Oes, All.RenderbufferOes, mRenderBuffer);
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
- UIImage image = new UIImage("t_title_logo"); // "t_title_logo"はpngイメージ
|
352
|
+
|
353
|
+
+ UIImage image = UIImage.FromBundle("t_title_logo"); // "t_title_logo"はpngイメージ
|
354
|
+
|
355
|
+
UIImage[] ImageList = new UIImage[1];
|
356
|
+
|
357
|
+
ImageList[0] = image;
|
358
|
+
|
359
|
+
InitTexture(ImageList, 0, 1);
|
360
|
+
|
361
|
+
}
|
362
|
+
|
363
|
+
```
|