Code Duplication    Length = 16-16 lines in 2 locations

ed2d/texture.py 2 locations

@@ 105-120 (lines=16) @@
102
        super(HDRTexture, self).load_gl()
103
        self.program.set_uniform_array(self.texResID, [float(self.width), float(self.height)])
104
105
class Texture(BaseTexture):
106
107
    def __init__(self, path, program):
108
        super(Texture, self).__init__(program)
109
        self.path = path
110
111
        self.texFormat = gl.GL_RGBA
112
        self.pixelType = gl.GL_UNSIGNED_BYTE
113
114
        self.width, self.height, self.data = load_image(self.path)
115
116
        self.load_gl()
117
118
    def load_gl(self):
119
        super(Texture, self).load_gl()
120
        self.program.set_uniform_array(self.texResID, [float(self.width), float(self.height)])
121
122
123
class TextureAtlas(BaseTexture):
@@ 88-103 (lines=16) @@
85
        self.program.set_uniform(self.texSampID, self.texUnitID)
86
87
88
class HDRTexture(BaseTexture):
89
90
    def __init__(self, path, program):
91
        super(HDRTexture, self).__init__(program)
92
        self.path = path
93
94
        self.texFormat = gl.GL_RGBA16F
95
        self.pixelType = gl.GL_FLOAT
96
97
        self.width, self.height, self.data = load_image_hdr(self.path)
98
99
        self.load_gl()
100
101
    def load_gl(self):
102
        super(HDRTexture, self).load_gl()
103
        self.program.set_uniform_array(self.texResID, [float(self.width), float(self.height)])
104
105
class Texture(BaseTexture):
106