Exemple #1
0
for suffix, arrayConstant in [
    ('b', constants.GL_BYTE),
    ('f', constants.GL_FLOAT),
    ('i', constants.GL_INT),
    ('s', constants.GL_SHORT),
    ('ub', constants.GL_UNSIGNED_BYTE),
    ('ui', constants.GL_UNSIGNED_INT),
    ('us', constants.GL_UNSIGNED_SHORT),
]:
    for functionName in (
            'glTexImage3D',
            'glTexSubImage3D',  # extension/1.2 standard
    ):
        functionName, function = images.typedImageFunction(
            suffix,
            arrayConstant,
            getattr(simple, functionName),
        )
        globals()[functionName] = function
        try:
            del function, functionName
        except NameError, err:
            pass
    try:
        del suffix, arrayConstant
    except NameError, err:
        pass

glTexImage3D = images.setDimensionsAsInts(
    images.setImageInput(
        simple.glTexImage3D,
Exemple #2
0
for suffix,arrayConstant in [
    ('b', constants.GL_BYTE),
    ('f', constants.GL_FLOAT),
    ('i', constants.GL_INT),
    ('s', constants.GL_SHORT),
    ('ub', constants.GL_UNSIGNED_BYTE),
    ('ui', constants.GL_UNSIGNED_INT),
    ('us', constants.GL_UNSIGNED_SHORT),
]:
    for functionName in (
        'glTexImage3D',
        'glTexSubImage3D', # extension/1.2 standard
    ):
        functionName, function = images.typedImageFunction(
            suffix, arrayConstant, getattr(_simple, functionName),
        )
        globals()[functionName] = function
        try:
            del function, functionName
        except NameError as err:
            pass
    try:
        del suffix,arrayConstant
    except NameError as err:
        pass

glTexImage3D = images.setDimensionsAsInts(
    images.setImageInput(
        _simple.glTexImage3D,
        typeName = 'type',