public setEGLContextClientVersion ( int arg0 ) : void | ||
arg0 | int | |
Résultat | void |
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!"); }
// // 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"); }