Example #1
0
        static Renderer CreateRenderer()
        {
            Renderer renderer;
            try
            {
                if (System.Diagnostics.Debugger.IsAttached)
                {
                    throw new Exception("For debugging purposes");
                }
                renderer = new DirectEngine();

            }
            catch (Exception er)
            {
                renderer = new GLRenderer();
            }
            renderer.defaultKeyboard.onKeyDown += new keyboardeventargs(defaultKeyboard_onKeyDown);
            renderer.defaultKeyboard.onKeyUp += new keyboardeventargs(defaultKeyboard_onKeyUp);

            renderer.cameraPosition.Z = -5;
            return renderer;
        }
 public GLWindow(GLRenderer renderer)
 {
     Title = "OpenGL application";
     WindowState = WindowState.Fullscreen;
     renderclass = renderer;
 }
Example #3
0
 public GlVertexNotSupportedBuffer(Vector3D[] vertices, Vector2D[] texcoords, Vector3D[] normals, GLRenderer nder)
 {
     verts = vertices;
     texc = texcoords;
     norms = normals;
     renderer = nder;
 }
Example #4
0
 public SetRenderTargetOperation(GLRenderer mder, GLTexture ite, Vector3D sp, Vector3D sr)
 {
     internrenderer = mder;
     itexture = ite;
     spos = sp;
     srot = sr;
 }
Example #5
0
 public GlVertexBuffer(Vector3D[] vertices, Vector2D[] _texcoords, Vector3D[] _normals, GLRenderer _rend)
 {
     renderer = _rend;
     verts = vertices;
     texcoords = _texcoords;
     normals = _normals;
     for (int i = 0; i < texcoords.Length; i++)
     {
         texcoords[i].Y *= -1;
     }
 }