All pastes #612255 Raw Edit

Utility of Time

public text v1 · immutable
·published 2007-07-10 08:46 UTC
rendered paste body
        Dim hits As Integer = 0
        Dim view(4) As Integer
        Gl.glSelectBuffer(PickBox.Length - 1, PickBox)
        Gl.glGetIntegerv(Gl.GL_VIEWPORT, view)
        Gl.glRenderMode(Gl.GL_SELECT)
        Gl.glInitNames()
        Gl.glPushName(0)
        Gl.glMatrixMode(Gl.GL_PROJECTION)
        Gl.glPushMatrix()
        Gl.glLoadIdentity()
        Glu.gluPickMatrix(MouseX, SimpleOpenGlControl1.Height - MouseY, 1.0F, 1.0F, view)
        Glu.gluPerspective(60.0F, 1.0, 0.0001F, 1000.0F)
        Gl.glMatrixMode(Gl.GL_MODELVIEW)
        DrawBoxes()
        Gl.glMatrixMode(Gl.GL_PROJECTION)
        Gl.glPopMatrix()
        hits = Gl.glRenderMode(Gl.GL_RENDER)
        Label4.Text = hits
        If hits > 0 Then
            Dim choose As Integer = PickBox(3)
            Dim depth As Integer = PickBox(1)
            For a As Integer = 1 To hits
                If PickBox(a * 4 + 1) < depth Then
                    choose = PickBox(a * 4 + 3)
                    depth = PickBox(a * 4 + 1)
                End If
                ComboBox2.SelectedIndex = choose
            Next
        End If
        Gl.glMatrixMode(Gl.GL_MODELVIEW)