private void OBJ_Load(object sender, EventArgs e) { this.simpleOpenGlControl1.InitializeContexts(); Gl.ReloadFunctions(); Gl.glEnable(32826); Gl.glEnable(2903); Gl.glEnable(2929); Gl.glEnable(2977); Gl.glDisable(2884); Gl.glFrontFace(2305); Gl.glEnable(3553); Gl.glClearDepth(1.0); Gl.glEnable(3008); Gl.glAlphaFunc(516, 0.0f); Gl.glEnable(3042); Gl.glBlendFunc(770, 771); Gl.glShadeModel(7425); Gl.glClearColor(0.2f, 0.2f, 0.2f, 1f); if (this.Mlt != null) { int Nr = 1; foreach (MLT.Material material in this.Mlt.Materials) { if (material.DiffuseMap != null) { GlNitro2.glNitroTexImage2D(material.DiffuseMap, Nr, 10497, 9728); } ++Nr; } } this.Render(); }
private void CGFX_Load(object sender, EventArgs e) { this.simpleOpenGlControl1.InitializeContexts(); Gl.ReloadFunctions(); Gl.glEnable(32826); Gl.glEnable(2903); Gl.glEnable(2929); Gl.glEnable(2977); Gl.glDisable(2884); Gl.glFrontFace(2305); Gl.glEnable(3553); Gl.glClearDepth(1.0); Gl.glEnable(3008); Gl.glAlphaFunc(516, 0.0f); Gl.glEnable(3042); Gl.glBlendFunc(770, 771); Gl.glShadeModel(7425); Gl.glDepthFunc(515); Gl.glClearColor(0.2f, 0.2f, 0.2f, 0.0f); if (this.cgfx.Data.Textures != null) { int Nr = 1; foreach (MKDS_Course_Modifier._3DS.CGFX.DATA.TXOB texture in this.cgfx.Data.Textures) { int WrapModeS = 10497; int WrapModeT = 10497; GlNitro2.glNitroTexImage2D(texture.GetBitmap(0), Nr, WrapModeS, WrapModeT, 9729, 9729); ++Nr; } } this.Shaders = new CGFXShader[this.cgfx.Data.Models[0].Materials.Length]; this.Render(); }
private void UploadCells() { for (int Index = 0; Index < (int)this.Cell.CellBankBlock.CellDataBank.numCells; ++Index) { GlNitro2.glNitroTexImage2D(this.Cell.CellBankBlock.CellDataBank.GetBitmap(Index, this.Graphic, this.Palette), Index + 1, 9728); } this.Render(false, new Point()); }
private void NSBTA_Load(object sender, EventArgs e) { for (int index1 = 0; index1 < (int)this.file.texSRTAnmSet.dict.numEntry; ++index1) { TreeNode treeNode = this.treeView1.Nodes.Add(this.file.texSRTAnmSet.dict[index1].Key); for (int index2 = 0; index2 < (int)this.file.texSRTAnmSet.texSRTAnm[index1].dict.numEntry; ++index2) { treeNode.Nodes.Add(this.file.texSRTAnmSet.texSRTAnm[index1].dict[index2].Key); } } Gl.glEnable(2903); Gl.glEnable(2929); Gl.glDepthFunc(519); Gl.glDisable(2884); Gl.glEnable(3553); Gl.glBlendFunc(770, 771); Gl.glEnable(3553); GlNitro2.glNitroTexImage2D(Resources.preview_background, 0, 10497); GlNitro2.glNitroTexImage2D(Resources.example, 1, 10497); this.Render((float[])null); }