Viewクラス
２Dpolygon追加
3Dpolygon追加

カリングモード・デプステスト開始

テクスチャ貼り付けは未完成
テクスチャ待ち

テストコード今回のテストコード

using System;
using System.Collections.Generic;

using Sce.PlayStation.Core;
using Sce.PlayStation.Core.Environment;
using Sce.PlayStation.Core.Graphics;
using Sce.PlayStation.Core.Input;
using GMLIB;

namespace GAME
{
	public class AppMain
	{
		public static void Main (string[] args)
		{
			GM_Core core = GM_Core.GetInstance ();
			var graphics = GM_Graphic.GetInstance (new GraphicsContext ()).Context;
			GM_Input input = new GM_Input ();

			GM_Shader test_shader = new GM_Shader ("/Application/shaders/Shader2D.cgx", "TEST");
			GM_Shader test_shader3d = new GM_Shader ("/Application/shaders/Shader3D.cgx", "TEST3D");

			GM_2DPolygon test_polygon = new GM_2DPolygon ();
			var test_polygon3d = new GM_3DPolygon ();

			GM_Scene main_scene = new GM_Scene (
			new Functoin (delegate(){

				VertexBuffer vertexBuffer = new VertexBuffer (4, 6, VertexFormat.Float3, VertexFormat.Float2, VertexFormat.Float4);
				GM_Debug.Init (graphics);
				return 0;
			}),
			new Functoin (delegate(){
				GM_View.Getinstance().Update();
				return 0;
			}),
			new Functoin (delegate(){
				// Clear the screen
				if (input.GetTouchState (TouchStatus.Down, true)) {
					graphics.SetClearColor (0.0f, 1.0f, 0.0f, 0.0f);
				} else {
					graphics.SetClearColor (0.0f, 0.0f, 1.0f, 0.0f);
				}
				graphics.Clear ();

				GM_2DVertex [] v = new GM_2DVertex[4];
				v [0].pos = new Vector3(0.0f, 0.0f, 0.0f);
				v [0].color = new Vector4 (1000.0f, 0.0f, 0.0f, 1.0f);

				v [1].pos = new Vector3 (1000.0f, 0.0f, 0.0f);
				v [1].color = new Vector4 (0.0f, 1.0f, 0.0f, 1.0f);

				v [2].pos = new Vector3 (0.0f, 1000.0f, 0.0f);
				v [2].color = new Vector4 (0.0f, 0.0f, 1.0f, 1.0f);

				v [3].pos = new Vector3 (1000.0f, 1000.0f, 0.0f);
				v [3].color = new Vector4 (1.0f, 1.0f, 0.0f, 1.0f);

				test_polygon.Render( ref v , "TEST" );

				GM_3DVertex [] v3 = new GM_3DVertex[4];

				v3 [0].pos = new Vector3( -1.0f, 1.0f, 1.0f);
				v3 [0].color = new Vector4 (1.0f, 0.0f, 0.0f, 1.0f);

				v3 [1].pos = new Vector3 (1.0f, 1.0f, 1.0f);
				v3 [1].color = new Vector4 (0.0f, 1.0f, 0.0f, 1.0f);

				v3 [2].pos = new Vector3 (-1.0f, -1.0f, 1.0f);
				v3 [2].color = new Vector4 (0.0f, 0.0f, 1.0f, 1.0f);

				v3 [3].pos = new Vector3 (1.0f, -1.0f, 1.0f);
				v3 [3].color = new Vector4 (1.0f, 1.0f, 0.0f, 1.0f);

				test_polygon3d.RenderSprite(ref v3 , "TEST3D");

				GM_Debug.DrawText("aaaa" , 0xFFFFFFFF , 0, 10);
				// Present the screen
				graphics.SwapBuffers ();

				return 0;
			}),
			new Functoin (delegate(){
				return 0;
			}));

			core.Scene = main_scene;
			core.MainLoop ();
		}

	}
}