Euphoria
Classes | Namespaces | Typedefs | Enumerations | Functions
state.h File Reference
#include "eu/render/constants.h"
#include <optional>

Go to the source code of this file.

Classes

struct  eu::render::State
 A "cache" for the current open gl state. More...
 
struct  eu::render::StateChanger
 A helper class to change both the opengl state and the cache. More...
 

Namespaces

namespace  eu
 
namespace  eu::render
 

Typedefs

using eu::render::BlendMode = std::tuple< Blend, Blend >
 Blend mode state consisting of src and dst blend functions.
 
using eu::render::StencilFunc = std::tuple< Compare, i32, u32 >
 Stencil function state consisiting of the compare function, the ref and the state.
 
using eu::render::StencilOp = std::tuple< StencilAction, StencilAction, StencilAction >
 Stencil operation state consisting of the stencil fail, depth fail and the pass action.
 

Enumerations

enum class  eu::render::Blend {
  eu::render::Blend::zero , eu::render::Blend::one , eu::render::Blend::src_color , eu::render::Blend::one_minus_src_color ,
  eu::render::Blend::dst_color , eu::render::Blend::one_minus_dst_color , eu::render::Blend::src_alpha , eu::render::Blend::one_minus_src_alpha ,
  eu::render::Blend::dst_alpha , eu::render::Blend::one_minus_dst_alpha , eu::render::Blend::constant_color , eu::render::Blend::one_minus_constant_color ,
  eu::render::Blend::constant_alpha , eu::render::Blend::one_minus_constant_alpha , eu::render::Blend::src_alpha_saturate , eu::render::Blend::src1_color ,
  eu::render::Blend::one_minus_src1_color , eu::render::Blend::src1_alpha , eu::render::Blend::one_minus_src1_alpha
}
 
enum class  eu::render::Compare {
  eu::render::Compare::always , eu::render::Compare::never , eu::render::Compare::less , eu::render::Compare::equal ,
  eu::render::Compare::less_equal , eu::render::Compare::greater , eu::render::Compare::not_equal , eu::render::Compare::greater_equal
}
 
enum class  eu::render::CullFace { eu::render::CullFace::front , eu::render::CullFace::back , eu::render::CullFace::front_and_back }
 
enum class  eu::render::RenderMode { eu::render::RenderMode::fill , eu::render::RenderMode::line , eu::render::RenderMode::point }
 
enum class  eu::render::StencilAction {
  eu::render::StencilAction::keep , eu::render::StencilAction::zero , eu::render::StencilAction::replace , eu::render::StencilAction::increase ,
  eu::render::StencilAction::increase_wrap , eu::render::StencilAction::decrease , eu::render::StencilAction::decrease_wrap , eu::render::StencilAction::invert
}
 

Functions

void eu::render::bind_texture_2d (State *states, const Uniform &uniform, const Texture2d &texture)
 
void eu::render::bind_texture_2d (State *states, const Uniform &uniform, const FrameBuffer &texture)
 
void eu::render::bind_texture_cubemap (State *states, const Uniform &uniform, const TextureCubemap &texture)