(self, vertex_shader, fragment_shader)
Compile shaders and create a program.
Compile shaders and create a program.
Compile shaders and create a program .
def __init__(self, vertex_shader, fragment_shader):
        """Compile shaders and create a program."""
        # add headers
        vertex_shader = GLVersion.version_header() + vertex_shader
        fragment_shader = GLVersion.version_header() + fragment_shader
        # set shader source
        self.vertex_shader = vertex_shader
        self.fragment_shader = fragment_shader
        # compile shaders
        self.compile()
        # create program
        self.program = self.create_program()
def __init__ ( self , vertex_shader , fragment_shader ) : # add headers vertex_shader = GLVersion . version_header ( ) + vertex_shader fragment_shader = GLVersion . version_header ( ) + fragment_shader # set shader source self . vertex_shader = vertex_shader self . fragment_shader = fragment_shader # compile shaders self . compile ( ) # create program self . program = self . create_program ( )