Example #1
0
        void StartUp(Application.Application a_app)
        {
            NativeApplication appInternal = a_app.InternalApplication as NativeApplication;

            m_time = new PipelineTime();

            m_handle = Pipeline_new(a_app.Title, appInternal.Handle);
        }
Example #2
0
        void StartUp(OpenTKApplication a_app)
        {
#if DEBUG_INFO
            m_graphics = new GraphicsContext(GraphicsMode.Default, a_app.WindowInfo, 4, 5, GraphicsContextFlags.Debug);
#else
            m_graphics = new GraphicsContext(GraphicsMode.Default, a_app.WindowInfo, 4, 5, GraphicsContextFlags.Default);
#endif

            m_graphics.MakeCurrent(a_app.WindowInfo);

            m_graphics.LoadAll();
            GL.ClearColor(Color.FromArgb(255, 25, 25, 25));

            m_graphics.SwapInterval = 1;

            m_staticVAO = GL.GenVertexArray();
            m_staticVBO = GL.GenBuffer();
            m_staticIBO = GL.GenBuffer();

            GL.BindVertexArray(m_staticVAO);
            GL.BindBuffer(BufferTarget.ArrayBuffer, m_staticVBO);
            GL.BindBuffer(BufferTarget.ElementArrayBuffer, m_staticIBO);

            GL.Enable(EnableCap.DepthTest);

            GL.CullFace(CullFaceMode.Back);
            GL.Enable(EnableCap.CullFace);

            m_time = new PipelineTime();

            Shaders.InitShaders(m_pipeline);

#if DEBUG_INFO
            Pipeline.GLError("Pipeline: Startup: ");
#endif
        }