Наследование: android.view.SurfaceView, android.view.SurfaceHolder_Callback
        protected override void onCreate(global::android.os.Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);

            this.ToFullscreen();

            // Create a GLSurfaceView instance and set it
            // as the ContentView for this Activity
            mGLView = new HelloOpenGLES20SurfaceView(this);
            setContentView(mGLView);

            this.ShowToast("http://my.jsc-solutions.net x");
        }
Пример #2
0
        protected override void onCreate(global::android.os.Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            //this.ToFullscreen();

            mGLSurfaceView = new android.opengl.GLSurfaceView(this);


            // Request an OpenGL ES 2.0 compatible context.
            mGLSurfaceView.setEGLContextClientVersion(2);

            // Set the renderer to our demo renderer, defined below.
            mGLSurfaceView.setRenderer(new LessonTwoRenderer());


            setContentView(mGLSurfaceView);

            //this.ShowToast("http://my.jsc-solutions.net!");
        }
        protected override void onCreate(global::android.os.Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            //this.ToFullscreen();

            mGLSurfaceView = new android.opengl.GLSurfaceView(this);


            // Request an OpenGL ES 2.0 compatible context.
            mGLSurfaceView.setEGLContextClientVersion(2);

            // Set the renderer to our demo renderer, defined below.
            mGLSurfaceView.setRenderer(new LessonTwoRenderer());


            setContentView(mGLSurfaceView);

            //this.ShowToast("http://my.jsc-solutions.net!");
        }
Пример #4
0
        //
        // constructor
        //

        private Renderer(android.app.Activity activity, Action onChanged,
                         int redSize, int greenSize, int blueSize,
                         int alphaSize, int depthSize, int stencilSize,
                         int swapInterval, bool checkErrors)
        {
            waitObject        = new android.os.ConditionVariable();
            paused            = new java.util.concurrent.atomic.AtomicInteger();
            actionOnChanged   = onChanged;
            this.swapInterval = swapInterval;
            this.checkErrors  = checkErrors;

            activity.runOnUiThread(((java.lang.Runnable.Delegate)(() =>
            {
                surface = new android.opengl.GLSurfaceView(activity);
                surface.setEGLContextClientVersion(3); // OpenGL ES 3.0
                surface.setEGLConfigChooser(redSize, greenSize, blueSize,
                                            alphaSize, depthSize, stencilSize);
                surface.setPreserveEGLContextOnPause(true);
                surface.setRenderer(this);
                surface.setRenderMode(android.opengl.GLSurfaceView.RENDERMODE_WHEN_DIRTY);
                activity.setContentView(surface);
            })).AsInterface());

            // wait for one onDrawFrame callback, which tells us that
            // GLSurfaceView finished initializing the GL context
            if (!waitObject.block(8000))
            {
                throw new NoSuitableGraphicsDeviceException("cannot create GLSurfaceView");
            }

            var clientBounds = GameRunner.Singleton.ClientBounds;

            if (SurfaceWidth != clientBounds.Width || SurfaceHeight != clientBounds.Height)
            {
                // while not common, it is possible for the screen to rotate,
                // between the time the Window/GameRunner is created, and the
                // time the renderer is created.  we want to identify this.
                if (actionOnChanged != null)
                {
                    actionOnChanged();
                }
            }
        }
        protected override void onCreate(global::android.os.Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);



            glSurfaceView = new GLSurfaceView(this);

            // http://www.learnopengles.com/android-emulator-now-supports-native-opengl-es2-0/


            //we definitely want a GLES 2 context
            glSurfaceView.setEGLContextClientVersion(2);
            //and create our own renderer
            glSurfaceView.setRenderer(new Lesson01Renderer(this));

            setContentView(glSurfaceView);


            this.ShowToast("http://jsc-solutions.net");
        }
Пример #6
0
        protected override void onCreate(Bundle arg0)
        {
            base.onCreate (arg0);

            // create the 4 asteroid sizes
            for (int i = 0; i < myAsteroidMeshes.Length; i++)
            {
                Utilities.GenerateSphere(16 * (1 << i), 2, out myAsteroidMeshes[i].SpherePoints, out myAsteroidMeshes[i].SphereNormals, out myAsteroidMeshes[i].SphereIndices);
            }

            var surfaceView = new GLSurfaceView(this);
            surfaceView.setRenderer(this);
            setContentView(surfaceView);

            var sm = getSystemService(SENSOR_SERVICE) as SensorManager;
            sm.registerListener(this, sm.getSensorList(SensorManager.SENSOR_ORIENTATION).@get(0) as Sensor, SensorManager.SENSOR_DELAY_GAME);
        }
Пример #7
0
        public void setRenderer(GLSurfaceView.Renderer renderer)
        {

        }