module Gloop::DrawCommands

Overview

Methods for drawing primitives.

See: RenderCommands

Included Modules

Direct including types

Defined in:

gloop/draw_commands.cr

Instance Method Summary

Instance Method Detail

def disable_primitive_restart #

Disables the primitive_restart capability.

  • OpenGL function: glDisable
  • OpenGL enum: GL_PRIMITIVE_RESTART
  • OpenGL version: 2.0

[View source]
def disable_primitive_restart_fixed_index #

Disables the primitive_restart_fixed_index capability.

  • OpenGL function: glDisable
  • OpenGL enum: GL_PRIMITIVE_RESTART_FIXED_INDEX
  • OpenGL version: 4.3

[View source]
def draw_arrays(mode : Primitive, start : Int32, count : Int32) : Nil #

Draws vertices from the currently bound attribute array buffer(s).

  • OpenGL function: glDrawArrays
  • OpenGL version: 2.0

[View source]
def draw_arrays(mode : Primitive, range : Range(Int32, Int32)) : Nil #

Draws vertices from the currently bound attribute array buffer(s).

  • OpenGL function: glDrawArrays
  • OpenGL version: 2.0

[View source]
def draw_elements(mode : Primitive, count : Int32, type : IndexType, offset : Size) : Nil #

Draws vertices based on indices from currently bound attribute and element array buffers.

count is the number of vertices (indices) to render. The offset is a byte offset from the start of the currently bound element array buffer.

  • OpenGL function: glDrawElements
  • OpenGL version: 2.0

[View source]
def draw_elements(mode : Primitive, count : Int32, type : UInt8.class, offset : Size) : Nil #

Draws vertices based on indices from currently bound attribute and element array buffers.

count is the number of vertices (indices) to render. The offset is a byte offset from the start of the currently bound element array buffer.

  • OpenGL function: glDrawElements
  • OpenGL version: 2.0

[View source]
def draw_elements(mode : Primitive, count : Int32, type : UInt16.class, offset : Size) : Nil #

Draws vertices based on indices from currently bound attribute and element array buffers.

count is the number of vertices (indices) to render. The offset is a byte offset from the start of the currently bound element array buffer.

  • OpenGL function: glDrawElements
  • OpenGL version: 2.0

[View source]
def draw_elements(mode : Primitive, count : Int32, type : UInt32.class, offset : Size) : Nil #

Draws vertices based on indices from currently bound attribute and element array buffers.

count is the number of vertices (indices) to render. The offset is a byte offset from the start of the currently bound element array buffer.

  • OpenGL function: glDrawElements
  • OpenGL version: 2.0

[View source]
def enable_primitive_restart #

Enables the primitive_restart capability.

  • OpenGL function: glEnable
  • OpenGL enum: GL_PRIMITIVE_RESTART
  • OpenGL version: 2.0

[View source]
def enable_primitive_restart_fixed_index #

Enables the primitive_restart_fixed_index capability.

  • OpenGL function: glEnable
  • OpenGL enum: GL_PRIMITIVE_RESTART_FIXED_INDEX
  • OpenGL version: 4.3

[View source]
def primitive_restart=(flag) #

Enables or disables the primitive_restart capability depending on flag.


[View source]
def primitive_restart? #

Checks if the primitive_restart capability is enabled.

  • OpenGL function: glIsEnabled
  • OpenGL enum: GL_PRIMITIVE_RESTART
  • OpenGL version: 2.0

[View source]
def primitive_restart_fixed_index=(flag) #

Enables or disables the primitive_restart_fixed_index capability depending on flag.


[View source]
def primitive_restart_fixed_index? #

Checks if the primitive_restart_fixed_index capability is enabled.

  • OpenGL function: glIsEnabled
  • OpenGL enum: GL_PRIMITIVE_RESTART_FIXED_INDEX
  • OpenGL version: 4.3

[View source]
def primitive_restart_index : UInt32 #

Value to treat as non-index and starts a new primitive.

  • OpenGL function: glGetIntegerv
  • OpenGL enum: GL_PRIMITIVE_RESTART_INDEX
  • OpenGL version: 3.1

[View source]
def primitive_restart_index=(index : UInt32) #

Specifies the value of an index to signify starting a new primitive.

  • OpenGL function: glPrimitiveRestartIndex
  • OpenGL version: 3.1

[View source]