Last active
June 1, 2016 18:36
-
-
Save yilinwei/0caef21fcd51ae3318b9d3ef39189184 to your computer and use it in GitHub Desktop.
constants.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package iliad | |
package platform | |
package gl | |
package es3 | |
import Constant._ | |
//Constant is really useless? | |
sealed trait Constant | |
//TODO: This should definitely fall under GL package object! | |
object Constant { | |
sealed trait IntValue { | |
def toInt: Int | |
} | |
sealed trait Texture extends IntValue | |
sealed trait ColorAttachment extends IntValue with ColorBuffer | |
sealed trait DrawBuffer extends IntValue with Parameter with ColorOutputTarget { | |
def n: Int = this.toInt - Bounded[DrawBuffer].MaxValue.toInt | |
} | |
sealed trait Capability extends IntValue with Parameter | |
sealed trait ChannelBit extends IntValue | |
sealed trait BlitFilter extends IntValue | |
sealed trait ShaderType extends IntValue | |
sealed trait ShaderParameter extends IntValue | |
sealed trait TrueFalse extends IntValue | |
sealed trait BufferTarget extends IntValue | |
sealed trait BufferUsage extends IntValue | |
sealed trait VertexAttribType extends IntValue | |
sealed trait VertexAttribIType extends IntValue | |
sealed trait FramebufferTarget extends IntValue | |
sealed trait FramebufferStatus extends IntValue | |
sealed trait FramebufferAttachment extends IntValue | |
sealed trait FramebufferTexTarget extends IntValue | |
sealed trait RenderbufferInternalFormat extends IntValue | |
sealed trait TextureTarget extends IntValue | |
sealed trait TextureParameter extends IntValue | |
sealed trait TextureCompareMode extends IntValue | |
sealed trait TextureMinFilter extends IntValue | |
sealed trait TextureMagFilter extends IntValue | |
sealed trait TextureSwizzle extends IntValue | |
sealed trait TextureWrap extends IntValue | |
sealed trait TextureCompareFunc extends IntValue | |
sealed trait TextureInteralFormat extends IntValue | |
sealed trait TextureSizedInternalFormat extends TextureInteralFormat | |
sealed trait TextureUnsizedInternalFormat extends TextureInteralFormat | |
sealed trait TextureFormat extends IntValue | |
sealed trait TexturePixelType extends IntValue | |
sealed trait PixelStoreParameter extends IntValue with Parameter | |
sealed trait PrimitiveType extends IntValue | |
sealed trait IndexType extends IntValue | |
sealed trait Parameter extends IntValue | |
sealed trait SamplerParameter extends IntValue | |
sealed trait ColorOutputTarget extends IntValue | |
sealed trait Channel extends IntValue | |
sealed trait ColorBuffer extends IntValue | |
sealed trait BlendMode extends IntValue | |
sealed trait BlendFactor extends IntValue | |
sealed trait TextureCompressedFormat extends IntValue | |
sealed trait CullFaceMode extends IntValue | |
sealed trait DepthFunc extends IntValue | |
sealed trait BufferParameter extends IntValue | |
object DrawBuffer { | |
implicit val drawbufferBounded: Bounded[DrawBuffer] = new Bounded[DrawBuffer] { | |
val MinValue = GL_DRAW_BUFFER0 | |
val MaxValue = GL_DRAW_BUFFER15 | |
} | |
implicit val drawbufferEnum: Enum[DrawBuffer] = new Enum[DrawBuffer] { | |
def succ(dbuf: DrawBuffer): DrawBuffer = dbuf match { | |
case GL_DRAW_BUFFER0 => GL_DRAW_BUFFER1 | |
case GL_DRAW_BUFFER1 => GL_DRAW_BUFFER2 | |
case GL_DRAW_BUFFER2 => GL_DRAW_BUFFER3 | |
case GL_DRAW_BUFFER3 => GL_DRAW_BUFFER4 | |
case GL_DRAW_BUFFER4 => GL_DRAW_BUFFER5 | |
case GL_DRAW_BUFFER5 => GL_DRAW_BUFFER6 | |
case GL_DRAW_BUFFER6 => GL_DRAW_BUFFER7 | |
case GL_DRAW_BUFFER7 => GL_DRAW_BUFFER8 | |
case GL_DRAW_BUFFER8 => GL_DRAW_BUFFER9 | |
case GL_DRAW_BUFFER9 => GL_DRAW_BUFFER10 | |
case GL_DRAW_BUFFER10 => GL_DRAW_BUFFER11 | |
case GL_DRAW_BUFFER11 => GL_DRAW_BUFFER12 | |
case GL_DRAW_BUFFER12 => GL_DRAW_BUFFER13 | |
case GL_DRAW_BUFFER13 => GL_DRAW_BUFFER14 | |
case GL_DRAW_BUFFER14 => GL_DRAW_BUFFER15 | |
case GL_DRAW_BUFFER15 => GL_DRAW_BUFFER0 | |
} | |
def pred(dbuf: DrawBuffer): DrawBuffer = dbuf match { | |
case GL_DRAW_BUFFER0 => GL_DRAW_BUFFER15 | |
case GL_DRAW_BUFFER1 => GL_DRAW_BUFFER0 | |
case GL_DRAW_BUFFER2 => GL_DRAW_BUFFER1 | |
case GL_DRAW_BUFFER3 => GL_DRAW_BUFFER2 | |
case GL_DRAW_BUFFER4 => GL_DRAW_BUFFER3 | |
case GL_DRAW_BUFFER5 => GL_DRAW_BUFFER4 | |
case GL_DRAW_BUFFER6 => GL_DRAW_BUFFER5 | |
case GL_DRAW_BUFFER7 => GL_DRAW_BUFFER6 | |
case GL_DRAW_BUFFER8 => GL_DRAW_BUFFER7 | |
case GL_DRAW_BUFFER9 => GL_DRAW_BUFFER8 | |
case GL_DRAW_BUFFER10 => GL_DRAW_BUFFER9 | |
case GL_DRAW_BUFFER11 => GL_DRAW_BUFFER10 | |
case GL_DRAW_BUFFER12 => GL_DRAW_BUFFER11 | |
case GL_DRAW_BUFFER13 => GL_DRAW_BUFFER12 | |
case GL_DRAW_BUFFER14 => GL_DRAW_BUFFER13 | |
case GL_DRAW_BUFFER15 => GL_DRAW_BUFFER14 | |
} | |
} | |
} | |
} | |
sealed trait Error | |
/* | |
If we cannot map the returned integer to the known list of error codes, return | |
*/ | |
case class GL_UNKNOWN_INT(value: Int) extends Error | |
object Error { | |
def apply(code: Int): Error = GL_UNKNOWN_INT(code) | |
} | |
abstract class IntConstant(value: Int) extends IntValue { | |
def toInt: Int = value | |
} | |
abstract class BitmaskConstant(value: Int) { | |
def toInt: Int = value | |
} | |
abstract class LongConstant(value: Long) { | |
def toLong: Long = value | |
} | |
object ColorAttachment { | |
val colorAttachmentBounded = new Bounded[ColorAttachment] { | |
val MinValue = GL_COLOR_ATTACHMENT0 | |
val MaxValue = GL_COLOR_ATTACHMENT31 | |
} | |
val colorAttachmentEnum = new Enum[ColorAttachment] { | |
def succ(color: ColorAttachment): ColorAttachment = color match { | |
case GL_COLOR_ATTACHMENT0 => GL_COLOR_ATTACHMENT1 | |
case GL_COLOR_ATTACHMENT1 => GL_COLOR_ATTACHMENT2 | |
case GL_COLOR_ATTACHMENT2 => GL_COLOR_ATTACHMENT3 | |
case GL_COLOR_ATTACHMENT3 => GL_COLOR_ATTACHMENT4 | |
case GL_COLOR_ATTACHMENT4 => GL_COLOR_ATTACHMENT5 | |
case GL_COLOR_ATTACHMENT5 => GL_COLOR_ATTACHMENT6 | |
case GL_COLOR_ATTACHMENT6 => GL_COLOR_ATTACHMENT7 | |
case GL_COLOR_ATTACHMENT7 => GL_COLOR_ATTACHMENT8 | |
case GL_COLOR_ATTACHMENT8 => GL_COLOR_ATTACHMENT9 | |
case GL_COLOR_ATTACHMENT9 => GL_COLOR_ATTACHMENT10 | |
case GL_COLOR_ATTACHMENT10 => GL_COLOR_ATTACHMENT11 | |
case GL_COLOR_ATTACHMENT11 => GL_COLOR_ATTACHMENT12 | |
case GL_COLOR_ATTACHMENT12 => GL_COLOR_ATTACHMENT13 | |
case GL_COLOR_ATTACHMENT13 => GL_COLOR_ATTACHMENT14 | |
case GL_COLOR_ATTACHMENT14 => GL_COLOR_ATTACHMENT15 | |
case GL_COLOR_ATTACHMENT15 => GL_COLOR_ATTACHMENT16 | |
case GL_COLOR_ATTACHMENT16 => GL_COLOR_ATTACHMENT17 | |
case GL_COLOR_ATTACHMENT17 => GL_COLOR_ATTACHMENT18 | |
case GL_COLOR_ATTACHMENT18 => GL_COLOR_ATTACHMENT19 | |
case GL_COLOR_ATTACHMENT19 => GL_COLOR_ATTACHMENT20 | |
case GL_COLOR_ATTACHMENT20 => GL_COLOR_ATTACHMENT21 | |
case GL_COLOR_ATTACHMENT21 => GL_COLOR_ATTACHMENT22 | |
case GL_COLOR_ATTACHMENT22 => GL_COLOR_ATTACHMENT23 | |
case GL_COLOR_ATTACHMENT23 => GL_COLOR_ATTACHMENT24 | |
case GL_COLOR_ATTACHMENT24 => GL_COLOR_ATTACHMENT25 | |
case GL_COLOR_ATTACHMENT25 => GL_COLOR_ATTACHMENT26 | |
case GL_COLOR_ATTACHMENT26 => GL_COLOR_ATTACHMENT27 | |
case GL_COLOR_ATTACHMENT27 => GL_COLOR_ATTACHMENT28 | |
case GL_COLOR_ATTACHMENT28 => GL_COLOR_ATTACHMENT29 | |
case GL_COLOR_ATTACHMENT29 => GL_COLOR_ATTACHMENT30 | |
case GL_COLOR_ATTACHMENT30 => GL_COLOR_ATTACHMENT31 | |
case GL_COLOR_ATTACHMENT31 => GL_COLOR_ATTACHMENT0 | |
} | |
def pred(color: ColorAttachment): ColorAttachment = color match { | |
case GL_COLOR_ATTACHMENT0 => GL_COLOR_ATTACHMENT31 | |
case GL_COLOR_ATTACHMENT1 => GL_COLOR_ATTACHMENT0 | |
case GL_COLOR_ATTACHMENT2 => GL_COLOR_ATTACHMENT1 | |
case GL_COLOR_ATTACHMENT3 => GL_COLOR_ATTACHMENT2 | |
case GL_COLOR_ATTACHMENT4 => GL_COLOR_ATTACHMENT3 | |
case GL_COLOR_ATTACHMENT5 => GL_COLOR_ATTACHMENT4 | |
case GL_COLOR_ATTACHMENT6 => GL_COLOR_ATTACHMENT5 | |
case GL_COLOR_ATTACHMENT7 => GL_COLOR_ATTACHMENT6 | |
case GL_COLOR_ATTACHMENT8 => GL_COLOR_ATTACHMENT7 | |
case GL_COLOR_ATTACHMENT9 => GL_COLOR_ATTACHMENT8 | |
case GL_COLOR_ATTACHMENT10 => GL_COLOR_ATTACHMENT9 | |
case GL_COLOR_ATTACHMENT11 => GL_COLOR_ATTACHMENT10 | |
case GL_COLOR_ATTACHMENT12 => GL_COLOR_ATTACHMENT11 | |
case GL_COLOR_ATTACHMENT13 => GL_COLOR_ATTACHMENT12 | |
case GL_COLOR_ATTACHMENT14 => GL_COLOR_ATTACHMENT13 | |
case GL_COLOR_ATTACHMENT15 => GL_COLOR_ATTACHMENT14 | |
case GL_COLOR_ATTACHMENT16 => GL_COLOR_ATTACHMENT15 | |
case GL_COLOR_ATTACHMENT17 => GL_COLOR_ATTACHMENT16 | |
case GL_COLOR_ATTACHMENT18 => GL_COLOR_ATTACHMENT17 | |
case GL_COLOR_ATTACHMENT19 => GL_COLOR_ATTACHMENT18 | |
case GL_COLOR_ATTACHMENT20 => GL_COLOR_ATTACHMENT19 | |
case GL_COLOR_ATTACHMENT21 => GL_COLOR_ATTACHMENT20 | |
case GL_COLOR_ATTACHMENT22 => GL_COLOR_ATTACHMENT21 | |
case GL_COLOR_ATTACHMENT23 => GL_COLOR_ATTACHMENT22 | |
case GL_COLOR_ATTACHMENT24 => GL_COLOR_ATTACHMENT23 | |
case GL_COLOR_ATTACHMENT25 => GL_COLOR_ATTACHMENT24 | |
case GL_COLOR_ATTACHMENT26 => GL_COLOR_ATTACHMENT25 | |
case GL_COLOR_ATTACHMENT27 => GL_COLOR_ATTACHMENT26 | |
case GL_COLOR_ATTACHMENT28 => GL_COLOR_ATTACHMENT27 | |
case GL_COLOR_ATTACHMENT29 => GL_COLOR_ATTACHMENT28 | |
case GL_COLOR_ATTACHMENT30 => GL_COLOR_ATTACHMENT29 | |
case GL_COLOR_ATTACHMENT31 => GL_COLOR_ATTACHMENT30 | |
} | |
} | |
} | |
object Texture { | |
val textureBounded = new Bounded[Texture] { | |
val MinValue = GL_TEXTURE0 | |
val MaxValue = GL_TEXTURE31 | |
} | |
val textureEnum = new Enum[Texture] { | |
def succ(tex: Texture): Texture = tex match { | |
case GL_TEXTURE0 => GL_TEXTURE1 | |
case GL_TEXTURE1 => GL_TEXTURE2 | |
case GL_TEXTURE2 => GL_TEXTURE3 | |
case GL_TEXTURE3 => GL_TEXTURE4 | |
case GL_TEXTURE4 => GL_TEXTURE5 | |
case GL_TEXTURE5 => GL_TEXTURE6 | |
case GL_TEXTURE6 => GL_TEXTURE7 | |
case GL_TEXTURE7 => GL_TEXTURE8 | |
case GL_TEXTURE8 => GL_TEXTURE9 | |
case GL_TEXTURE9 => GL_TEXTURE10 | |
case GL_TEXTURE10 => GL_TEXTURE11 | |
case GL_TEXTURE11 => GL_TEXTURE12 | |
case GL_TEXTURE12 => GL_TEXTURE13 | |
case GL_TEXTURE13 => GL_TEXTURE14 | |
case GL_TEXTURE14 => GL_TEXTURE15 | |
case GL_TEXTURE15 => GL_TEXTURE16 | |
case GL_TEXTURE16 => GL_TEXTURE17 | |
case GL_TEXTURE17 => GL_TEXTURE18 | |
case GL_TEXTURE18 => GL_TEXTURE19 | |
case GL_TEXTURE19 => GL_TEXTURE20 | |
case GL_TEXTURE20 => GL_TEXTURE21 | |
case GL_TEXTURE21 => GL_TEXTURE22 | |
case GL_TEXTURE22 => GL_TEXTURE23 | |
case GL_TEXTURE23 => GL_TEXTURE24 | |
case GL_TEXTURE24 => GL_TEXTURE25 | |
case GL_TEXTURE25 => GL_TEXTURE26 | |
case GL_TEXTURE26 => GL_TEXTURE27 | |
case GL_TEXTURE27 => GL_TEXTURE28 | |
case GL_TEXTURE28 => GL_TEXTURE29 | |
case GL_TEXTURE29 => GL_TEXTURE30 | |
case GL_TEXTURE30 => GL_TEXTURE31 | |
case GL_TEXTURE31 => GL_TEXTURE0 | |
} | |
def pred(tex: Texture): Texture = tex match { | |
case GL_TEXTURE0 => GL_TEXTURE31 | |
case GL_TEXTURE1 => GL_TEXTURE0 | |
case GL_TEXTURE2 => GL_TEXTURE1 | |
case GL_TEXTURE3 => GL_TEXTURE2 | |
case GL_TEXTURE4 => GL_TEXTURE3 | |
case GL_TEXTURE5 => GL_TEXTURE4 | |
case GL_TEXTURE6 => GL_TEXTURE5 | |
case GL_TEXTURE7 => GL_TEXTURE6 | |
case GL_TEXTURE8 => GL_TEXTURE7 | |
case GL_TEXTURE9 => GL_TEXTURE8 | |
case GL_TEXTURE10 => GL_TEXTURE9 | |
case GL_TEXTURE11 => GL_TEXTURE10 | |
case GL_TEXTURE12 => GL_TEXTURE11 | |
case GL_TEXTURE13 => GL_TEXTURE12 | |
case GL_TEXTURE14 => GL_TEXTURE13 | |
case GL_TEXTURE15 => GL_TEXTURE14 | |
case GL_TEXTURE16 => GL_TEXTURE15 | |
case GL_TEXTURE17 => GL_TEXTURE16 | |
case GL_TEXTURE18 => GL_TEXTURE17 | |
case GL_TEXTURE19 => GL_TEXTURE18 | |
case GL_TEXTURE20 => GL_TEXTURE19 | |
case GL_TEXTURE21 => GL_TEXTURE20 | |
case GL_TEXTURE22 => GL_TEXTURE21 | |
case GL_TEXTURE23 => GL_TEXTURE22 | |
case GL_TEXTURE24 => GL_TEXTURE23 | |
case GL_TEXTURE25 => GL_TEXTURE24 | |
case GL_TEXTURE26 => GL_TEXTURE25 | |
case GL_TEXTURE27 => GL_TEXTURE26 | |
case GL_TEXTURE28 => GL_TEXTURE27 | |
case GL_TEXTURE29 => GL_TEXTURE28 | |
case GL_TEXTURE30 => GL_TEXTURE29 | |
case GL_TEXTURE31 => GL_TEXTURE30 | |
} | |
} | |
} | |
sealed trait ChannelBitMask { self => | |
def toInt: Int = self match { | |
case ChannelBitMask.BitMask(each) => each.foldLeft(0)(_.toInt | _.toInt) | |
case ChannelBitMask.Empty => 0 | |
} | |
} | |
object ChannelBitMask { | |
implicit def bitToMask(bit: ChannelBit): ChannelBitMask = BitMask(Set(bit)) | |
case object Empty extends ChannelBitMask | |
case class BitMask(each: Set[ChannelBit]) extends ChannelBitMask { | |
override def toString = { | |
val mask = each.foldLeft("")((b, a) => s"$b | $a") | |
s"($mask)" | |
} | |
} | |
} | |
case object GL_DEPTH_BUFFER_BIT extends BitmaskConstant(0x00000100) with ChannelBit | |
case object GL_STENCIL_BUFFER_BIT extends BitmaskConstant(0x00000400) with ChannelBit | |
case object GL_COLOR_BUFFER_BIT extends BitmaskConstant(0x00004000) with ChannelBit | |
case object GL_FALSE extends IntConstant(0) with TrueFalse | |
case object GL_TRUE extends IntConstant(1) with TrueFalse | |
case object GL_POINTS extends IntConstant(0x0000) with PrimitiveType | |
case object GL_LINES extends IntConstant(0x0001) with PrimitiveType | |
case object GL_LINE_LOOP extends IntConstant(0x0002) with PrimitiveType | |
case object GL_LINE_STRIP extends IntConstant(0x0003) with PrimitiveType | |
case object GL_TRIANGLES extends IntConstant(0x0004) with PrimitiveType | |
case object GL_TRIANGLE_FAN extends IntConstant(0x0005) with PrimitiveType | |
case object GL_ZERO extends IntConstant(0) with TextureSwizzle with BlendFactor | |
case object GL_ONE extends IntConstant(1) with TextureSwizzle with BlendFactor | |
case object GL_SRC_COLOR extends IntConstant(0x0300) with BlendFactor | |
case object GL_ONE_MINUS_SRC_COLOR extends IntConstant(0x0301) with BlendFactor | |
case object GL_SRC_ALPHA extends IntConstant(0x0302) with BlendFactor | |
case object GL_ONE_MINUS_SRC_ALPHA extends IntConstant(0x0303) with BlendFactor | |
case object GL_DST_ALPHA extends IntConstant(0x0304) with BlendFactor | |
case object GL_ONE_MINUS_DST_ALPHA extends IntConstant(0x0305) with BlendFactor | |
case object GL_DST_COLOR extends IntConstant(0x0306) with BlendFactor | |
case object GL_ONE_MINUS_DST_COLOR extends IntConstant(0x0307) with BlendFactor | |
case object GL_SRC_ALPHA_SATURATE extends IntConstant(0x0308) with BlendFactor | |
case object GL_FUNC_ADD extends IntConstant(0x8006) with BlendMode | |
case object GL_BLEND_EQUATION extends IntConstant(0x8009) with Constant | |
case object GL_BLEND_EQUATION_RGB extends IntConstant(0x8009) with Parameter | |
case object GL_BLEND_EQUATION_ALPHA extends IntConstant(0x883D) with Parameter | |
case object GL_FUNC_SUBTRACT extends IntConstant(0x800A) with BlendMode | |
case object GL_FUNC_REVERSE_SUBTRACT extends IntConstant(0x800B) with BlendMode | |
case object GL_BLEND_DST_RGB extends IntConstant(0x80C8) with Constant | |
case object GL_BLEND_SRC_RGB extends IntConstant(0x80C9) with Parameter | |
case object GL_BLEND_DST_ALPHA extends IntConstant(0x80CA) with Parameter | |
case object GL_BLEND_SRC_ALPHA extends IntConstant(0x80CB) with Parameter | |
case object GL_CONSTANT_COLOR extends IntConstant(0x8001) with Constant | |
case object GL_ONE_MINUS_CONSTANT_COLOR extends IntConstant(0x8002) with Constant | |
case object GL_CONSTANT_ALPHA extends IntConstant(0x8003) with Constant | |
case object GL_ONE_MINUS_CONSTANT_ALPHA extends IntConstant(0x8004) with Constant | |
case object GL_BLEND_COLOR extends IntConstant(0x8005) with Constant | |
case object GL_ARRAY_BUFFER extends IntConstant(0x8892) with BufferTarget | |
case object GL_ELEMENT_ARRAY_BUFFER extends IntConstant(0x8893) with BufferTarget | |
case object GL_ARRAY_BUFFER_BINDING extends IntConstant(0x8894) with Parameter | |
case object GL_ELEMENT_ARRAY_BUFFER_BINDING extends IntConstant(0x8895) with Parameter | |
case object GL_STREAM_DRAW extends IntConstant(0x88E0) with BufferUsage | |
case object GL_STATIC_DRAW extends IntConstant(0x88E4) with BufferUsage | |
case object GL_DYNAMIC_DRAW extends IntConstant(0x88E8) with BufferUsage | |
case object GL_BUFFER_SIZE extends IntConstant(0x8764) with BufferParameter | |
case object GL_BUFFER_USAGE extends IntConstant(0x8765) with BufferParameter | |
case object GL_CURRENT_VERTEX_ATTRIB extends IntConstant(0x8626) with Constant | |
case object GL_FRONT extends IntConstant(0x0404) with CullFaceMode | |
case object GL_BACK extends IntConstant(0x0405) with ColorOutputTarget with ColorBuffer with CullFaceMode | |
case object GL_FRONT_AND_BACK extends IntConstant(0x0408) with CullFaceMode | |
case object GL_TEXTURE_2D extends IntConstant(0x0DE1) with FramebufferTexTarget with TextureTarget | |
case object GL_CULL_FACE extends IntConstant(0x0B44) with Capability | |
case object GL_BLEND extends IntConstant(0x0BE2) with Capability | |
case object GL_DITHER extends IntConstant(0x0BD0) with Capability | |
case object GL_STENCIL_TEST extends IntConstant(0x0B90) with Capability | |
case object GL_DEPTH_TEST extends IntConstant(0x0B71) with Capability | |
case object GL_SCISSOR_TEST extends IntConstant(0x0C11) with Capability | |
case object GL_POLYGON_OFFSET_FILL extends IntConstant(0x8037) with Capability | |
case object GL_SAMPLE_ALPHA_TO_COVERAGE extends IntConstant(0x809E) with Capability | |
case object GL_SAMPLE_COVERAGE extends IntConstant(0x80A0) with Capability | |
case object GL_NO_ERROR extends IntConstant(0) with Constant | |
case object GL_INVALID_ENUM extends IntConstant(0x0500) with Constant | |
case object GL_INVALID_VALUE extends IntConstant(0x0501) with Constant | |
case object GL_INVALID_OPERATION extends IntConstant(0x0502) with Constant | |
case object GL_OUT_OF_MEMORY extends IntConstant(0x0505) with Constant | |
case object GL_CW extends IntConstant(0x0900) with Constant | |
case object GL_CCW extends IntConstant(0x0901) with Constant | |
case object GL_LINE_WIDTH extends IntConstant(0x0B21) with Parameter | |
case object GL_ALIASED_POINT_SIZE_RANGE extends IntConstant(0x846D) with Parameter | |
case object GL_ALIASED_LINE_WIDTH_RANGE extends IntConstant(0x846E) with Parameter | |
case object GL_CULL_FACE_MODE extends IntConstant(0x0B45) with Parameter | |
case object GL_FRONT_FACE extends IntConstant(0x0B46) with Parameter | |
case object GL_DEPTH_RANGE extends IntConstant(0x0B70) with Parameter | |
case object GL_DEPTH_WRITEMASK extends IntConstant(0x0B72) with Parameter | |
case object GL_DEPTH_CLEAR_VALUE extends IntConstant(0x0B73) with Parameter | |
case object GL_DEPTH_FUNC extends IntConstant(0x0B74) with Parameter | |
case object GL_STENCIL_CLEAR_VALUE extends IntConstant(0x0B91) with Constant | |
case object GL_STENCIL_FUNC extends IntConstant(0x0B92) with Parameter | |
case object GL_STENCIL_FAIL extends IntConstant(0x0B94) with Constant | |
case object GL_STENCIL_PASS_DEPTH_FAIL extends IntConstant(0x0B95) with Parameter | |
case object GL_STENCIL_PASS_DEPTH_PASS extends IntConstant(0x0B96) with Parameter | |
case object GL_STENCIL_REF extends IntConstant(0x0B97) with Parameter | |
case object GL_STENCIL_VALUE_MASK extends IntConstant(0x0B93) with Parameter | |
case object GL_STENCIL_WRITEMASK extends IntConstant(0x0B98) with Parameter | |
case object GL_STENCIL_BACK_FUNC extends IntConstant(0x8800) with Parameter | |
case object GL_STENCIL_BACK_FAIL extends IntConstant(0x8801) with Parameter | |
case object GL_STENCIL_BACK_PASS_DEPTH_FAIL extends IntConstant(0x8802) with Parameter | |
case object GL_STENCIL_BACK_PASS_DEPTH_PASS extends IntConstant(0x8803) with Parameter | |
case object GL_STENCIL_BACK_REF extends IntConstant(0x8CA3) with Parameter | |
case object GL_STENCIL_BACK_VALUE_MASK extends IntConstant(0x8CA4) with Parameter | |
case object GL_STENCIL_BACK_WRITEMASK extends IntConstant(0x8CA5) with Parameter | |
case object GL_VIEWPORT extends IntConstant(0x0BA2) with Parameter | |
case object GL_SCISSOR_BOX extends IntConstant(0x0C10) with Parameter | |
case object GL_COLOR_CLEAR_VALUE extends IntConstant(0x0C22) with Parameter | |
case object GL_COLOR_WRITEMASK extends IntConstant(0x0C23) with Parameter | |
case object GL_UNPACK_ALIGNMENT extends IntConstant(0x0CF5) with PixelStoreParameter | |
case object GL_PACK_ALIGNMENT extends IntConstant(0x0D05) with PixelStoreParameter | |
case object GL_MAX_TEXTURE_SIZE extends IntConstant(0x0D33) with Parameter | |
case object GL_MAX_VIEWPORT_DIMS extends IntConstant(0x0D3A) with Parameter | |
case object GL_SUBPIXEL_BITS extends IntConstant(0x0D50) with Parameter | |
case object GL_RED_BITS extends IntConstant(0x0D52) with Parameter | |
case object GL_GREEN_BITS extends IntConstant(0x0D53) with Parameter | |
case object GL_BLUE_BITS extends IntConstant(0x0D54) with Constant | |
case object GL_ALPHA_BITS extends IntConstant(0x0D55) with Parameter | |
case object GL_DEPTH_BITS extends IntConstant(0x0D56) with Parameter | |
case object GL_STENCIL_BITS extends IntConstant(0x0D57) with Parameter | |
case object GL_POLYGON_OFFSET_UNITS extends IntConstant(0x2A00) with Parameter | |
case object GL_POLYGON_OFFSET_FACTOR extends IntConstant(0x8038) with Parameter | |
case object GL_TEXTURE_BINDING_2D extends IntConstant(0x8069) with Parameter | |
case object GL_SAMPLE_BUFFERS extends IntConstant(0x80A8) with Parameter | |
case object GL_SAMPLES extends IntConstant(0x80A9) with Parameter | |
case object GL_SAMPLE_COVERAGE_VALUE extends IntConstant(0x80AA) with Parameter | |
case object GL_SAMPLE_COVERAGE_INVERT extends IntConstant(0x80AB) with Parameter | |
case object GL_NUM_COMPRESSED_TEXTURE_FORMATS extends IntConstant(0x86A2) with Parameter | |
case object GL_COMPRESSED_TEXTURE_FORMATS extends IntConstant(0x86A3) with Parameter | |
case object GL_DONT_CARE extends IntConstant(0x1100) with Constant | |
case object GL_FASTEST extends IntConstant(0x1101) with Constant | |
case object GL_NICEST extends IntConstant(0x1102) with Constant | |
case object GL_GENERATE_MIPMAP_HINT extends IntConstant(0x8192) with Parameter | |
case object GL_BYTE extends IntConstant(0x1400) with VertexAttribType with VertexAttribIType with TexturePixelType with IndexType | |
case object GL_UNSIGNED_BYTE extends IntConstant(0x1401) with VertexAttribType with VertexAttribIType with TexturePixelType | |
case object GL_SHORT extends IntConstant(0x1402) with VertexAttribType with VertexAttribIType with TexturePixelType | |
case object GL_UNSIGNED_SHORT extends IntConstant(0x1403) with VertexAttribType with VertexAttribIType with TexturePixelType with IndexType | |
case object GL_INT extends IntConstant(0x1404) with VertexAttribType with VertexAttribIType with TexturePixelType | |
case object GL_UNSIGNED_INT extends IntConstant(0x1405) with VertexAttribType with VertexAttribIType with TexturePixelType with IndexType | |
case object GL_FLOAT extends IntConstant(0x1406) with VertexAttribType with TexturePixelType | |
case object GL_FIXED extends IntConstant(0x140C) with VertexAttribType | |
case object GL_DEPTH_COMPONENT extends IntConstant(0x1902) with TextureFormat | |
case object GL_ALPHA extends IntConstant(0x1906) with TextureSwizzle with TextureFormat | |
case object GL_RGB extends IntConstant(0x1907) with TextureFormat with TextureUnsizedInternalFormat | |
case object GL_RGBA extends IntConstant(0x1908) with TextureFormat with TextureUnsizedInternalFormat | |
case object GL_LUMINANCE extends IntConstant(0x1909) with TextureFormat with TextureUnsizedInternalFormat | |
case object GL_LUMINANCE_ALPHA extends IntConstant(0x190A) with TextureFormat with TextureUnsizedInternalFormat | |
case object GL_UNSIGNED_SHORT_4_4_4_4 extends IntConstant(0x8033) with TexturePixelType | |
case object GL_UNSIGNED_SHORT_5_5_5_1 extends IntConstant(0x8034) with TexturePixelType | |
case object GL_UNSIGNED_SHORT_5_6_5 extends IntConstant(0x8363) with TexturePixelType | |
case object GL_FRAGMENT_SHADER extends IntConstant(0x8B30) with ShaderType | |
case object GL_VERTEX_SHADER extends IntConstant(0x8B31) with ShaderType | |
case object GL_MAX_VERTEX_ATTRIBS extends IntConstant(0x8869) with Parameter | |
case object GL_MAX_VERTEX_UNIFORM_VECTORS extends IntConstant(0x8DFB) with Parameter | |
case object GL_MAX_VARYING_VECTORS extends IntConstant(0x8DFC) with Parameter | |
case object GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS extends IntConstant(0x8B4D) with Parameter | |
case object GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS extends IntConstant(0x8B4C) with Parameter | |
case object GL_MAX_TEXTURE_IMAGE_UNITS extends IntConstant(0x8872) with Constant | |
case object GL_MAX_FRAGMENT_UNIFORM_VECTORS extends IntConstant(0x8DFD) with Parameter | |
case object GL_SHADER_TYPE extends IntConstant(0x8B4F) with ShaderParameter | |
case object GL_DELETE_STATUS extends IntConstant(0x8B80) with ShaderParameter | |
case object GL_LINK_STATUS extends IntConstant(0x8B82) with Constant | |
case object GL_VALIDATE_STATUS extends IntConstant(0x8B83) with Constant | |
case object GL_ATTACHED_SHADERS extends IntConstant(0x8B85) with Constant | |
case object GL_ACTIVE_UNIFORMS extends IntConstant(0x8B86) with Constant | |
case object GL_ACTIVE_UNIFORM_MAX_LENGTH extends IntConstant(0x8B87) with Constant | |
case object GL_ACTIVE_ATTRIBUTES extends IntConstant(0x8B89) with Constant | |
case object GL_ACTIVE_ATTRIBUTE_MAX_LENGTH extends IntConstant(0x8B8A) with Constant | |
case object GL_SHADING_LANGUAGE_VERSION extends IntConstant(0x8B8C) with Constant | |
case object GL_CURRENT_PROGRAM extends IntConstant(0x8B8D) with Parameter | |
case object GL_NEVER extends IntConstant(0x0200) with TextureCompareFunc with DepthFunc | |
case object GL_LESS extends IntConstant(0x0201) with TextureCompareFunc with DepthFunc | |
case object GL_EQUAL extends IntConstant(0x0202) with TextureCompareFunc with DepthFunc | |
case object GL_LEQUAL extends IntConstant(0x0203) with TextureCompareFunc with DepthFunc | |
case object GL_GREATER extends IntConstant(0x0204) with TextureCompareFunc with DepthFunc | |
case object GL_NOTEQUAL extends IntConstant(0x0205) with TextureCompareFunc with DepthFunc | |
case object GL_GEQUAL extends IntConstant(0x0206) with TextureCompareFunc with DepthFunc | |
case object GL_ALWAYS extends IntConstant(0x0207) with TextureCompareFunc with DepthFunc | |
case object GL_KEEP extends IntConstant(0x1E00) with Constant | |
case object GL_REPLACE extends IntConstant(0x1E01) with Constant | |
case object GL_INCR extends IntConstant(0x1E02) with Constant | |
case object GL_DECR extends IntConstant(0x1E03) with Constant | |
case object GL_INVERT extends IntConstant(0x150A) with Constant | |
case object GL_INCR_WRAP extends IntConstant(0x8507) with Constant | |
case object GL_DECR_WRAP extends IntConstant(0x8508) with Constant | |
case object GL_VENDOR extends IntConstant(0x1F00) with Constant | |
case object GL_RENDERER extends IntConstant(0x1F01) with Constant | |
case object GL_VERSION extends IntConstant(0x1F02) with Constant | |
case object GL_EXTENSIONS extends IntConstant(0x1F03) with Constant | |
case object GL_NEAREST extends IntConstant(0x2600) with BlitFilter with TextureMinFilter with TextureMagFilter | |
case object GL_LINEAR extends IntConstant(0x2601) with BlitFilter with TextureMinFilter with TextureMagFilter | |
case object GL_NEAREST_MIPMAP_NEAREST extends IntConstant(0x2700) with TextureMinFilter | |
case object GL_LINEAR_MIPMAP_NEAREST extends IntConstant(0x2701) with TextureMinFilter | |
case object GL_NEAREST_MIPMAP_LINEAR extends IntConstant(0x2702) with TextureMinFilter | |
case object GL_LINEAR_MIPMAP_LINEAR extends IntConstant(0x2703) with TextureMinFilter | |
case object GL_TEXTURE_MAG_FILTER extends IntConstant(0x2800) with TextureParameter with SamplerParameter | |
case object GL_TEXTURE_MIN_FILTER extends IntConstant(0x2801) with TextureParameter with SamplerParameter | |
case object GL_TEXTURE_WRAP_S extends IntConstant(0x2802) with TextureParameter with SamplerParameter | |
case object GL_TEXTURE_WRAP_T extends IntConstant(0x2803) with TextureParameter with SamplerParameter | |
case object GL_TEXTURE extends IntConstant(0x1702) with Constant | |
case object GL_TEXTURE_CUBE_MAP extends IntConstant(0x8513) with TextureTarget | |
case object GL_TEXTURE_BINDING_CUBE_MAP extends IntConstant(0x8514) with Parameter | |
case object GL_TEXTURE_CUBE_MAP_POSITIVE_X extends IntConstant(0x8515) with FramebufferTexTarget | |
case object GL_TEXTURE_CUBE_MAP_NEGATIVE_X extends IntConstant(0x8516) with FramebufferTexTarget | |
case object GL_TEXTURE_CUBE_MAP_POSITIVE_Y extends IntConstant(0x8517) with FramebufferTexTarget | |
case object GL_TEXTURE_CUBE_MAP_NEGATIVE_Y extends IntConstant(0x8518) with FramebufferTexTarget | |
case object GL_TEXTURE_CUBE_MAP_POSITIVE_Z extends IntConstant(0x8519) with FramebufferTexTarget | |
case object GL_TEXTURE_CUBE_MAP_NEGATIVE_Z extends IntConstant(0x851A) with FramebufferTarget | |
case object GL_MAX_CUBE_MAP_TEXTURE_SIZE extends IntConstant(0x851C) with Parameter | |
case object GL_TEXTURE0 extends IntConstant(0x84C0) with Texture | |
case object GL_TEXTURE1 extends IntConstant(0x84C1) with Texture | |
case object GL_TEXTURE2 extends IntConstant(0x84C2) with Texture | |
case object GL_TEXTURE3 extends IntConstant(0x84C3) with Texture | |
case object GL_TEXTURE4 extends IntConstant(0x84C4) with Texture | |
case object GL_TEXTURE5 extends IntConstant(0x84C5) with Texture | |
case object GL_TEXTURE6 extends IntConstant(0x84C6) with Texture | |
case object GL_TEXTURE7 extends IntConstant(0x84C7) with Texture | |
case object GL_TEXTURE8 extends IntConstant(0x84C8) with Texture | |
case object GL_TEXTURE9 extends IntConstant(0x84C9) with Texture | |
case object GL_TEXTURE10 extends IntConstant(0x84CA) with Texture | |
case object GL_TEXTURE11 extends IntConstant(0x84CB) with Texture | |
case object GL_TEXTURE12 extends IntConstant(0x84CC) with Texture | |
case object GL_TEXTURE13 extends IntConstant(0x84CD) with Texture | |
case object GL_TEXTURE14 extends IntConstant(0x84CE) with Texture | |
case object GL_TEXTURE15 extends IntConstant(0x84CF) with Texture | |
case object GL_TEXTURE16 extends IntConstant(0x84D0) with Texture | |
case object GL_TEXTURE17 extends IntConstant(0x84D1) with Texture | |
case object GL_TEXTURE18 extends IntConstant(0x84D2) with Texture | |
case object GL_TEXTURE19 extends IntConstant(0x84D3) with Texture | |
case object GL_TEXTURE20 extends IntConstant(0x84D4) with Texture | |
case object GL_TEXTURE21 extends IntConstant(0x84D5) with Texture | |
case object GL_TEXTURE22 extends IntConstant(0x84D6) with Texture | |
case object GL_TEXTURE23 extends IntConstant(0x84D7) with Texture | |
case object GL_TEXTURE24 extends IntConstant(0x84D8) with Texture | |
case object GL_TEXTURE25 extends IntConstant(0x84D9) with Texture | |
case object GL_TEXTURE26 extends IntConstant(0x84DA) with Texture | |
case object GL_TEXTURE27 extends IntConstant(0x84DB) with Texture | |
case object GL_TEXTURE28 extends IntConstant(0x84DC) with Texture | |
case object GL_TEXTURE29 extends IntConstant(0x84DD) with Texture | |
case object GL_TEXTURE30 extends IntConstant(0x84DE) with Texture | |
case object GL_TEXTURE31 extends IntConstant(0x84DF) with Texture | |
case object GL_ACTIVE_TEXTURE extends IntConstant(0x84E0) with Parameter | |
case object GL_REPEAT extends IntConstant(0x2901) with TextureWrap | |
case object GL_CLAMP_TO_EDGE extends IntConstant(0x812F) with TextureWrap | |
case object GL_MIRRORED_REPEAT extends IntConstant(0x8370) with TextureWrap | |
case object GL_FLOAT_VEC2 extends IntConstant(0x8B50) with Constant | |
case object GL_FLOAT_VEC3 extends IntConstant(0x8B51) with Constant | |
case object GL_FLOAT_VEC4 extends IntConstant(0x8B52) with Constant | |
case object GL_INT_VEC2 extends IntConstant(0x8B53) with Constant | |
case object GL_INT_VEC3 extends IntConstant(0x8B54) with Constant | |
case object GL_INT_VEC4 extends IntConstant(0x8B55) with Constant | |
case object GL_BOOL extends IntConstant(0x8B56) with Constant | |
case object GL_BOOL_VEC2 extends IntConstant(0x8B57) with Constant | |
case object GL_BOOL_VEC3 extends IntConstant(0x8B58) with Constant | |
case object GL_BOOL_VEC4 extends IntConstant(0x8B59) with Constant | |
case object GL_FLOAT_MAT2 extends IntConstant(0x8B5A) with Constant | |
case object GL_FLOAT_MAT3 extends IntConstant(0x8B5B) with Constant | |
case object GL_FLOAT_MAT4 extends IntConstant(0x8B5C) with Constant | |
case object GL_SAMPLER_2D extends IntConstant(0x8B5E) with Constant | |
case object GL_SAMPLER_CUBE extends IntConstant(0x8B60) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_ENABLED extends IntConstant(0x8622) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_SIZE extends IntConstant(0x8623) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_STRIDE extends IntConstant(0x8624) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_TYPE extends IntConstant(0x8625) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_NORMALIZED extends IntConstant(0x886A) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_POINTER extends IntConstant(0x8645) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING extends IntConstant(0x889F) with Constant | |
case object GL_IMPLEMENTATION_COLOR_READ_TYPE extends IntConstant(0x8B9A) with Parameter | |
case object GL_IMPLEMENTATION_COLOR_READ_FORMAT extends IntConstant(0x8B9B) with Parameter | |
case object GL_COMPILE_STATUS extends IntConstant(0x8B81) with ShaderParameter | |
case object GL_INFO_LOG_LENGTH extends IntConstant(0x8B84) with ShaderParameter | |
case object GL_SHADER_SOURCE_LENGTH extends IntConstant(0x8B88) with ShaderParameter | |
case object GL_SHADER_COMPILER extends IntConstant(0x8DFA) with Parameter | |
case object GL_SHADER_BINARY_FORMATS extends IntConstant(0x8DF8) with Parameter | |
case object GL_NUM_SHADER_BINARY_FORMATS extends IntConstant(0x8DF9) with Parameter | |
case object GL_LOW_FLOAT extends IntConstant(0x8DF0) with Constant | |
case object GL_MEDIUM_FLOAT extends IntConstant(0x8DF1) with Constant | |
case object GL_HIGH_FLOAT extends IntConstant(0x8DF2) with Constant | |
case object GL_LOW_INT extends IntConstant(0x8DF3) with Constant | |
case object GL_MEDIUM_INT extends IntConstant(0x8DF4) with Constant | |
case object GL_HIGH_INT extends IntConstant(0x8DF5) with Constant | |
case object GL_FRAMEBUFFER extends IntConstant(0x8D40) with FramebufferTarget | |
case object GL_RENDERBUFFER extends IntConstant(0x8D41) with Constant | |
case object GL_RGBA4 extends IntConstant(0x8056) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB5_A1 extends IntConstant(0x8057) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB565 extends IntConstant(0x8D62) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_DEPTH_COMPONENT16 extends IntConstant(0x81A5) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_STENCIL_INDEX8 extends IntConstant(0x8D48) with RenderbufferInternalFormat | |
case object GL_RENDERBUFFER_WIDTH extends IntConstant(0x8D42) with Constant | |
case object GL_RENDERBUFFER_HEIGHT extends IntConstant(0x8D43) with Constant | |
case object GL_RENDERBUFFER_INTERNAL_FORMAT extends IntConstant(0x8D44) with Constant | |
case object GL_RENDERBUFFER_RED_SIZE extends IntConstant(0x8D50) with Constant | |
case object GL_RENDERBUFFER_GREEN_SIZE extends IntConstant(0x8D51) with Constant | |
case object GL_RENDERBUFFER_BLUE_SIZE extends IntConstant(0x8D52) with Constant | |
case object GL_RENDERBUFFER_ALPHA_SIZE extends IntConstant(0x8D53) with Constant | |
case object GL_RENDERBUFFER_DEPTH_SIZE extends IntConstant(0x8D54) with Constant | |
case object GL_RENDERBUFFER_STENCIL_SIZE extends IntConstant(0x8D55) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE extends IntConstant(0x8CD0) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME extends IntConstant(0x8CD1) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL extends IntConstant(0x8CD2) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE extends IntConstant(0x8CD3) with Constant | |
case object GL_COLOR_ATTACHMENT0 extends IntConstant(0x8CE0) with ColorAttachment with FramebufferAttachment | |
case object GL_DEPTH_ATTACHMENT extends IntConstant(0x8D00) with FramebufferAttachment | |
case object GL_STENCIL_ATTACHMENT extends IntConstant(0x8D20) with FramebufferAttachment | |
case object GL_NONE extends IntConstant(0) with TextureCompareMode with ColorOutputTarget with ColorBuffer | |
case object GL_FRAMEBUFFER_COMPLETE extends IntConstant(0x8CD5) with FramebufferStatus | |
case object GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT extends IntConstant(0x8CD6) with FramebufferStatus | |
case object GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT extends IntConstant(0x8CD7) with FramebufferStatus | |
case object GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS extends IntConstant(0x8CD9) with FramebufferStatus | |
case object GL_FRAMEBUFFER_UNSUPPORTED extends IntConstant(0x8CDD) with FramebufferStatus | |
case object GL_FRAMEBUFFER_BINDING extends IntConstant(0x8CA6) with Constant | |
case object GL_RENDERBUFFER_BINDING extends IntConstant(0x8CA7) with Parameter | |
case object GL_MAX_RENDERBUFFER_SIZE extends IntConstant(0x84E8) with Parameter | |
case object GL_INVALID_FRAMEBUFFER_OPERATION extends IntConstant(0x0506) with Constant | |
case object GL_READ_BUFFER extends IntConstant(0x0C02) with Parameter | |
case object GL_UNPACK_ROW_LENGTH extends IntConstant(0x0CF2) with PixelStoreParameter | |
case object GL_UNPACK_SKIP_ROWS extends IntConstant(0x0CF3) with PixelStoreParameter | |
case object GL_UNPACK_SKIP_PIXELS extends IntConstant(0x0CF4) with PixelStoreParameter | |
case object GL_PACK_ROW_LENGTH extends IntConstant(0x0D02) with PixelStoreParameter | |
case object GL_PACK_SKIP_ROWS extends IntConstant(0x0D03) with PixelStoreParameter | |
case object GL_PACK_SKIP_PIXELS extends IntConstant(0x0D04) with PixelStoreParameter | |
case object GL_COLOR extends IntConstant(0x1800) with Channel | |
case object GL_DEPTH extends IntConstant(0x1801) with Channel | |
case object GL_STENCIL extends IntConstant(0x1802) with Channel | |
case object GL_RED extends IntConstant(0x1903) with TextureSwizzle with TextureFormat | |
case object GL_RGB8 extends IntConstant(0x8051) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGBA8 extends IntConstant(0x8058) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB10_A2 extends IntConstant(0x8059) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_TEXTURE_BINDING_3D extends IntConstant(0x806A) with Parameter | |
case object GL_UNPACK_SKIP_IMAGES extends IntConstant(0x806D) with PixelStoreParameter | |
case object GL_UNPACK_IMAGE_HEIGHT extends IntConstant(0x806E) with PixelStoreParameter | |
case object GL_TEXTURE_3D extends IntConstant(0x806F) with TextureTarget | |
case object GL_TEXTURE_WRAP_R extends IntConstant(0x8072) with TextureParameter with SamplerParameter | |
case object GL_MAX_3D_TEXTURE_SIZE extends IntConstant(0x8073) with Parameter | |
case object GL_UNSIGNED_INT_2_10_10_10_REV extends IntConstant(0x8368) with VertexAttribType with TexturePixelType | |
case object GL_MAX_ELEMENTS_VERTICES extends IntConstant(0x80E8) with Parameter | |
case object GL_MAX_ELEMENTS_INDICES extends IntConstant(0x80E9) with Parameter | |
case object GL_TEXTURE_MIN_LOD extends IntConstant(0x813A) with TextureParameter with SamplerParameter | |
case object GL_TEXTURE_MAX_LOD extends IntConstant(0x813B) with TextureParameter with SamplerParameter | |
case object GL_TEXTURE_BASE_LEVEL extends IntConstant(0x813C) with TextureParameter | |
case object GL_TEXTURE_MAX_LEVEL extends IntConstant(0x813D) with TextureParameter | |
case object GL_MIN extends IntConstant(0x8007) with BlendMode | |
case object GL_MAX extends IntConstant(0x8008) with BlendMode | |
case object GL_DEPTH_COMPONENT24 extends IntConstant(0x81A6) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_MAX_TEXTURE_LOD_BIAS extends IntConstant(0x84FD) with Parameter | |
case object GL_TEXTURE_COMPARE_MODE extends IntConstant(0x884C) with TextureParameter with SamplerParameter | |
case object GL_TEXTURE_COMPARE_FUNC extends IntConstant(0x884D) with TextureParameter with SamplerParameter | |
case object GL_CURRENT_QUERY extends IntConstant(0x8865) with Constant | |
case object GL_QUERY_RESULT extends IntConstant(0x8866) with Constant | |
case object GL_QUERY_RESULT_AVAILABLE extends IntConstant(0x8867) with Constant | |
case object GL_BUFFER_MAPPED extends IntConstant(0x88BC) with Constant | |
case object GL_BUFFER_MAP_POINTER extends IntConstant(0x88BD) with Constant | |
case object GL_STREAM_READ extends IntConstant(0x88E1) with Constant | |
case object GL_STREAM_COPY extends IntConstant(0x88E2) with Constant | |
case object GL_STATIC_READ extends IntConstant(0x88E5) with Constant | |
case object GL_STATIC_COPY extends IntConstant(0x88E6) with Constant | |
case object GL_DYNAMIC_READ extends IntConstant(0x88E9) with BufferUsage | |
case object GL_DYNAMIC_COPY extends IntConstant(0x88EA) with BufferUsage | |
case object GL_MAX_DRAW_BUFFERS extends IntConstant(0x8824) with Parameter | |
case object GL_DRAW_BUFFER0 extends IntConstant(0x8825) with DrawBuffer | |
case object GL_DRAW_BUFFER1 extends IntConstant(0x8826) with DrawBuffer | |
case object GL_DRAW_BUFFER2 extends IntConstant(0x8827) with DrawBuffer | |
case object GL_DRAW_BUFFER3 extends IntConstant(0x8828) with DrawBuffer | |
case object GL_DRAW_BUFFER4 extends IntConstant(0x8829) with DrawBuffer | |
case object GL_DRAW_BUFFER5 extends IntConstant(0x882A) with DrawBuffer | |
case object GL_DRAW_BUFFER6 extends IntConstant(0x882B) with DrawBuffer | |
case object GL_DRAW_BUFFER7 extends IntConstant(0x882C) with DrawBuffer | |
case object GL_DRAW_BUFFER8 extends IntConstant(0x882D) with DrawBuffer | |
case object GL_DRAW_BUFFER9 extends IntConstant(0x882E) with DrawBuffer | |
case object GL_DRAW_BUFFER10 extends IntConstant(0x882F) with DrawBuffer | |
case object GL_DRAW_BUFFER11 extends IntConstant(0x8830) with DrawBuffer | |
case object GL_DRAW_BUFFER12 extends IntConstant(0x8831) with DrawBuffer | |
case object GL_DRAW_BUFFER13 extends IntConstant(0x8832) with DrawBuffer | |
case object GL_DRAW_BUFFER14 extends IntConstant(0x8833) with DrawBuffer | |
case object GL_DRAW_BUFFER15 extends IntConstant(0x8834) with DrawBuffer | |
case object GL_MAX_FRAGMENT_UNIFORM_COMPONENTS extends IntConstant(0x8B49) with Parameter | |
case object GL_MAX_VERTEX_UNIFORM_COMPONENTS extends IntConstant(0x8B4A) with Parameter | |
case object GL_SAMPLER_3D extends IntConstant(0x8B5F) with Constant | |
case object GL_SAMPLER_2D_SHADOW extends IntConstant(0x8B62) with Constant | |
case object GL_FRAGMENT_SHADER_DERIVATIVE_HINT extends IntConstant(0x8B8B) with Parameter | |
case object GL_PIXEL_PACK_BUFFER extends IntConstant(0x88EB) with BufferTarget | |
case object GL_PIXEL_UNPACK_BUFFER extends IntConstant(0x88EC) with BufferTarget | |
case object GL_PIXEL_PACK_BUFFER_BINDING extends IntConstant(0x88ED) with Parameter | |
case object GL_PIXEL_UNPACK_BUFFER_BINDING extends IntConstant(0x88EF) with Parameter | |
case object GL_FLOAT_MAT2x3 extends IntConstant(0x8B65) with Constant | |
case object GL_FLOAT_MAT2x4 extends IntConstant(0x8B66) with Constant | |
case object GL_FLOAT_MAT3x2 extends IntConstant(0x8B67) with Constant | |
case object GL_FLOAT_MAT3x4 extends IntConstant(0x8B68) with Constant | |
case object GL_FLOAT_MAT4x2 extends IntConstant(0x8B69) with Constant | |
case object GL_FLOAT_MAT4x3 extends IntConstant(0x8B6A) with Constant | |
case object GL_SRGB extends IntConstant(0x8C40) with TextureSizedInternalFormat | |
case object GL_SRGB8 extends IntConstant(0x8C41) with Constant | |
case object GL_SRGB8_ALPHA8 extends IntConstant(0x8C43) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_COMPARE_REF_TO_TEXTURE extends IntConstant(0x884E) with TextureCompareMode | |
case object GL_MAJOR_VERSION extends IntConstant(0x821B) with Parameter | |
case object GL_MINOR_VERSION extends IntConstant(0x821C) with Parameter | |
case object GL_NUM_EXTENSIONS extends IntConstant(0x821D) with Parameter | |
case object GL_RGBA32F extends IntConstant(0x8814) with TextureSizedInternalFormat | |
case object GL_RGB32F extends IntConstant(0x8815) with TextureSizedInternalFormat | |
case object GL_RGBA16F extends IntConstant(0x881A) with TextureSizedInternalFormat | |
case object GL_RGB16F extends IntConstant(0x881B) with TextureSizedInternalFormat | |
case object GL_VERTEX_ATTRIB_ARRAY_INTEGER extends IntConstant(0x88FD) with Constant | |
case object GL_MAX_ARRAY_TEXTURE_LAYERS extends IntConstant(0x88FF) with Parameter | |
case object GL_MIN_PROGRAM_TEXEL_OFFSET extends IntConstant(0x8904) with Parameter | |
case object GL_MAX_PROGRAM_TEXEL_OFFSET extends IntConstant(0x8905) with Parameter | |
case object GL_MAX_VARYING_COMPONENTS extends IntConstant(0x8B4B) with Parameter | |
case object GL_TEXTURE_2D_ARRAY extends IntConstant(0x8C1A) with TextureTarget | |
case object GL_TEXTURE_BINDING_2D_ARRAY extends IntConstant(0x8C1D) with Parameter | |
case object GL_R11F_G11F_B10F extends IntConstant(0x8C3A) with TextureSizedInternalFormat | |
case object GL_UNSIGNED_INT_10F_11F_11F_REV extends IntConstant(0x8C3B) with TexturePixelType | |
case object GL_RGB9_E5 extends IntConstant(0x8C3D) with TextureSizedInternalFormat | |
case object GL_UNSIGNED_INT_5_9_9_9_REV extends IntConstant(0x8C3E) with TexturePixelType | |
case object GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH extends IntConstant(0x8C76) with Constant | |
case object GL_TRANSFORM_FEEDBACK_BUFFER_MODE extends IntConstant(0x8C7F) with Constant | |
case object GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS extends IntConstant(0x8C80) with Parameter | |
case object GL_TRANSFORM_FEEDBACK_VARYINGS extends IntConstant(0x8C83) with Constant | |
case object GL_TRANSFORM_FEEDBACK_BUFFER_START extends IntConstant(0x8C84) with Parameter | |
case object GL_TRANSFORM_FEEDBACK_BUFFER_SIZE extends IntConstant(0x8C85) with Parameter | |
case object GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN extends IntConstant(0x8C88) with Constant | |
case object GL_RASTERIZER_DISCARD extends IntConstant(0x8C89) with Capability | |
case object GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS extends IntConstant(0x8C8A) with Parameter | |
case object GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS extends IntConstant(0x8C8B) with Parameter | |
case object GL_INTERLEAVED_ATTRIBS extends IntConstant(0x8C8C) with Constant | |
case object GL_SEPARATE_ATTRIBS extends IntConstant(0x8C8D) with Constant | |
case object GL_TRANSFORM_FEEDBACK_BUFFER extends IntConstant(0x8C8E) with BufferTarget | |
case object GL_TRANSFORM_FEEDBACK_BUFFER_BINDING extends IntConstant(0x8C8F) with Parameter | |
case object GL_RGBA32UI extends IntConstant(0x8D70) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB32UI extends IntConstant(0x8D71) with TextureSizedInternalFormat | |
case object GL_RGBA16UI extends IntConstant(0x8D76) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB16UI extends IntConstant(0x8D77) with TextureSizedInternalFormat | |
case object GL_RGBA8UI extends IntConstant(0x8D7C) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB8UI extends IntConstant(0x8D7D) with TextureSizedInternalFormat | |
case object GL_RGBA32I extends IntConstant(0x8D82) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB32I extends IntConstant(0x8D83) with TextureSizedInternalFormat | |
case object GL_RGBA16I extends IntConstant(0x8D88) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB16I extends IntConstant(0x8D89) with TextureSizedInternalFormat | |
case object GL_RGBA8I extends IntConstant(0x8D8E) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RGB8I extends IntConstant(0x8D8F) with TextureSizedInternalFormat | |
case object GL_RED_INTEGER extends IntConstant(0x8D94) with TextureFormat | |
case object GL_RGB_INTEGER extends IntConstant(0x8D98) with TextureFormat | |
case object GL_RGBA_INTEGER extends IntConstant(0x8D99) with TextureFormat | |
case object GL_SAMPLER_2D_ARRAY extends IntConstant(0x8DC1) with Constant | |
case object GL_SAMPLER_2D_ARRAY_SHADOW extends IntConstant(0x8DC4) with Constant | |
case object GL_SAMPLER_CUBE_SHADOW extends IntConstant(0x8DC5) with Constant | |
case object GL_UNSIGNED_INT_VEC2 extends IntConstant(0x8DC6) with Constant | |
case object GL_UNSIGNED_INT_VEC3 extends IntConstant(0x8DC7) with Constant | |
case object GL_UNSIGNED_INT_VEC4 extends IntConstant(0x8DC8) with Constant | |
case object GL_INT_SAMPLER_2D extends IntConstant(0x8DCA) with Constant | |
case object GL_INT_SAMPLER_3D extends IntConstant(0x8DCB) with Constant | |
case object GL_INT_SAMPLER_CUBE extends IntConstant(0x8DCC) with Constant | |
case object GL_INT_SAMPLER_2D_ARRAY extends IntConstant(0x8DCF) with Constant | |
case object GL_UNSIGNED_INT_SAMPLER_2D extends IntConstant(0x8DD2) with Constant | |
case object GL_UNSIGNED_INT_SAMPLER_3D extends IntConstant(0x8DD3) with Constant | |
case object GL_UNSIGNED_INT_SAMPLER_CUBE extends IntConstant(0x8DD4) with Constant | |
case object GL_UNSIGNED_INT_SAMPLER_2D_ARRAY extends IntConstant(0x8DD7) with Constant | |
case object GL_BUFFER_ACCESS_FLAGS extends IntConstant(0x911F) with BufferParameter | |
case object GL_BUFFER_MAP_LENGTH extends IntConstant(0x9120) with BufferParameter | |
case object GL_BUFFER_MAP_OFFSET extends IntConstant(0x9121) with BufferParameter | |
case object GL_DEPTH_COMPONENT32F extends IntConstant(0x8CAC) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_DEPTH32F_STENCIL8 extends IntConstant(0x8CAD) with TextureSizedInternalFormat | |
case object GL_FLOAT_32_UNSIGNED_INT_24_8_REV extends IntConstant(0x8DAD) with TextureInteralFormat | |
case object GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING extends IntConstant(0x8210) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE extends IntConstant(0x8211) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE extends IntConstant(0x8212) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE extends IntConstant(0x8213) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE extends IntConstant(0x8214) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE extends IntConstant(0x8215) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE extends IntConstant(0x8216) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE extends IntConstant(0x8217) with Constant | |
case object GL_FRAMEBUFFER_DEFAULT extends IntConstant(0x8218) with Constant | |
case object GL_FRAMEBUFFER_UNDEFINED extends IntConstant(0x8219) with FramebufferStatus | |
case object GL_DEPTH_STENCIL_ATTACHMENT extends IntConstant(0x821A) with FramebufferAttachment | |
case object GL_DEPTH_STENCIL extends IntConstant(0x84F9) with TextureFormat with Channel | |
case object GL_UNSIGNED_INT_24_8 extends IntConstant(0x84FA) with TextureInteralFormat | |
case object GL_DEPTH24_STENCIL8 extends IntConstant(0x88F0) with RenderbufferInternalFormat with TextureInteralFormat | |
case object GL_UNSIGNED_NORMALIZED extends IntConstant(0x8C17) with Parameter | |
case object GL_DRAW_FRAMEBUFFER_BINDING extends IntConstant(0x8CA6) with Constant | |
case object GL_READ_FRAMEBUFFER extends IntConstant(0x8CA8) with FramebufferTarget | |
case object GL_DRAW_FRAMEBUFFER extends IntConstant(0x8CA9) with FramebufferTarget | |
case object GL_READ_FRAMEBUFFER_BINDING extends IntConstant(0x8CAA) with Parameter | |
case object GL_RENDERBUFFER_SAMPLES extends IntConstant(0x8CAB) with Constant | |
case object GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER extends IntConstant(0x8CD4) with Constant | |
case object GL_MAX_COLOR_ATTACHMENTS extends IntConstant(0x8CDF) with Parameter | |
case object GL_COLOR_ATTACHMENT1 extends IntConstant(0x8CE1) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT2 extends IntConstant(0x8CE2) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT3 extends IntConstant(0x8CE3) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT4 extends IntConstant(0x8CE4) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT5 extends IntConstant(0x8CE5) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT6 extends IntConstant(0x8CE6) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT7 extends IntConstant(0x8CE7) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT8 extends IntConstant(0x8CE8) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT9 extends IntConstant(0x8CE9) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT10 extends IntConstant(0x8CEA) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT11 extends IntConstant(0x8CEB) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT12 extends IntConstant(0x8CEC) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT13 extends IntConstant(0x8CED) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT14 extends IntConstant(0x8CEE) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT15 extends IntConstant(0x8CEF) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT16 extends IntConstant(0x8CF0) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT17 extends IntConstant(0x8CF1) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT18 extends IntConstant(0x8CF2) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT19 extends IntConstant(0x8CF3) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT20 extends IntConstant(0x8CF4) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT21 extends IntConstant(0x8CF5) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT22 extends IntConstant(0x8CF6) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT23 extends IntConstant(0x8CF7) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT24 extends IntConstant(0x8CF8) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT25 extends IntConstant(0x8CF9) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT26 extends IntConstant(0x8CFA) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT27 extends IntConstant(0x8CFB) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT28 extends IntConstant(0x8CFC) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT29 extends IntConstant(0x8CFD) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT30 extends IntConstant(0x8CFE) with ColorAttachment with FramebufferAttachment | |
case object GL_COLOR_ATTACHMENT31 extends IntConstant(0x8CFF) with ColorAttachment with FramebufferAttachment | |
case object GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE extends IntConstant(0x8D56) with FramebufferStatus | |
case object GL_MAX_SAMPLES extends IntConstant(0x8D57) with Parameter | |
case object GL_HALF_FLOAT extends IntConstant(0x140B) with VertexAttribType with TexturePixelType | |
case object GL_MAP_READ_BIT extends IntConstant(0x0001) with Constant | |
case object GL_MAP_WRITE_BIT extends IntConstant(0x0002) with Constant | |
case object GL_MAP_INVALIDATE_RANGE_BIT extends IntConstant(0x0004) with Constant | |
case object GL_MAP_INVALIDATE_BUFFER_BIT extends IntConstant(0x0008) with Constant | |
case object GL_MAP_FLUSH_EXPLICIT_BIT extends IntConstant(0x0010) with Constant | |
case object GL_MAP_UNSYNCHRONIZED_BIT extends IntConstant(0x0020) with Constant | |
case object GL_RG extends IntConstant(0x8227) with TextureFormat | |
case object GL_RG_INTEGER extends IntConstant(0x8228) with TextureFormat | |
case object GL_R8 extends IntConstant(0x8229) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RG8 extends IntConstant(0x822B) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_R16F extends IntConstant(0x822D) with TextureSizedInternalFormat | |
case object GL_R32F extends IntConstant(0x822E) with TextureSizedInternalFormat | |
case object GL_RG16F extends IntConstant(0x822F) with TextureSizedInternalFormat | |
case object GL_RG32F extends IntConstant(0x8230) with TextureSizedInternalFormat | |
case object GL_R8I extends IntConstant(0x8231) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_R8UI extends IntConstant(0x8232) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_R16I extends IntConstant(0x8233) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_R16UI extends IntConstant(0x8234) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_R32I extends IntConstant(0x8235) with RenderbufferInternalFormat | |
case object GL_R32UI extends IntConstant(0x8236) with RenderbufferInternalFormat | |
case object GL_RG8I extends IntConstant(0x8237) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RG8UI extends IntConstant(0x8238) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RG16I extends IntConstant(0x8239) with RenderbufferInternalFormat | |
case object GL_RG16UI extends IntConstant(0x823A) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RG32I extends IntConstant(0x823B) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_RG32UI extends IntConstant(0x823C) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_VERTEX_ARRAY_BINDING extends IntConstant(0x85B5) with Parameter | |
case object GL_R8_SNORM extends IntConstant(0x8F94) with TextureSizedInternalFormat | |
case object GL_RG8_SNORM extends IntConstant(0x8F95) with TextureSizedInternalFormat | |
case object GL_RGB8_SNORM extends IntConstant(0x8F96) with TextureSizedInternalFormat | |
case object GL_RGBA8_SNORM extends IntConstant(0x8F97) with TextureSizedInternalFormat | |
case object GL_SIGNED_NORMALIZED extends IntConstant(0x8F9C) with Constant | |
case object GL_PRIMITIVE_RESTART_FIXED_INDEX extends IntConstant(0x8D69) with Capability | |
case object GL_COPY_READ_BUFFER extends IntConstant(0x8F36) with BufferTarget | |
case object GL_COPY_WRITE_BUFFER extends IntConstant(0x8F37) with BufferTarget | |
case object GL_COPY_READ_BUFFER_BINDING extends IntConstant(0x8F36) with Parameter | |
case object GL_COPY_WRITE_BUFFER_BINDING extends IntConstant(0x8F37) with Parameter | |
case object GL_UNIFORM_BUFFER extends IntConstant(0x8A11) with BufferTarget | |
case object GL_UNIFORM_BUFFER_BINDING extends IntConstant(0x8A28) with Parameter | |
case object GL_UNIFORM_BUFFER_START extends IntConstant(0x8A29) with Parameter | |
case object GL_UNIFORM_BUFFER_SIZE extends IntConstant(0x8A2A) with Parameter | |
case object GL_MAX_VERTEX_UNIFORM_BLOCKS extends IntConstant(0x8A2B) with Parameter | |
case object GL_MAX_FRAGMENT_UNIFORM_BLOCKS extends IntConstant(0x8A2D) with Parameter | |
case object GL_MAX_COMBINED_UNIFORM_BLOCKS extends IntConstant(0x8A2E) with Parameter | |
case object GL_MAX_UNIFORM_BUFFER_BINDINGS extends IntConstant(0x8A2F) with Parameter | |
case object GL_MAX_UNIFORM_BLOCK_SIZE extends IntConstant(0x8A30) with Parameter | |
case object GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS extends IntConstant(0x8A31) with Parameter | |
case object GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS extends IntConstant(0x8A33) with Parameter | |
case object GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT extends IntConstant(0x8A34) with Parameter | |
case object GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH extends IntConstant(0x8A35) with Constant | |
case object GL_ACTIVE_UNIFORM_BLOCKS extends IntConstant(0x8A36) with Constant | |
case object GL_UNIFORM_TYPE extends IntConstant(0x8A37) with Constant | |
case object GL_UNIFORM_SIZE extends IntConstant(0x8A38) with Parameter | |
case object GL_UNIFORM_NAME_LENGTH extends IntConstant(0x8A39) with Constant | |
case object GL_UNIFORM_BLOCK_INDEX extends IntConstant(0x8A3A) with Constant | |
case object GL_UNIFORM_OFFSET extends IntConstant(0x8A3B) with Constant | |
case object GL_UNIFORM_ARRAY_STRIDE extends IntConstant(0x8A3C) with Constant | |
case object GL_UNIFORM_MATRIX_STRIDE extends IntConstant(0x8A3D) with Constant | |
case object GL_UNIFORM_IS_ROW_MAJOR extends IntConstant(0x8A3E) with Constant | |
case object GL_UNIFORM_BLOCK_BINDING extends IntConstant(0x8A3F) with Constant | |
case object GL_UNIFORM_BLOCK_DATA_SIZE extends IntConstant(0x8A40) with Constant | |
case object GL_UNIFORM_BLOCK_NAME_LENGTH extends IntConstant(0x8A41) with Constant | |
case object GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS extends IntConstant(0x8A42) with Constant | |
case object GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES extends IntConstant(0x8A43) with Constant | |
case object GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER extends IntConstant(0x8A44) with Constant | |
case object GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER extends IntConstant(0x8A46) with Constant | |
case object GL_INVALID_INDEX extends IntConstant(0xFFFFFFFF) with Constant | |
case object GL_MAX_VERTEX_OUTPUT_COMPONENTS extends IntConstant(0x9122) with Parameter | |
case object GL_MAX_FRAGMENT_INPUT_COMPONENTS extends IntConstant(0x9125) with Parameter | |
case object GL_MAX_SERVER_WAIT_TIMEOUT extends IntConstant(0x9111) with Parameter | |
case object GL_OBJECT_TYPE extends IntConstant(0x9112) with Constant | |
case object GL_SYNC_CONDITION extends IntConstant(0x9113) with Constant | |
case object GL_SYNC_STATUS extends IntConstant(0x9114) with Constant | |
case object GL_SYNC_FLAGS extends IntConstant(0x9115) with Constant | |
case object GL_SYNC_FENCE extends IntConstant(0x9116) with Constant | |
case object GL_SYNC_GPU_COMMANDS_COMPLETE extends IntConstant(0x9117) with Constant | |
case object GL_UNSIGNALED extends IntConstant(0x9118) with Constant | |
case object GL_SIGNALED extends IntConstant(0x9119) with Constant | |
case object GL_ALREADY_SIGNALED extends IntConstant(0x911A) with Constant | |
case object GL_TIMEOUT_EXPIRED extends IntConstant(0x911B) with Constant | |
case object GL_CONDITION_SATISFIED extends IntConstant(0x911C) with Constant | |
case object GL_WAIT_FAILED extends IntConstant(0x911D) with Constant | |
case object GL_SYNC_FLUSH_COMMANDS_BIT extends IntConstant(0x00000001) with Constant | |
case object GL_TIMEOUT_IGNORED extends LongConstant(0xFFFFFFFFFFFFFFFFL) with Constant | |
case object GL_VERTEX_ATTRIB_ARRAY_DIVISOR extends IntConstant(0x88FE) with Constant | |
case object GL_ANY_SAMPLES_PASSED extends IntConstant(0x8C2F) with Constant | |
case object GL_ANY_SAMPLES_PASSED_CONSERVATIVE extends IntConstant(0x8D6A) with Constant | |
case object GL_SAMPLER_BINDING extends IntConstant(0x8919) with Parameter | |
case object GL_RGB10_A2UI extends IntConstant(0x906F) with RenderbufferInternalFormat with TextureSizedInternalFormat | |
case object GL_TEXTURE_SWIZZLE_R extends IntConstant(0x8E42) with TextureParameter | |
case object GL_TEXTURE_SWIZZLE_G extends IntConstant(0x8E43) with TextureParameter | |
case object GL_TEXTURE_SWIZZLE_B extends IntConstant(0x8E44) with TextureParameter | |
case object GL_TEXTURE_SWIZZLE_A extends IntConstant(0x8E45) with TextureParameter | |
case object GL_GREEN extends IntConstant(0x1904) with TextureSwizzle | |
case object GL_BLUE extends IntConstant(0x1905) with TextureSwizzle | |
case object GL_INT_2_10_10_10_REV extends IntConstant(0x8D9F) with VertexAttribType | |
case object GL_TRANSFORM_FEEDBACK extends IntConstant(0x8E22) with Constant | |
case object GL_TRANSFORM_FEEDBACK_PAUSED extends IntConstant(0x8E23) with Parameter | |
case object GL_TRANSFORM_FEEDBACK_ACTIVE extends IntConstant(0x8E24) with Parameter | |
case object GL_TRANSFORM_FEEDBACK_BINDING extends IntConstant(0x8E25) with Parameter | |
case object GL_PROGRAM_BINARY_RETRIEVABLE_HINT extends IntConstant(0x8257) with Constant | |
case object GL_PROGRAM_BINARY_LENGTH extends IntConstant(0x8741) with Constant | |
case object GL_NUM_PROGRAM_BINARY_FORMATS extends IntConstant(0x87FE) with Parameter | |
case object GL_PROGRAM_BINARY_FORMATS extends IntConstant(0x87FF) with Parameter | |
case object GL_COMPRESSED_R11_EAC extends IntConstant(0x9270) with TextureCompressedFormat | |
case object GL_COMPRESSED_SIGNED_R11_EAC extends IntConstant(0x9271) with TextureCompressedFormat | |
case object GL_COMPRESSED_RG11_EAC extends IntConstant(0x9272) with TextureCompressedFormat | |
case object GL_COMPRESSED_SIGNED_RG11_EAC extends IntConstant(0x9273) with TextureCompressedFormat | |
case object GL_COMPRESSED_RGB8_ETC2 extends IntConstant(0x9274) with TextureCompressedFormat | |
case object GL_COMPRESSED_SRGB8_ETC2 extends IntConstant(0x9275) with TextureCompressedFormat | |
case object GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 extends IntConstant(0x9276) with TextureCompressedFormat | |
case object GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 extends IntConstant(0x9277) with TextureCompressedFormat | |
case object GL_COMPRESSED_RGBA8_ETC2_EAC extends IntConstant(0x9278) with TextureCompressedFormat | |
case object GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC extends IntConstant(0x9279) with TextureCompressedFormat | |
case object GL_TEXTURE_IMMUTABLE_FORMAT extends IntConstant(0x912F) with Constant | |
case object GL_MAX_ELEMENT_INDEX extends IntConstant(0x8D6B) with Parameter | |
case object GL_NUM_SAMPLE_COUNTS extends IntConstant(0x9380) with Constant | |
case object GL_TEXTURE_IMMUTABLE_LEVELS extends IntConstant(0x82DF) with Constant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package iliad | |
package platform | |
package gl | |
package es3 | |
import cats._ | |
import cats.data._ | |
import cats.implicits._ | |
import Constant._ | |
import GL._ | |
/*private[es3] final class StaticDebugging[F[_]](gl: GL[F])(implicit A: Applicative[F], val S: Semigroup[Debugger[F, Unit]], val M: Monad[Debugger[F, ?]]) extends GL[Debugger[F, ?]] { | |
def debug[A](io: IO[F, A])(method: String): IO[Debugger[F, ?], A] = error(method) ap lift(io).map(a => (_: Error) => a) | |
def lift[A](io: IO[F, A]): IO[Debugger[F, ?], A] = io.mapF[Debugger[F, ?], A](_.liftT[Debugger[?[_], ?]]) | |
def error(method: String): IO[Debugger[F, ?], Error] = | |
gl.getError.mapF[Debugger[F, ?], Error](fa => XorT(fa.map(c => if(c == GL_NO_ERROR) Xor.right(c) else Xor.left(method)))) | |
def getError: IO[Debugger[F, ?], Error] = lift(gl.getError) | |
def blitFramebuffer(src: Rectangle, dest: Rectangle, bitMask: Int, filter: Int): IO[Debugger[F, ?], Unit] = | |
debug(gl.blitFramebuffer(src, dest, bitMask, filter))("glBlitFramebuffer") | |
def viewport(rect: Rectangle): IO[Debugger[F, ?], Unit] = ??? | |
def flush: IO[Debugger[F, ?], Unit] = ??? | |
def enable(cap: Capability): IO[Debugger[F, ?], Unit] = debug(gl.enable(cap))(s"glEnable($cap)") | |
}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package iliad | |
package platform | |
package gl | |
package es3 | |
import cats._ | |
import cats.data._ | |
import cats.implicits._ | |
import Constant._ | |
import GL._ | |
/*private[es3] final class StaticLogging[F[_]](config: LoggerConfig, gl: GL[F])(implicit F: Functor[F], val S: Semigroup[Logger[F, Unit]], val M: Monad[Logger[F, ?]]) extends GL[Logger[F, ?]] { | |
def log[A](io: IO[F, A])(s: String): IO[Logger[F, ?], A] = | |
io.mapF[Logger[F, ?], A](_.liftT[Logger[?[_], ?]].mapWritten(_ => List(s))) | |
def blitFramebuffer(src: Rectangle, dest: Rectangle, bitMask: Int, filter: Int): IO[Logger[F, ?], Unit] = | |
log(gl.blitFramebuffer(src, dest, bitMask, filter))("glBlitFramebuffer") | |
def viewport(rect: Rectangle): IO[Logger[F, ?], Unit] = ??? | |
def flush: IO[Logger[F, ?], Unit] = ??? | |
def enable(cap: Capability): IO[Logger[F, ?], Unit] = log(gl.enable(cap))(s"glEnable($cap)") | |
def getError: IO[Logger[F, ?], Error] = log(gl.getError)("glGetError") | |
}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package iliad | |
import scala.languageFeature.experimental.macros | |
import scala.reflect.macros.blackbox | |
/** | |
* Expands sealed traits at compile time | |
*/ | |
object SealedEnum { | |
def values[A]: Set[A] = macro SealedEnumMacro.values_impl[A] | |
} | |
final class SealedEnumMacro(val c: blackbox.Context) { | |
import c.universe._ | |
def values_impl[A : c.WeakTypeTag]: Tree = { | |
val t = symbolOf[A] | |
if(!(t.isClass && t.asClass.isSealed)) { | |
c.abort(c.enclosingPosition, "cannot get values of types which are not sealed and a class/trait") | |
} | |
val cses = t.asClass.knownDirectSubclasses.toList | |
if(!cses.forall(_.isModuleClass)) { | |
c.abort(c.enclosingPosition, "cannot get values of types which have non-object members") | |
} | |
val all = cses.map(sym => q"""${Ident(sym.name.toTermName)}""") | |
q"""Set[$t](..$all)""" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package iliad | |
package platform | |
package gl | |
package es3 | |
import java.nio._ | |
import Constant._ | |
import cats._ | |
import cats.data._, cats.std.all._ | |
import cats.syntax.semigroup._, cats.syntax.writer._, cats.syntax.functor._, cats.syntax.xor._, cats.syntax.flatMap._, cats.syntax.transLift._, cats.syntax.traverse._ | |
import iliad.algebra.syntax.vector._ | |
import iliad.algebra.syntax.matrix._ | |
object MissingsCatsImplicits { | |
implicit def xorTApplicative[F[_], L](implicit F: Applicative[F]): Applicative[XorT[F, L, ?]] = new Applicative[XorT[F, L, ?]] { | |
def pure[A](a: A): XorT[F, L, A] = XorT(F.pure(Xor.right(a))) | |
def ap[A, B](ff: XorT[F, L, A => B])(fa: XorT[F, L, A]): XorT[F, L, B] = { | |
XorT(F.ap(ff.value.map { | |
case l @ Xor.Left(_) => (_: L Xor A) => l | |
case Xor.Right(f) => (xa: L Xor A) => xa.map(f) | |
})(fa.value)) | |
} | |
} | |
implicit def writerTMonoid[F[_], L, V](implicit F: Monoid[F[(L, V)]]): Monoid[WriterT[F, L, V]] = new Monoid[WriterT[F, L, V]] { | |
def empty = WriterT[F, L, V](F.empty) | |
def combine(x: WriterT[F, L, V], y: WriterT[F, L, V]): WriterT[F, L, V] = WriterT(F.combine(x.run, y.run)) | |
} | |
implicit def xorTMonoid[F[_], L, A](implicit F: Applicative[F], M: Monoid[A]): Monoid[XorT[F, L, A]] = new Monoid[XorT[F, L ,A]] { | |
def empty = XorT(F.pure(M.empty.right[L])) | |
def combine(xx: XorT[F, L ,A], xy: XorT[F, L , A]): XorT[F, L , A] = { | |
XorT(F.ap(xx.value.map { | |
case l @ Xor.Left(_) => (_: L Xor A) => l | |
case Xor.Right(x) => (xy: L Xor A) => xy.map(x |+| _) | |
})(xy.value)) | |
}} | |
} | |
import GL._ | |
import MissingsCatsImplicits._ | |
case class Rectangle(topLeft: Vec2i, width: Int, height: Int) { | |
def bottomRight: Vec2i = topLeft |+| v"$width $height" | |
} | |
/** | |
Typesafe GL. The type parameter `F` has type constraints to compose operations. | |
*/ | |
abstract class GL[F[_]: Monad] { | |
//Semigroup and Monad are defined for |+| and >>= operations | |
val S: Semigroup[F[Unit]] | |
def blitFramebuffer(src: Rectangle, dest: Rectangle, bitMask: ChannelBitMask, filter: BlitFilter): IO[F, Unit] | |
def viewport(rect: Rectangle): IO[F, Unit] | |
def flush: IO[F, Unit] | |
def clear(bitMask: ChannelBitMask): IO[F, Unit] | |
def clearColor(red: Float, green: Float, blue: Float, alpha: Float): IO[F, Unit] | |
def enable(cap: Capability): IO[F, Unit] | |
def disable(cap: Capability): IO[F, Unit] | |
def getError: IO[F, Error] | |
def createShader(`type`: ShaderType): IO[F, Int] | |
def shaderSource(shader: Int, count: Int, sources: Seq[String]): IO[F, Unit] | |
def shaderSource(shader: Int, source: String): IO[F, Unit] = shaderSource(shader, 0, Seq(source)) | |
def deleteShader(shader: Int): IO[F, Unit] | |
def compileShader(shader: Int): IO[F, Unit] | |
def attachShader(program: Int, shader: Int): IO[F, Unit] | |
private[es3] def getShaderiv(shader: Int, pname: ShaderParameter): IO[F, Int] | |
private def getShaderiv[A](shader: Int, pname: ShaderParameter, expected: Set[A])(eq: A => Int): IO[F, A] = getShaderiv(shader, pname).map(code => expected.find(eq(_) == code).get) | |
def getShaderiv(shader: Int, pname: GL_SHADER_TYPE.type): IO[F, ShaderType] = getShaderiv(shader, pname, SealedEnum.values[ShaderType])(_.toInt) | |
def getShaderiv(shader: Int, pname: GL_DELETE_STATUS.type): IO[F, Boolean] = getShaderiv(shader, pname, SealedEnum.values[TrueFalse])(_.toInt).map(_ == GL_TRUE) | |
def getShaderiv(shader: Int, pname: GL_COMPILE_STATUS.type): IO[F, Boolean] = getShaderiv(shader, pname, SealedEnum.values[TrueFalse])(_.toInt).map(_ == GL_TRUE) | |
def getShaderiv(shader: Int, pname: GL_INFO_LOG_LENGTH.type): IO[F, Int] = getShaderiv(shader, pname: ShaderParameter) | |
def getShaderiv(shader: Int, pname: GL_SHADER_SOURCE_LENGTH.type): IO[F, Int] = getShaderiv(shader, pname: ShaderParameter) | |
private[es3] def getShaderInfoLog(shader: Int, maxLength: Int): IO[F, String] | |
def getShaderInfoLog(shader: Int): IO[F, String] = getShaderiv(shader, GL_SHADER_SOURCE_LENGTH) >>= (getShaderInfoLog(shader, _)) | |
def createProgram: IO[F, Int] | |
def useProgram(program: Int): IO[F, Unit] | |
def linkProgram(program: Int): IO[F, Unit] | |
private def _tup1[A](arr: Array[A]): A = arr(0) | |
private def _tup2[A](arr: Array[A]): (A, A) = (arr(0), arr(1)) | |
private def _tup3[A](arr: Array[A]): (A, A, A) = (arr(0), arr(1), arr(2)) | |
//TODO: Work out how best to expose N buffers safely | |
private[es3] def genBuffers(num: Int): IO[F, Array[Int]] | |
def genBuffer: IO[F, Int] = genBuffers(1) map _tup1 | |
def genBuffer2: IO[F, (Int, Int)] = genBuffers(2) map _tup2 | |
def genBuffer3: IO[F, (Int, Int, Int)] = genBuffers(3) map _tup3 | |
def bindBuffer(target: BufferTarget, buffer: Int): IO[F , Unit] | |
def bufferData(target: BufferTarget, size: Int, data: Buffer, usage: BufferUsage): IO[F, Unit] | |
def bufferSubData(target: BufferTarget, offset: Int, size: Int, data: Buffer): IO[F, Unit] | |
def enableVertexAttribArray(location: Int): IO[F, Unit] | |
def vertexAttribPointer(location: Int, size: Int,`type`: VertexAttribType, normalized: Boolean, stride: Int, offset: Int): IO[F, Unit] | |
private[es3] def genFramebuffers(num: Int): IO[F,Array[Int]] | |
def genFramebuffer: IO[F, Int] = genFramebuffers(1) map _tup1 | |
def genFramebuffer2(num: Int): IO[F, (Int, Int)] = genFramebuffers(2) map _tup2 | |
def genFramebuffer3(num: Int): IO[F, (Int, Int, Int)] = genFramebuffers(3) map _tup3 | |
def bindFramebuffer(target: FramebufferTarget, framebuffer: Int): IO[F, Unit] | |
def framebufferRenderbuffer(target: FramebufferTarget, attachment: FramebufferAttachment, renderbuffer: Int): IO[F, Unit] | |
def checkFramebufferStatus(target: FramebufferTarget): IO[F, FramebufferStatus] | |
def framebufferTexture2D(target: FramebufferTarget, attachment: FramebufferAttachment, texTarget: FramebufferTexTarget, texture: Int, level: Int): IO[F, Unit] | |
private[es3] def genRenderbuffers(num: Int): IO[F, Array[Int]] | |
def genRenderbuffer: IO[F, Int] = genRenderbuffers(1) map _tup1 | |
def genRenderbuffer2: IO[F, (Int, Int)] = genRenderbuffers(2) map _tup2 | |
def genRenderbuffer3: IO[F, (Int, Int, Int)] = genRenderbuffers(3) map _tup3 | |
def bindRenderbuffer(renderbuffer: Int): IO[F, Unit] | |
def renderbufferStorage(format: RenderbufferInternalFormat, width: Int, height: Int): IO[F, Unit] | |
def bindTexture(target: TextureTarget, texture: Int): IO[F, Unit] | |
private[es3] def genTextures(num: Int): IO[F, Array[Int]] | |
def genTexture: IO[F, Int] = genTextures(1) map _tup1 | |
def genTexture2: IO[F, (Int, Int)] = genTextures(2) map _tup2 | |
def genTexture3: IO[F, (Int, Int, Int)] = genTextures(3) map _tup3 | |
private[es3] def texParameteri(target: TextureTarget, name: TextureParameter, value: Int): IO[F, Unit] | |
private[es3] def texParameteri(target: TextureTarget, name: TextureParameter, value: IntValue): IO[F, Unit] | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_BASE_LEVEL.type, value: Int): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_COMPARE_FUNC.type, value: TextureCompareFunc): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_COMPARE_MODE.type, value: TextureCompareMode): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_MIN_FILTER.type, value: TextureMinFilter): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_MAG_FILTER.type, value: TextureMagFilter): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_MIN_LOD.type, value: Int): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_MAX_LOD.type, value: Int): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_MAX_LEVEL.type, value: Int): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_SWIZZLE_R.type, value: TextureSwizzle): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_SWIZZLE_G.type, value: TextureSwizzle): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_SWIZZLE_B.type, value: TextureSwizzle): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_SWIZZLE_A.type, value: TextureSwizzle): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_WRAP_S.type, value: TextureWrap): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_WRAP_T.type, value: TextureWrap): IO[F, Unit] = texParameteri(target, name, value) | |
def texParameter(target: TextureTarget, name: GL_TEXTURE_WRAP_R.type, value: TextureWrap): IO[F, Unit] = texParameteri(target, name, value) | |
def texImage2D(target: TextureTarget, level: Int, internalFormat: TextureInteralFormat, width: Int, height: Int, format: TextureFormat, `type`: TexturePixelType, data: Buffer): IO[F, Unit] | |
def pixelStorei(name: PixelStoreParameter, value: Int): IO[F, Unit] | |
def activeTexture(texture: Int): IO[F, Unit] | |
def drawArrays(mode: PrimitiveType, first: Int, count: Int): IO[F, Unit] | |
def drawElements(mode: PrimitiveType, count: Int, `type`: IndexType, offset: Int): IO[F, Unit] | |
def drawElements(mode: PrimitiveType, count: Int, `type`: IndexType, indices: Buffer): IO[F, Unit] | |
private[es3] def uniform1i(location: Int, arg0: Int): IO[F, Unit] | |
private[es3] def uniform1f(location: Int, arg0: Float): IO[F, Unit] | |
private[es3] def uniform1fv(location: Int, count: Int, arr: Array[Float]): IO[F, Unit] | |
private[es3] def uniform1iv(location: Int, count: Int, arr: Array[Int]): IO[F, Unit] | |
private[es3] def uniform2i(location: Int, arg0: Int, arg1: Int): IO[F, Unit] | |
private[es3] def uniform2f(location: Int, arg0: Float, arg1: Float): IO[F, Unit] | |
private[es3] def uniform2fv(location: Int, count: Int, arr: Array[Float]): IO[F, Unit] | |
private[es3] def uniform2iv(location: Int, count: Int, arr: Array[Int]): IO[F, Unit] | |
private[es3] def uniform3i(location: Int, arg0: Int, arg1: Int, arg2: Int): IO[F, Unit] | |
private[es3] def uniform3f(location: Int, arg0: Float, arg1: Float, arg2: Float): IO[F, Unit] | |
private[es3] def uniform3fv(location: Int, count: Int, arr: Array[Float]): IO[F, Unit] | |
private[es3] def uniform3iv(location: Int, count: Int, arr: Array[Int]): IO[F, Unit] | |
private[es3] def uniform4i(location: Int, arg0: Int, arg1: Int, arg2: Int, arg3: Int): IO[F, Unit] | |
private[es3] def uniform4f(location: Int, arg0: Float, arg1: Float, arg2: Float, arg3: Float): IO[F, Unit] | |
private[es3] def uniform4fv(location: Int, count: Int, arr: Array[Float]): IO[F, Unit] | |
private[es3] def uniform4iv(location: Int, count: Int, arr: Array[Int]): IO[F, Unit] | |
private[es3] def uniformMatrix2fv(location: Int, count: Int, transpose: Boolean, arg0: Array[Float]): IO[F, Unit] | |
private[es3] def uniformMatrix3fv(location: Int, count: Int, transpose: Boolean, arg0: Array[Float]): IO[F, Unit] | |
private[es3] def uniformMatrix4fv(location: Int, count: Int, transpose: Boolean, arg0: Array[Float]): IO[F, Unit] | |
def uniform[A](location: Int, value: A)(implicit update: CanUniformUpdate[F, A]): IO[F, Unit] = update(this)(location, value) | |
// private implicit val Semigroup = S | |
private def getLocationTraverse[A, B, G[_] : Traverse](keys: G[A])(f: A => IO[F, B]): IO[F, G[(A, B)]] = keys.traverse[IO[F, ?], (A, B)](s => f(s).map(s -> _)) | |
def getAttribLocation(program: Int, name: String): IO[F, Int] | |
def getAttribLocation[G[_] : Traverse](program: Int, names: G[String]): IO[F, G[(String, Int)]] = getLocationTraverse(names)(getAttribLocation(program, _)) | |
def getUniformLocation(program: Int, name: String): IO[F, Int] | |
def getUniformLocations[G[_] : Traverse](program: Int, names: G[String]): IO[F, G[(String, Int)]] = getLocationTraverse(names)(getUniformLocation(program, _)) | |
private[es3] def genSamplers(num: Int): IO[F, Array[Int]] | |
def genSampler: IO[F, Int] = genSamplers(1) map _tup1 | |
def genSampler2: IO[F, (Int, Int)] = genSamplers(2) map _tup2 | |
def genSampler3: IO[F, (Int, Int, Int)] = genSamplers(3) map _tup3 | |
private[es3] def samplerParameteri(sampler: Int, name: SamplerParameter, value: IntValue): IO[F, Unit] | |
private[es3] def samplerParameteri(sampler: Int, name: SamplerParameter, value: Int): IO[F, Unit] | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_MIN_FILTER.type, value: TextureMinFilter): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_WRAP_S.type, value: TextureWrap): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_WRAP_T.type, value: TextureWrap): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_WRAP_R.type, value: TextureWrap): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_MAG_FILTER.type, value: TextureMagFilter): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_MIN_LOD.type, value: Int): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_MAX_LOD.type, value: Int): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_COMPARE_MODE.type, value: TextureCompareMode): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def samplerParameter(sampler: Int, name: GL_TEXTURE_COMPARE_FUNC.type, value: TextureCompareFunc): IO[F, Unit] = samplerParameteri(sampler, name, value) | |
def copyBufferSubData(read: BufferTarget, write: BufferTarget, readOffset: Int, writeOffset: Int, size: Int): IO[F, Unit] | |
def bindVertexArray(vertexArray: Int): IO[F, Unit] | |
def drawBuffers(num: Int, buffers: Seq[ColorOutputTarget]): IO[F, Unit] | |
private[es3] def clearBufferfi(target: Channel, drawBuffer: Int, depth: Float, stencil: Int): IO[F, Unit] | |
private[es3] def clearBufferiv(target: Channel, drawBuffer: Int, value: Array[Int]): IO[F, Unit] | |
private[es3] def clearBufferuiv(target: Channel, drawBuffer: Int, value: Array[Int]): IO[F, Unit] | |
private[es3] def clearBufferfv(target: Channel, drawBuffer: Int, value: Array[Float]): IO[F, Unit] | |
def clearBuffer(target: GL_COLOR.type, drawBuffer: DrawBuffer, red: Float, green: Float, blue: Float, alpha: Float): IO[F, Unit] = clearBufferfv(target, drawBuffer.n, Array(red, green, blue, alpha)) | |
def clearBuffer(target: GL_COLOR.type, drawBuffer: DrawBuffer, red: Int, green: Int, blue: Int, alpha: Int): IO[F, Unit] = clearBufferiv(target, drawBuffer.n, Array(red, green, blue, alpha)) | |
def clearBuffer(target: GL_DEPTH.type, value: Float): IO[F, Unit] = clearBufferfv(target, 0, Array(value)) | |
def clearBuffer(target: GL_STENCIL.type, value: Int): IO[F, Unit] = clearBufferiv(target, 0, Array(value)) | |
def clearBuffer(target: GL_DEPTH_STENCIL.type, depth: Float, stencil: Int): IO[F, Unit] = clearBufferfi(target, 0, depth, stencil) | |
// TODO: Need to tag unsigned Ints since they are so common! | |
def clearBufferu(target: GL_COLOR.type, drawBuffer: DrawBuffer, red: Int, green: Int, blue: Int, alpha: Int): IO[F, Unit] = clearBufferuiv(target, drawBuffer.n, Array(red, green, blue, alpha)) | |
def readBuffer(src: DrawBuffer): IO[F, Unit] | |
def drawElementsInstanced(mode: PrimitiveType, count: Int, `type`: IndexType, offset: Int, primCount: Int): IO[F, Unit] | |
def drawElementsInstanced(mode: PrimitiveType, count: Int, `type`: IndexType, ptr: Buffer, primCount: Int): IO[F, Unit] | |
def bindAttribLocation(program: Int, index: Int, name: String): IO[F, Unit] | |
def blendColor(red: Float, green: Float, blue: Float, alpha: Float): IO[F, Unit] | |
// uniform(1, v"3f 3f") |+| enable(GL_DEPTH_TEST) | |
// def uniform(location: Int, value: Vec2i): IO[F, Unit] = | |
} | |
@scala.annotation.implicitNotFound("Cannot find update of type $A") | |
trait CanUniformUpdate[F[_], A] { | |
def apply(gl: GL[F])(at: Int, value: A): IO[F, Unit] | |
} | |
object CanUniformUpdate { | |
implicit def intCanUniformUpdate[F[_]]: CanUniformUpdate[F, Int] = new CanUniformUpdate[F, Int] { | |
def apply(gl: GL[F])(at: Int, value: Int): IO[F, Unit] = gl.uniform1i(at, value) | |
} | |
implicit def floatCanUniformUpdate[F[_]]: CanUniformUpdate[F, Float] = new CanUniformUpdate[F, Float] { | |
def apply(gl: GL[F])(at: Int, value: Float): IO[F, Unit] = gl.uniform1f(at, value) | |
} | |
implicit def vec2iCanUniformUpdate[F[_]]: CanUniformUpdate[F, Vec2i] = new CanUniformUpdate[F, Vec2i] { | |
def apply(gl: GL[F])(at: Int, value: Vec2i): IO[F, Unit] = gl.uniform2i(at, value.x, value.y) | |
} | |
implicit def vec3iCanUniformUpdate[F[_]]: CanUniformUpdate[F, Vec3i] = new CanUniformUpdate[F, Vec3i] { | |
def apply(gl: GL[F])(at: Int, value: Vec3i): IO[F, Unit] = gl.uniform3i(at, value.x, value.y, value.z) | |
} | |
implicit def vec4iCanUniformUpdate[F[_]]: CanUniformUpdate[F, Vec4i] = new CanUniformUpdate[F, Vec4i] { | |
def apply(gl: GL[F])(at: Int, value: Vec4i): IO[F, Unit] = gl.uniform4i(at, value.x, value.y, value.z, value.w) | |
} | |
implicit def vec2fCanUniformUpdate[F[_]]: CanUniformUpdate[F, Vec2f] = new CanUniformUpdate[F, Vec2f] { | |
def apply(gl: GL[F])(at: Int, value: Vec2f): IO[F, Unit] = gl.uniform2f(at, value.x, value.y) | |
} | |
implicit def vec3fCanUniformUpdate[F[_]]: CanUniformUpdate[F, Vec3f] = new CanUniformUpdate[F, Vec3f] { | |
def apply(gl: GL[F])(at: Int, value: Vec3f): IO[F, Unit] = gl.uniform3f(at, value.x, value.y, value.z) | |
} | |
implicit def vec4fCanUniformUpdate[F[_]]: CanUniformUpdate[F, Vec4f] = new CanUniformUpdate[F, Vec4f] { | |
def apply(gl: GL[F])(at: Int, value: Vec4f): IO[F, Unit] = gl.uniform4f(at, value.x, value.y, value.z, value.w) | |
} | |
implicit def mat2fCanUniformUpdate[F[_]]: CanUniformUpdate[F, Mat2f] = new CanUniformUpdate[F, Mat2f] { | |
def apply(gl: GL[F])(at: Int, value: Mat2f): IO[F, Unit] = gl.uniformMatrix2fv(at, 1, false, value.toArray) | |
} | |
implicit def mat3fCanUniformUpdate[F[_]]: CanUniformUpdate[F, Mat3f] = new CanUniformUpdate[F, Mat3f] { | |
def apply(gl: GL[F])(at: Int, value: Mat3f): IO[F, Unit] = gl.uniformMatrix3fv(at, 1, false, value.toArray) | |
} | |
implicit def mat4fCanUniformUpdate[F[_]]: CanUniformUpdate[F, Mat4f] = new CanUniformUpdate[F, Mat4f] { | |
def apply(gl: GL[F])(at: Int, value: Mat4f): IO[F, Unit] = gl.uniformMatrix4fv(at, 1, false, value.toArray) | |
} | |
} | |
object GL { | |
val noEffect: GL[Id] = NoEffectRunning | |
/*def log(logCfg: LoggerConfig): GL[Logger[Id, ?]] = new StaticLogging(logCfg, noEffect) | |
def debugAndLog(debugCfg: DebuggerConfig, logCfg: LoggerConfig): GL[Debugger[Logger[Id, ?], ?]] = | |
new StaticDebugging[Logger[Id, ?]](log(logCfg))(Applicative[Logger[Id, ?]], xorTMonoid[Logger[Id, ?], String, Unit], XorT.xorTMonadError[Logger[Id, ?], String])*/ | |
/* | |
Logger config for specifying which methods to log and verbosity | |
*/ | |
case class LoggerConfig(filtered: Set[String]) | |
/* | |
Debugging config for specifying which methods to debug | |
*/ | |
case class DebuggerConfig() | |
type IO[F[_], A] = ReaderT[F, Lib, A] | |
type Logger[F[_], A] = WriterT[F, List[String], A] | |
type Debugger[F[_], A] = XorT[F, String, A] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package iliad | |
package platform | |
package gl | |
package es3 | |
import java.nio._ | |
trait Lib { | |
def glBlitFramebuffer(srcX0: Int, srcY0: Int, srcX1: Int, srcY1: Int, destX0: Int, destY0: Int, destX1: Int, destY1: Int, bitMask: Int, filter: Int): Unit | |
def glViewport(x: Int, y: Int, width: Int, height: Int): Unit | |
def glFlush(): Unit | |
def glClear(bitMask: Int): Unit | |
//def glReadPixels(x: Int, y: Int, width: Int, height: Int, format: Int, `type`: Int, data: Buffer): Unit | |
def glClearColor(red: Float, green: Float, blue: Float, alpha: Float): Unit | |
def glEnable(cap: Int): Unit | |
def glDisable(cap: Int): Unit | |
def glGetError(): Int | |
def glCreateShader(`type`: Int): Int | |
def glShaderSource(shader: Int, count: Int, sources: Array[String], lengths: Array[Int]): Unit | |
def glDeleteShader(shader: Int): Unit | |
def glCompileShader(shader: Int): Unit | |
def glAttachShader(program: Int, shader: Int): Unit | |
def glGetShaderiv(shader: Int, pname: Int, ptr: IntBuffer): Unit | |
def glGetShaderInfoLog(shader: Int, maxLength: Int, length: IntBuffer, infoLog: ByteBuffer): Unit | |
def glCreateProgram(): Int | |
def glUseProgram(program: Int): Unit | |
def glLinkProgram(program: Int): Unit | |
// def glGetProgramiv(pid: Int, name: Int, ptr: IntBuffery): Unit | |
def glGenBuffers(num: Int, ptr: IntBuffer): Unit | |
def glBindBuffer(target: Int, buffer: Int): Unit | |
def glBufferData(target: Int, size: Int, data: Buffer, usage: Int): Unit | |
def glBufferSubData(target: Int, offset: Int, size: Int, data: Buffer): Unit | |
def glEnableVertexAttribArray(location: Int): Unit | |
def glVertexAttribPointer(location: Int, size: Int, `type`: Int, normalized: Boolean, stride: Int, offset: Int): Unit | |
def glGenFramebuffers(num: Int, ptr: IntBuffer): Unit | |
def glBindFramebuffer(target: Int, framebuffer: Int): Unit | |
def glFramebufferRenderbuffer(target: Int, attachment: Int, renderbufferTarget: Int, renderbuffer: Int): Unit | |
def glCheckFramebufferStatus(target: Int): Int | |
def glFramebufferTexture2D(target: Int, attachment: Int, texTarget: Int, texture: Int, level: Int): Unit | |
def glGenRenderbuffers(num: Int, ptr: IntBuffer): Unit | |
def glBindRenderbuffer(target: Int, renderbuffer: Int): Unit | |
def glRenderbufferStorage(target: Int, format: Int, width: Int, height: Int): Unit | |
def glBindTexture(target: Int, texture: Int): Unit | |
def glGenTextures(num: Int, ptr: IntBuffer): Unit | |
def glTexParameteri(target: Int, name: Int, value: Int): Unit | |
def glTexImage2D(target: Int, level: Int, internalFormat: Int, width: Int, height: Int, border: Int, format: Int, `type`: Int, data: Buffer): Unit | |
def glPixelStorei(name: Int, value: Int): Unit | |
def glActiveTexture(texture: Int): Unit | |
def glDrawArrays(mode: Int, first: Int, count: Int): Unit | |
def glDrawElements(mode: Int, count: Int, `type`: Int, offset: Int): Unit | |
def glDrawElements(mode: Int, count: Int, `type`: Int, indices: Buffer): Unit | |
def glUniform1i(location: Int, arg0: Int): Unit | |
def glUniform1f(location: Int, arg0: Float): Unit | |
def glUniform1fv(location: Int, count: Int, ptr: Array[Float]): Unit | |
def glUniform1iv(location: Int, count: Int, ptr: Array[Int]): Unit | |
def glUniform2i(location: Int, arg0: Int, arg1: Int): Unit | |
def glUniform2f(location: Int, arg0: Float, arg1: Float): Unit | |
def glUniform2fv(location: Int, count: Int, ptr: Array[Float]): Unit | |
def glUniform2iv(location: Int, count: Int, ptr: Array[Int]): Unit | |
def glUniform3i(location: Int, arg0: Int, arg1: Int, arg2: Int): Unit | |
def glUniform3f(location: Int, arg0: Float, arg1: Float, arg2: Float): Unit | |
def glUniform3fv(location: Int, count: Int, ptr: Array[Float]): Unit | |
def glUniform3iv(location: Int, count: Int, ptr: Array[Int]): Unit | |
def glUniform4i(location: Int, arg0: Int, arg1: Int, arg2: Int, arg3: Int): Unit | |
def glUniform4f(location: Int, arg0: Float, arg1: Float, arg2: Float, arg3: Float): Unit | |
def glUniform4fv(location: Int, count: Int, ptr: Array[Float]): Unit | |
def glUniform4iv(location: Int, count: Int, ptr: Array[Int]): Unit | |
def glUniformMatrix2fv(location: Int, count: Int, transpose: Boolean, arg0: Array[Float]): Unit | |
def glUniformMatrix3fv(location: Int, count: Int, transpose: Boolean, arg0: Array[Float]): Unit | |
def glUniformMatrix4fv(location: Int, count: Int, transpose: Boolean, arg0: Array[Float]): Unit | |
def glGetAttribLocation(pid: Int, name: String): Int | |
def glGetUniformLocation(pid: Int, name: String): Int | |
// def glGetIntegerv(name: Int, ptr: IntBuffer): Unit | |
def glGenSamplers(num: Int, buffer: IntBuffer): Unit | |
def glSamplerParameteri(sid: Int, name: Int, arg0: Int): Unit | |
def glBindSampler(tid: Int, sid: Int): Unit | |
def glCopyBufferSubData(readTarget: Int, writeTarget: Int, readOffset: Int, writeOffset: Int, size: Int): Unit | |
def glBindVertexArray(vid: Int): Unit | |
def glDrawBuffers(num: Int, buffers: IntBuffer): Unit | |
def glReadBuffer(num: Int): Unit | |
def glDrawElementsInstanced(mode: Int, count: Int, `type`: Int, offset: Int, primCount: Int): Unit | |
def glDrawElementsInstanced(mode: Int, count: Int, `type`: Int, ptr: Buffer, primCount: Int): Unit | |
def glBindAttribLocation(program: Int, index: Int, name: String): Unit | |
def glBlendColor(red: Float, green: Float, blue: Float, alpha: Float): Unit | |
// def glBlendEquation(mode: Int): Unit | |
// def glBlendEquationSeparate(modeRGB: Int, modeAlpha: Int): Unit | |
// def glBlendFunc(sfactor: Int, dfactor: Int): Unit | |
// def glBlendFuncSeparate(sfactorRGB: Int, dfactorRGB: Int, sfactorAlpha: Int, dfactorAlpha: Int): Unit | |
// def glClearDepthf(d: Float): Unit | |
// def glClearStencil(s: Int): Unit | |
// def glColorMask(red: Boolean, green: Boolean, blue: Boolean, alpha: Boolean): Unit | |
// def glCompressedTexImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, imageSize: Int, data: Buffer): Unit | |
// def glCompressedTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, imageSize: Int, data: Buffer): Unit | |
// def glCopyTexImage2D(target: Int, level: Int, internalformat: Int, x: Int, y: Int, width: Int, height: Int, border: Int): Unit | |
// def glCopyTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, x: Int, y: Int, width: Int, height: Int): Unit | |
// def glCullFace(mode: Int): Unit | |
// def glDeleteBuffers(n: Int, buffers: Array[Int]): Unit | |
// def glDeleteFramebuffers(n: Int, framebuffers: Array[Int]): Unit | |
// def glDeleteProgram(program: Int): Unit | |
// def glDeleteRenderbuffers(n: Int, renderbuffers: Array[Int]): Unit | |
// def glDeleteTextures(n: Int, textures: Array[Int]): Unit | |
// def glDepthFunc(funcxbb: Int): Unit | |
// def glDepthMask(flag: Boolean): Unit | |
// def glDepthRangef(n: Float, f: Float): Unit | |
// def glDetachShader(program: Int, shader: Int): Unit | |
// def glDisableVertexAttribArray(index: Int): Unit | |
// def glDrawElements(mode: Int, count: Int, `type`: Int, indices: Buffer): Unit | |
// def glFinish(): Unit | |
// def glFrontFace(mode: Int): Unit | |
// def glGenerateMipmap(target: Int): Unit | |
// def glGetActiveAttrib(program: Int, index: Int, bufSize: Int, length: IntBuffer, size: IntBuffer, `type`: IntBuffer, name: Buffer): Unit | |
// def glGetActiveUniform(program: Int, index: Int, bufSize: Int, length: IntBuffer, size: IntBuffer, `type`: IntBuffer, name: Buffer): Unit | |
// def glGetAttachedShaders(program: Int, maxCount: Int, count: IntBuffer, shaders: IntBuffer): Unit | |
// def glGetBooleanv(pname: Int, data: IntBuffer): Unit | |
// def glGetBufferParameteriv(target: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetFloatv(pname: Int, data: FloatBuffer): Unit | |
// def glGetFramebufferAttachmentParameteriv(target: Int, attachment: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetProgramInfoLog(program: Int, bufSize: Int, length: IntBuffer, infoLog: Buffer): Unit | |
// def glGetRenderbufferParameteriv(target: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetShaderInfoLog(shader: Int, bufSize: Int, length: IntBuffer, infoLog: Buffer): Unit | |
// def glGetShaderPrecisionFormat(shadertype: Int, precisiontype: Int, range: IntBuffer, precision: IntBuffer): Unit | |
// def glGetShaderSource(shader: Int, bufSize: Int, length: IntBuffer, source: Buffer): Unit | |
// def glGetString(name: Int): String | |
// def glGetTexParameterfv(target: Int, pname: Int, params: FloatBuffer): Unit | |
// def glGetTexParameteriv(target: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetUniformfv(program: Int, location: Int, params: FloatBuffer): Unit | |
// def glGetUniformiv(program: Int, location: Int, params: IntBuffer): Unit | |
// def glGetVertexAttribPointerv(index: Int, pname: Int, pointer: Array[Buffer]): Unit | |
// def glGetVertexAttribfv(index: Int, pname: Int, params: FloatBuffer): Unit | |
// def glGetVertexAttribiv(index: Int, pname: Int, params: IntBuffer): Unit | |
// def glHint(target: Int, mode: Int): Unit | |
// def glIsBuffer(buffer: Int): Boolean | |
// def glIsEnabled(cap: Int): Boolean | |
// def glIsFramebuffer(framebuffer: Int): Boolean | |
// def glIsProgram(program: Int): Boolean | |
// def glIsRenderbuffer(renderbuffer: Int): Boolean | |
// def glIsShader(shader: Int): Boolean | |
// def glIsTexture(texture: Int): Boolean | |
// def glLineWidth(width: Float): Unit | |
// def glPolygonOffset(factor: Float, units: Float): Unit | |
// def glReadPixels(x: Int, y: Int, width: Int, height: Int, format: Int, `type`: Int, pixels: Buffer): Unit | |
// def glReleaseShaderCompiler(): Unit | |
// def glSampleCoverage(value: Float, invert: Boolean): Unit | |
// def glScissor(x: Int, y: Int, width: Int, height: Int): Unit | |
// def glShaderBinary(count: Int, shaders: Array[Int], binaryformat: Int, binary: Buffer, length: Int): Unit | |
// def glShaderSource(shader: Int, count: Int, string: Array[String], length: Array[Int]): Unit | |
// def glStencilFunc(func: Int, ref: Int, mask: Int): Unit | |
// def glStencilFuncSeparate(face: Int, func: Int, ref: Int, mask: Int): Unit | |
// def glStencilMask(mask: Int): Unit | |
// def glStencilMaskSeparate(face: Int, mask: Int): Unit | |
// def glStencilOp(fail: Int, zfail: Int, zpass: Int): Unit | |
// def glStencilOpSeparate(face: Int, sfail: Int, dpfail: Int, dppass: Int): Unit | |
// def glTexParameterf(target: Int, pname: Int, param: Float): Unit | |
// def glTexParameterfv(target: Int, pname: Int, params: Array[Float]): Unit | |
// def glTexParameteriv(target: Int, pname: Int, params: Array[Int]): Unit | |
// def glTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, `type`: Int, pixels: Buffer): Unit | |
// def glUniform1fv(location: Int, count: Int, value: Array[Float]): Unit | |
// def glUniform1iv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniform2fv(location: Int, count: Int, value: Array[Float]): Unit | |
// def glUniform2iv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniform3fv(location: Int, count: Int, value: Array[Float]): Unit | |
// def glUniform3iv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniform4fv(location: Int, count: Int, value: Array[Float]): Unit | |
// def glUniform4iv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniformMatrix2fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUniformMatrix3fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUniformMatrix4fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glValidateProgram(program: Int): Unit | |
// def glVertexAttrib1f(index: Int, x: Float): Unit | |
// def glVertexAttrib1fv(index: Int, v: Array[Float]): Unit | |
// def glVertexAttrib2f(index: Int, x: Float, y: Float): Unit | |
// def glVertexAttrib2fv(index: Int, v: Array[Float]): Unit | |
// def glVertexAttrib3f(index: Int, x: Float, y: Float, z: Float): Unit | |
// def glVertexAttrib3fv(index: Int, v: Array[Float]): Unit | |
// def glVertexAttrib4f(index: Int, x: Float, y: Float, z: Float, w: Float): Unit | |
// def glVertexAttrib4fv(index: Int, v: Array[Float]): Unit | |
// def glVertexAttribPointer(index: Int, size: Int, `type`: Int, normalized: Boolean, stride: Int, pointer: Buffer): Unit | |
// def glVertexAttribIPointer(index: Int, size: Int, `type`: Int, stride: Int, offset: Int): Unit | |
// def glBeginQuery(target: Int, id: Int): Unit | |
// def glBeginTransformFeedback(primitiveMode: Int): Unit | |
// def glBindBufferBase(target: Int, index: Int, buffer: Int): Unit | |
// def glBindBufferRange(target: Int, index: Int, buffer: Int, offset: Int, size: Int): Unit | |
// def glBindTransformFeedback(target: Int, id: Int): Unit | |
def glClearBufferfi(buffer: Int, drawbuffer: Int, depth: Float, stencil: Int): Unit | |
def glClearBufferfv(buffer: Int, drawbuffer: Int, value: Array[Float]): Unit | |
def glClearBufferiv(buffer: Int, drawbuffer: Int, value: Array[Int]): Unit | |
def glClearBufferuiv(buffer: Int, drawbuffer: Int, value: Array[Int]): Unit | |
// def glClientWaitSync(sync: Long, flags: Int, timeout: Long): Int | |
// def glCompressedTexImage3D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, depth: Int, border: Int, imageSize: Int, data: Buffer): Unit | |
// def glCompressedTexSubImage3D(target: Int, level: Int, xoffset: Int, yoffset: Int, zoffset: Int, width: Int, height: Int, depth: Int, format: Int, imageSize: Int, data: Buffer): Unit | |
// def glCopyTexSubImage3D(target: Int, level: Int, xoffset: Int, yoffset: Int, zoffset: Int, x: Int, y: Int, width: Int, height: Int): Unit | |
// def glDeleteQueries(n: Int, ids: Array[Int]): Unit | |
// def glDeleteSamplers(count: Int, samplers: Array[Int]): Unit | |
// def glDeleteSync(sync: Long): Unit | |
// def glDeleteTransformFeedbacks(n: Int, ids: Array[Int]): Unit | |
// def glDeleteVertexArrays(n: Int, arrays: Array[Int]): Unit | |
// def glDrawArraysInstanced(mode: Int, first: Int, count: Int, instancecount: Int): Unit | |
// def glDrawElementsInstanced(mode: Int, count: Int, `type`: Int, indices: Buffer, instancecount: Int): Unit | |
// def glDrawRangeElements(mode: Int, start: Int, end: Int, count: Int, `type`: Int, offset: Int): Unit | |
// def glDrawRangeElements(mode: Int, start: Int, end: Int, count: Int, `type`: Int, indices: Buffer): Unit | |
// def glEndQuery(target: Int): Unit | |
// def glEndTransformFeedback(): Unit | |
// def glFenceSync(condition: Int, flags: Int): Long | |
// def glFlushMappedBufferRange(target: Int, offset: Int, length: Int): Unit | |
// def glFramebufferTextureLayer(target: Int, attachment: Int, texture: Int, level: Int, layer: Int): Unit | |
// def glGenQueries(n: Int, ids: IntBuffer): Unit | |
// def glGenTransformFeedbacks(n: Int, ids: IntBuffer): Unit | |
// def glGenVertexArrays(n: Int, arrays: IntBuffer): Unit | |
// def glGetActiveUniformBlockName(program: Int, uniformBlockIndex: Int, bufSize: Int, legnth: IntBuffer, uniformBlockName: Buffer): Unit | |
// def glGetActiveUniformBlockiv(program: Int, uniformBlockIndex: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetActiveUniformsiv(program: Int, uniformCount: Int, uniformIndices: Array[Int], pname: Int, params: IntBuffer): Unit | |
// def glGetBufferParameteri64v(target: Int, pname: Int, params: LongBuffer): Unit | |
// def glGetBufferPointerv(target: Int, pname: Int, params: Array[Buffer]): Unit | |
// def glGetFragDataLocation(program: Int, name: String): Int | |
// def glGetInteger64i_v(target: Int, index: Int, data: LongBuffer): Unit | |
// def glGetInteger64v(pname: Int, data: LongBuffer): Unit | |
// def glGetIntegeri_v(target: Int, index: Int, data: IntBuffer): Unit | |
// def glGetInternalformativ(target: Int, internalformat: Int, pname: Int, bufSize: Int, params: IntBuffer): Unit | |
// def glGetProgramBinary(program: Int, bufSize: Int, legnth: IntBuffer, binaryFormat: IntBuffer, binary: Buffer): Unit | |
// def glGetQueryObjectuiv(id: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetQueryiv(target: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetSamplerParameterfv(sampler: Int, pname: Int, params: FloatBuffer): Unit | |
// def glGetSamplerParameteriv(sampler: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetStringi(name: Int, index: Int): String | |
// def glGetSynciv(sync: Long, pname: Int, bufSize: Int, legnth: IntBuffer, values: IntBuffer): Unit | |
// def glGetTransformFeedbackVarying(program: Int, index: Int, bufSize: Int, legnth: IntBuffer, size: IntBuffer, `type`: IntBuffer, name: Buffer): Unit | |
// def glGetUniformBlockIndex(program: Int, uniformBlockName: String): Int | |
// def glGetUniformIndices(program: Int, uniformCount: Int, uniformNames: Array[String], uniformIndices: IntBuffer): Unit | |
// def glGetUniformuiv(program: Int, location: Int, params: IntBuffer): Unit | |
// def glGetVertexAttribIiv(index: Int, pname: Int, params: IntBuffer): Unit | |
// def glGetVertexAttribIuiv(index: Int, pname: Int, params: IntBuffer): Unit | |
// def glInvalidateFramebuffer(target: Int, numAttachments: Int, attachments: IntBuffer): Unit | |
// def glInvalidateSubFramebuffer(target: Int, numAttachments: Int, attachments: IntBuffer, x: Int, y: Int, width: Int, height: Int): Unit | |
// def glIsQuery(id: Int): Boolean | |
// def glIsSampler(sampler: Int): Boolean | |
// def glIsSync(sync: Long): Boolean | |
// def glIsTransformFeedback(id: Int): Boolean | |
// def glIsVertexArray(array: Int): Boolean | |
// def glMapBufferRange(target: Int, offset: Int, length: Int, access: Int): Buffer | |
// def glPauseTransformFeedback(): Unit | |
// def glProgramBinary(program: Int, binaryFormat: Int, binary: Buffer, length: Int): Unit | |
// def glProgramParameteri(program: Int, pname: Int, value: Int): Unit | |
// def glRenderbufferStorageMultisample(target: Int, samples: Int, internalformat: Int, width: Int, height: Int): Unit | |
// def glResumeTransformFeedback(): Unit | |
// def glSamplerParameterf(sampler: Int, pname: Int, param: Float): Unit | |
// def glSamplerParameterfv(sampler: Int, pname: Int, param: Array[Float]): Unit | |
// def glSamplerParameteriv(sampler: Int, pname: Int, param: Array[Int]): Unit | |
// def glTexImage3D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, depth: Int, border: Int, format: Int, `type`: Int, pixels: Buffer): Unit | |
// def glTexStorage2D(target: Int, levels: Int, internalformat: Int, width: Int, height: Int): Unit | |
// def glTexStorage3D(target: Int, levels: Int, internalformat: Int, width: Int, height: Int, depth: Int): Unit | |
// def glTexSubImage3D(target: Int, level: Int, xoffset: Int, yoffset: Int, zoffset: Int, width: Int, height: Int, depth: Int, format: Int, `type`: Int, pixels: Buffer): Unit | |
// def glTransformFeedbackVaryings(program: Int, count: Int, varyings: Array[String], bufferMode: Int): Unit | |
// def glUniform1ui(location: Int, v0: Int): Unit | |
// def glUniform1uiv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniform2ui(location: Int, v0: Int, v1: Int): Unit | |
// def glUniform2uiv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniform3ui(location: Int, v0: Int, v1: Int, v2: Int): Unit | |
// def glUniform3uiv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniform4ui(location: Int, v0: Int, v1: Int, v2: Int, v3: Int): Unit | |
// def glUniform4uiv(location: Int, count: Int, value: Array[Int]): Unit | |
// def glUniformBlockBinding(program: Int, uniformBlockIndex: Int, uniformBlockBinding: Int): Unit | |
// def glUniformMatrix2x3fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUniformMatrix2x4fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUniformMatrix3x2fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUniformMatrix3x4fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUniformMatrix4x2fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUniformMatrix4x3fv(location: Int, count: Int, transpose: Boolean, value: Array[Float]): Unit | |
// def glUnmapBuffer(target: Int): Boolean | |
// def glVertexAttribDivisor(index: Int, divisor: Int): Unit | |
// def glVertexAttribI4i(index: Int, x: Int, y: Int, z: Int, w: Int): Unit | |
// def glVertexAttribI4iv(index: Int, v: Array[Int]): Unit | |
// def glVertexAttribI4ui(index: Int, x: Int, y: Int, z: Int, w: Int): Unit | |
// def glVertexAttribI4uiv(index: Int, v: Array[Int]): Unit | |
// def glVertexAttribIPointer(index: Int, size: Int, `type`: Int, stride: Int, pointer: Buffer): Unit | |
// def glWaitSync(sync: Long, flags: Int, timeout: Long): Unit | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package iliad | |
package platform | |
package gl | |
package es3 | |
import java.nio.{IntBuffer, ByteBuffer, Buffer => NBuffer} | |
import imp._ | |
import cats._ | |
import cats.implicits._ | |
import cats.data._ | |
import iliad.io._ | |
import Constant._ | |
import GL._ | |
private[es3] object NoEffectRunning extends GL[Id] { | |
val S: Semigroup[Unit] = imp[Semigroup[Unit]] | |
def blitFramebuffer(src: Rectangle, dest: Rectangle, bitMask: ChannelBitMask, filter: BlitFilter): IO[Id, Unit] = { | |
val sbr = src.bottomRight | |
val dbr = dest.bottomRight | |
Reader(_.glBlitFramebuffer(src.topLeft.x, src.topLeft.y, sbr.x, sbr.y, dest.topLeft.x, dest.topLeft.y, dbr.x, dbr.y, bitMask.toInt, filter.toInt)) | |
} | |
def viewport(rect: Rectangle): IO[Id, Unit] = Reader(_.glViewport(rect.topLeft.x, rect.topLeft.y, rect.width, rect.height)) | |
def enable(cap: Capability): IO[Id, Unit] = Reader(_.glEnable(cap.toInt)) | |
def disable(cap: Capability): IO[Id, Unit] = Reader(_.glDisable(cap.toInt)) | |
def flush: IO[Id, Unit] = Reader(_.glFlush()) | |
def clear(bitMask: ChannelBitMask): IO[Id, Unit] = Reader(_.glClear(bitMask.toInt)) | |
def clearColor(red: Float, green: Float, blue: Float, alpha: Float): IO[Id, Unit] = Reader(_.glClearColor(red, green, blue, alpha)) | |
def getError: IO[Id, Error] = Reader(gl => Error(gl.glGetError())) | |
def createShader(`type`: ShaderType): IO[Id, Int] = Reader(_.glCreateShader(`type`.toInt)) | |
def shaderSource(shader: Int, count: Int, sources: Seq[String]): IO[Id, Unit] = { | |
val ls = sources.map(_.size).toArray | |
Reader(_.glShaderSource(shader, count, sources.toArray, ls)) | |
} | |
def deleteShader(shader: Int): IO[Id, Unit] = Reader(_.glDeleteShader(shader)) | |
def compileShader(shader: Int): IO[Id, Unit] = Reader(_.glCompileShader(shader)) | |
def attachShader(program: Int, shader: Int): IO[Id, Unit] = Reader(_.glAttachShader(program, shader)) | |
def getShaderiv(shader: Int, pname: ShaderParameter): IO[Id, Int] = Reader { gl => | |
val ptr = Buffer.allocate[Int, IntBuffer](1) | |
gl.glGetShaderiv(shader, pname.toInt, ptr) | |
ptr.get() | |
} | |
def getShaderInfoLog(shader: Int, maxLength: Int): IO[Id, String] = Reader { gl => | |
val lenPtr = Buffer.allocate[Int, IntBuffer](1) | |
val logPtr = Buffer.allocate[Byte, ByteBuffer](maxLength) | |
gl.glGetShaderInfoLog(shader, maxLength, lenPtr, logPtr) | |
val len = lenPtr.get() | |
val arr = new Array[Byte](len) | |
logPtr.get(arr, 0, len) | |
new String(arr) | |
} | |
def createProgram: IO[Id, Int] = Reader(_.glCreateProgram()) | |
def useProgram(program: Int): IO[Id, Unit] = Reader(_.glUseProgram(program)) | |
def linkProgram(program: Int): IO[Id, Unit] = Reader(_.glLinkProgram(program)) | |
//nasty but the signature of gen means the alternatives are worse! | |
private def genObject(f: Lib => (Int, IntBuffer) => Unit, num: Int): IO[Id, Array[Int]] = Reader { gl => | |
val ptr = Buffer.allocate[Int, IntBuffer](num) | |
f(gl)(num, ptr) | |
val arr = new Array[Int](num) | |
ptr.get(arr, 0, num) | |
arr | |
} | |
def genBuffers(num: Int): IO[Id, Array[Int]] = genObject(_.glGenBuffers, num) | |
def bindBuffer(target: BufferTarget, buffer: Int): IO[Id, Unit] = Reader(_.glBindBuffer(target.toInt, buffer)) | |
def bufferData(target: BufferTarget, size: Int, data: NBuffer, usage: BufferUsage): IO[Id, Unit] = Reader(_.glBufferData(target.toInt, size, data, usage.toInt)) | |
def bufferSubData(target: BufferTarget, offset: Int, size: Int, data: NBuffer): IO[Id, Unit] = Reader(_.glBufferSubData(target.toInt, offset, size, data)) | |
def enableVertexAttribArray(location: Int): IO[Id, Unit] = Reader(_.glEnableVertexAttribArray(location)) | |
def vertexAttribPointer(location: Int, size: Int, `type`: VertexAttribType, normalized: Boolean, stride: Int, offset: Int): IO[Id, Unit] = Reader(_.glVertexAttribPointer(location, size, `type`.toInt, normalized, stride, offset)) | |
def genFramebuffers(num: Int): IO[Id, Array[Int]] = genObject(_.glGenFramebuffers, num) | |
def bindFramebuffer(target: FramebufferTarget, framebuffer: Int): IO[Id, Unit] = Reader(_.glBindFramebuffer(target.toInt, framebuffer)) | |
def framebufferRenderbuffer(target: FramebufferTarget, attachment: FramebufferAttachment, renderbuffer: Int): IO[Id, Unit] = Reader(_.glFramebufferRenderbuffer(target.toInt, attachment.toInt, GL_RENDERBUFFER.toInt, renderbuffer)) | |
def checkFramebufferStatus(target: FramebufferTarget): IO[Id, FramebufferStatus] = Reader[Lib, Unit](_.glCheckFramebufferStatus(target.toInt)).map(c => SealedEnum.values[FramebufferStatus].find(_.toInt == c).get) | |
def framebufferTexture2D(target: FramebufferTarget, attachment: FramebufferAttachment, texTarget: FramebufferTexTarget, texture: Int, level: Int): IO[Id, Unit] = Reader(_.glFramebufferTexture2D(target.toInt, attachment.toInt, texTarget.toInt, texture, level)) | |
def genRenderbuffers(num: Int): IO[Id, Array[Int]] = genObject(_.glGenRenderbuffers, num) | |
def bindRenderbuffer(renderbuffer: Int): IO[Id, Unit] = Reader(_.glBindBuffer(GL_RENDERBUFFER.toInt, renderbuffer)) | |
def renderbufferStorage(format: RenderbufferInternalFormat, width: Int, height: Int): IO[Id, Unit] = Reader(_.glRenderbufferStorage(GL_RENDERBUFFER.toInt, format.toInt, width, height)) | |
def bindTexture(target: TextureTarget, texture: Int): IO[Id, Unit] = Reader(_.glBindTexture(target.toInt, texture)) | |
def genTextures(num: Int): IO[Id, Array[Int]] = genObject(_.glGenTextures, num) | |
def texParameteri(target: TextureTarget, name: TextureParameter, value: Int): IO[Id, Unit] = Reader(_.glTexParameteri(target.toInt, name.toInt, value)) | |
def texParameteri(target: TextureTarget, name: TextureParameter, value: IntValue): IO[Id, Unit] = Reader(_.glTexParameteri(target.toInt, name.toInt, value.toInt)) | |
def texImage2D(target: TextureTarget, level: Int, internalFormat: TextureInteralFormat, width: Int, height: Int, format: TextureFormat, `type`: TexturePixelType, data: NBuffer): IO[Id, Unit] = Reader(_.glTexImage2D(target.toInt, level, internalFormat.toInt, width, height, 0, internalFormat.toInt, `type`.toInt, data)) | |
def pixelStorei(name: PixelStoreParameter, value: Int): IO[Id, Unit] = Reader(_.glPixelStorei(name.toInt, value)) | |
def activeTexture(texture: Int): IO[Id, Unit] = Reader(_.glActiveTexture(texture)) | |
def drawArrays(mode: PrimitiveType, first: Int, count: Int): IO[Id, Unit] = Reader(_.glDrawArrays(mode.toInt, first, count)) | |
def drawElements(mode: PrimitiveType, count: Int, `type`: IndexType, offset: Int): IO[Id, Unit] = Reader(_.glDrawElements(mode.toInt, count, `type`.toInt, offset)) | |
def drawElements(mode: PrimitiveType, count: Int, `type`: IndexType, indices: NBuffer): IO[Id, Unit] = Reader(_.glDrawElements(mode.toInt, count, `type`.toInt, indices)) | |
def uniform1i(location: Int, arg0: Int): IO[Id, Unit] = Reader(_.glUniform1i(location, arg0)) | |
def uniform1f(location: Int, arg0: Float): IO[Id, Unit] = Reader(_.glUniform1f(location, arg0)) | |
def uniform1fv(location: Int, count: Int, arr: Array[Float]): IO[Id, Unit] = Reader(_.glUniform1fv(location, count, arr)) | |
def uniform1iv(location: Int, count: Int, arr: Array[Int]): IO[Id, Unit] = Reader(_.glUniform1iv(location, count, arr)) | |
def uniform2i(location: Int, arg0: Int, arg1: Int): IO[Id, Unit] = Reader(_.glUniform2i(location, arg0, arg0)) | |
def uniform2f(location: Int, arg0: Float, arg1: Float): IO[Id, Unit] = Reader(_.glUniform2f(location, arg0, arg1)) | |
def uniform2fv(location: Int, count: Int, arr: Array[Float]): IO[Id, Unit] = Reader(_.glUniform2fv(location, count, arr)) | |
def uniform2iv(location: Int, count: Int, arr: Array[Int]): IO[Id, Unit] = Reader(_.glUniform2iv(location, count, arr)) | |
def uniform3i(location: Int, arg0: Int, arg1: Int, arg2: Int): IO[Id, Unit] = Reader(_.glUniform3i(location, arg0, arg1, arg2)) | |
def uniform3f(location: Int, arg0: Float, arg1: Float, arg2: Float): IO[Id, Unit] = Reader(_.glUniform3f(location, arg0, arg1, arg2)) | |
def uniform3fv(location: Int, count: Int, arr: Array[Float]): IO[Id, Unit] = Reader(_.glUniform3fv(location, count, arr)) | |
def uniform3iv(location: Int, count: Int, arr: Array[Int]): IO[Id, Unit] = Reader(_.glUniform3iv(location, count, arr)) | |
def uniform4i(location: Int, arg0: Int, arg1: Int, arg2: Int, arg3: Int): IO[Id, Unit] = Reader(_.glUniform4i(location, arg0, arg1, arg2, arg3)) | |
def uniform4f(location: Int, arg0: Float, arg1: Float, arg2: Float, arg3: Float): IO[Id, Unit] = Reader(_.glUniform4f(location, arg0, arg1, arg2, arg3)) | |
def uniform4fv(location: Int, count: Int, arr: Array[Float]): IO[Id, Unit] = Reader(_.glUniform4fv(location, count, arr)) | |
def uniform4iv(location: Int, count: Int, arr: Array[Int]): IO[Id, Unit] = Reader(_.glUniform4iv(location, count, arr)) | |
def uniformMatrix2fv(location: Int, count: Int, transpose: Boolean, arr: Array[Float]): IO[Id, Unit] = Reader(_.glUniformMatrix2fv(location, count, transpose, arr)) | |
def uniformMatrix3fv(location: Int, count: Int, transpose: Boolean, arr: Array[Float]): IO[Id, Unit] = Reader(_.glUniformMatrix3fv(location, count, transpose, arr)) | |
def uniformMatrix4fv(location: Int, count: Int, transpose: Boolean, arr: Array[Float]): IO[Id, Unit] = Reader(_.glUniformMatrix4fv(location, count, transpose, arr)) | |
def getAttribLocation(program: Int, name: String): IO[Id, Int] = Reader(_.glGetAttribLocation(program, name)) | |
def getUniformLocation(program: Int, name: String): IO[Id, Int] = Reader(_.glGetUniformLocation(program, name)) | |
def genSamplers(num: Int): IO[Id, Array[Int]] = genObject(_.glGenSamplers, num) | |
def samplerParameteri(sampler: Int, name: SamplerParameter, value: Int): IO[Id, Unit] = Reader(_.glSamplerParameteri(sampler, name.toInt, value)) | |
def samplerParameteri(sampler: Int, name: SamplerParameter, value: IntValue): IO[Id, Unit] = Reader(_.glSamplerParameteri(sampler, name.toInt, value.toInt)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment