Utility class to choose an EGLConfig

Introduced properties

protected fun array=(array: Array[Int])

egl :: EGLConfigChooser :: array=

fun choose(display: EGLDisplay): nullable Array[EGLConfig]

egl :: EGLConfigChooser :: choose

protected fun closed=(closed: Bool)

egl :: EGLConfigChooser :: closed=

protected fun inserted_attribs=(inserted_attribs: Array[Int])

egl :: EGLConfigChooser :: inserted_attribs=

fun renderable_type=(flag: Int)

egl :: EGLConfigChooser :: renderable_type=

Set which client rendering APIs are supported
fun renderable_type_egl

egl :: EGLConfigChooser :: renderable_type_egl

Set EGL as the only supported rendering API

Redefined properties

redef type SELF: EGLConfigChooser

egl $ EGLConfigChooser :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
protected fun array=(array: Array[Int])

egl :: EGLConfigChooser :: array=

fun choose(display: EGLDisplay): nullable Array[EGLConfig]

egl :: EGLConfigChooser :: choose

protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
protected fun closed=(closed: Bool)

egl :: EGLConfigChooser :: closed=

fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

protected fun inserted_attribs=(inserted_attribs: Array[Int])

egl :: EGLConfigChooser :: inserted_attribs=

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun renderable_type=(flag: Int)

egl :: EGLConfigChooser :: renderable_type=

Set which client rendering APIs are supported
fun renderable_type_egl

egl :: EGLConfigChooser :: renderable_type_egl

Set EGL as the only supported rendering API
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram egl::EGLConfigChooser EGLConfigChooser core::Object Object egl::EGLConfigChooser->core::Object

Parents

interface Object

core :: Object

The root of the class hierarchy.

Class definitions

egl $ EGLConfigChooser
# Utility class to choose an EGLConfig
class EGLConfigChooser
	var array = new Array[Int]
	var closed = false
	protected var inserted_attribs = new Array[Int]

	protected fun insert_attrib_key(key: Int)
	do
		assert not inserted_attribs.has(key) else
			print "Duplicate attrib passed to EGLConfigChooser"
		end
		array.add key
	end

	protected fun insert_attrib_with_val(key, val: Int)
	do
		insert_attrib_key key
		array.add val
	end

	fun close do
		insert_attrib_key 0x3038
		closed = true
	end

	fun surface_type=(flag: Int) do insert_attrib_with_val(0x3033, flag)
	fun surface_type_egl do surface_type = 4

	# Set which client rendering APIs are supported
	fun renderable_type=(flag: Int) do insert_attrib_with_val(0x3040, flag)

	# Set EGL as the only supported rendering API
	fun renderable_type_egl do renderable_type = 4

	fun blue_size=(size: Int) do insert_attrib_with_val(0x3022, size)
	fun green_size=(size: Int) do insert_attrib_with_val(0x3023, size)
	fun red_size=(size: Int) do insert_attrib_with_val(0x3024, size)

	fun buffer_size=(size: Int) do insert_attrib_with_val(0x3020, size)
	fun alpha_size=(size: Int) do insert_attrib_with_val(0x3021, size)
	fun depth_size=(size: Int) do insert_attrib_with_val(0x3025, size)
	fun stencil_size=(size: Int) do insert_attrib_with_val(0x3026, size)
	fun samples=(count: Int) do insert_attrib_with_val(0x3031, count)
	fun sample_buffers=(size: Int) do insert_attrib_with_val(0x3032, size)

	fun caveat=(caveat: EGLConfigCaveat) do insert_attrib_with_val(0x3050, caveat.to_i)

	fun conformant=(conformant: EGLConformant) do insert_attrib_with_val(0x3042, conformant.to_i)

	fun choose(display: EGLDisplay): nullable Array[EGLConfig]
	do
		assert closed else print "EGLConfigChooser not closed."
		return display.choose_configs(array)
	end
end
lib/egl/egl.nit:390,1--444,3