module Gloop::Labelable

Overview

Mix-in for OpenGL object types that support labels.

Types including this module must define #object_type and #name.

See: https://www.khronos.org/opengl/wiki/Debug_Output#Object_names

Included Modules

Direct including types

Defined in:

gloop/labelable.cr

Instance Method Summary

Instance Method Detail

def label : String #

Attempts to retrieve the label set for this object.

If there is no label, an empty string is returned.

  • OpenGL function: glGetObjectLabel
  • OpenGL version: 4.3

[View source]
def label=(label : Nil) #

Removes any previously set label for this object.

  • OpenGL function: glObjectLabel
  • OpenGL version: 4.3

[View source]
def label=(label) #

Sets the label for this object.

The label will be stringified before it is stored.

  • OpenGL function: glObjectLabel
  • OpenGL version: 4.3

[View source]
def max_label_size : Int32 #

Retrieves the maximum length allowed for a label.

  • OpenGL function: glGetIntegerv
  • OpenGL enum: GL_MAX_LABEL_LENGTH
  • OpenGL version: 4.3

[View source]
abstract def name #

Name (identifier) OpenGL uses to reference the object.


[View source]
abstract def object_type #

Enum value corresponding to the OpenGL object type.


[View source]