Render State

Typedefs

typedef struct binocle_render_state binocle_render_state

A snapshot of the current render state At the moment it’s being used only by the sprite batcher to optimize the number of draw calls.

Functions

binocle_render_state binocle_render_state_new(struct sg_image *texture, struct sg_shader *shader)

Creates a new render state Blending is set to default values.

Parameters
  • texture – The current texture

  • shader – The current shader

Returns

the render state

struct binocle_render_state
#include <binocle_render_state.h>

A snapshot of the current render state At the moment it’s being used only by the sprite batcher to optimize the number of draw calls.

Public Members

sg_blend_state blend_mode
kmMat4 transform
sg_image *texture
sg_shader *shader
kmAABB2 viewport