Example usage for org.lwjgl.opengl GL12 GL_UNSIGNED_BYTE_3_3_2

List of usage examples for org.lwjgl.opengl GL12 GL_UNSIGNED_BYTE_3_3_2

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL12 GL_UNSIGNED_BYTE_3_3_2.

Prototype

int GL_UNSIGNED_BYTE_3_3_2

To view the source code for org.lwjgl.opengl GL12 GL_UNSIGNED_BYTE_3_3_2.

Click Source Link

Document

Accepted by the type parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, SeparableFilter3D, GetSeparableFilter, ColorTable, GetColorTable, TexImage4D, and TexSubImage4D.

Usage

From source file:com.ardor3d.scene.state.lwjgl.util.LwjglTextureUtil.java

License:Open Source License

public static int getGLPixelDataType(final PixelDataType type) {
    switch (type) {
    case Byte:
        return GL11.GL_BYTE;
    case Float:
        return GL11.GL_FLOAT;
    case HalfFloat:
        return ARBHalfFloatPixel.GL_HALF_FLOAT_ARB;
    case Short:
        return GL11.GL_SHORT;
    case UnsignedShort:
        return GL11.GL_UNSIGNED_SHORT;
    case Int:// w  w  w.j  a v  a 2  s. c  o  m
        return GL11.GL_INT;
    case UnsignedInt:
        return GL11.GL_UNSIGNED_INT;
    case UnsignedByte:
        return GL11.GL_UNSIGNED_BYTE;
    case UnsignedByte_3_3_2:
        return GL12.GL_UNSIGNED_BYTE_3_3_2;
    case UnsignedByte_2_3_3_Rev:
        return GL12.GL_UNSIGNED_BYTE_2_3_3_REV;
    case UnsignedShort_5_6_5:
        return GL12.GL_UNSIGNED_SHORT_5_6_5;
    case UnsignedShort_5_6_5_Rev:
        return GL12.GL_UNSIGNED_SHORT_5_6_5_REV;
    case UnsignedShort_4_4_4_4:
        return GL12.GL_UNSIGNED_SHORT_4_4_4_4;
    case UnsignedShort_4_4_4_4_Rev:
        return GL12.GL_UNSIGNED_SHORT_4_4_4_4_REV;
    case UnsignedShort_5_5_5_1:
        return GL12.GL_UNSIGNED_SHORT_5_5_5_1;
    case UnsignedShort_1_5_5_5_Rev:
        return GL12.GL_UNSIGNED_SHORT_1_5_5_5_REV;
    case UnsignedInt_8_8_8_8:
        return GL12.GL_UNSIGNED_INT_8_8_8_8;
    case UnsignedInt_8_8_8_8_Rev:
        return GL12.GL_UNSIGNED_INT_8_8_8_8_REV;
    case UnsignedInt_10_10_10_2:
        return GL12.GL_UNSIGNED_INT_10_10_10_2;
    case UnsignedInt_2_10_10_10_Rev:
        return GL12.GL_UNSIGNED_INT_2_10_10_10_REV;
    default:
        throw new Error("Unhandled type: " + type);
    }
}