# Path: p5/core/p5.py



import pkgutil
import os
import builtins
from ..core import p5


def read_shader(filename):
    """Reads a shader in string mode and returns the content
    """
    renderer_name = ""
    if builtins.current_renderer == "vispy":
        if p5.mode == 'P2D':
            renderer_name = "Vispy2DRenderer"
        elif p5.mode == 'P3D':
            renderer_name = "Vispy3DRenderer"

    # This check could be skipped, it is only present to debug tests
    if renderer_name == "":
        raise ValueError("Renderer Name is not defined. \nValues : p5.mode = {} builtins.renderer = {}"

# Path: p5/core/p5.py



# Path: p5/sketch/util.py
import pkgutil
import os
import builtins
from ..core import p5



def read_shader(filename):
    """Reads a shader in string mode and returns the content
    """
    renderer_name = ""
    if builtins.current_renderer == "vispy":
        if p5.mode == 'P2D':
            renderer_name = "Vispy2DRenderer"
        elif p5.mode == 'P3D':
            renderer_name = "Vispy3DRenderer"

    # This check could be skipped, it is only present to debug tests
    if renderer_name == "":
        raise ValueError("Renderer Name is not defined. \nValues : p5.mode = {} builtins.renderer = {}"

                         .format(p5.mode, builtins.current_renderer))