public /* override */ void OnSurfaceCreated(GL10 pGL, EGLConfig pConfig) { Debug.D("onSurfaceCreated"); GLHelper.Reset(pGL); GLHelper.SetPerspectiveCorrectionHintFastest(pGL); // pGL.glEnable(GL10.GL_POLYGON_SMOOTH); // pGL.glHint(GL10.GL_POLYGON_SMOOTH_HINT, GL10.GL_NICEST); // pGL.glEnable(GL10.GL_LINE_SMOOTH); // pGL.glHint(GL10.GL_LINE_SMOOTH_HINT, GL10.GL_NICEST); // pGL.glEnable(GL10.GL_POINT_SMOOTH); // pGL.glHint(GL10.GL_POINT_SMOOTH_HINT, GL10.GL_NICEST); GLHelper.SetShadeModelFlat(pGL); GLHelper.DisableLightning(pGL); GLHelper.DisableDither(pGL); GLHelper.DisableDepthTest(pGL); GLHelper.DisableMultisample(pGL); GLHelper.EnableBlend(pGL); GLHelper.EnableTextures(pGL); GLHelper.EnableTexCoordArray(pGL); GLHelper.EnableVertexArray(pGL); GLHelper.EnableCulling(pGL); pGL.GlFrontFace(GL10Consts.GlCcw); pGL.GlCullFace(GL10Consts.GlBack); // GLHelper.EnableExtensions(pGL, this.mEngine.getEngineOptions().getRenderOptions()); GLHelper.EnableExtensions(pGL, this.mEngine.EngineOptions.RenderOptions); }
public void UnloadFromHardware(GL10 pGL) { GLHelper.EnableTextures(pGL); this.DeleteTextureOnHardware(pGL); this.mHardwareTextureID = -1; this.mLoadedToHardware = false; if (this.mTextureStateListener != null) { this.mTextureStateListener.OnUnloadedFromHardware(this); } }
public void LoadToHardware(GL10 pGL) { GLHelper.EnableTextures(pGL); this.mHardwareTextureID = Texture.GenerateHardwareTextureID(pGL); this.AllocateAndBindTextureOnHardware(pGL); this.ApplyTextureOptions(pGL); this.WriteTextureToHardware(pGL); this.mUpdateOnHardwareNeeded = false; this.mLoadedToHardware = true; if (this.mTextureStateListener != null) { this.mTextureStateListener.OnLoadedToHardware(this); } }
protected override void OnInitDraw(GL10 pGL) { base.OnInitDraw(pGL); GLHelper.EnableTextures(pGL); GLHelper.EnableTexCoordArray(pGL); }