Euphoria
statechanger.h
Go to the documentation of this file.
1#pragma once
2
3#include "render/blend.h"
4#include "render/compare.h"
5#include "render/cullface.h"
6#include "render/rendermode.h"
8
9namespace eu::render
10{
11struct FrameBuffer;
12struct TextureCubemap;
13struct Texture2d;
14struct Uniform;
15struct OpenglStates;
16
59
60void bind_texture_2d(OpenglStates* states, const Uniform& uniform, const Texture2d& texture);
61void bind_texture_2d(OpenglStates* states, const Uniform& uniform, const FrameBuffer& texture);
62void bind_texture_cubemap(OpenglStates* states, const Uniform& uniform, const TextureCubemap& texture);
63
68} // namespace klotter
void bind_texture_2d(OpenglStates *states, const Uniform &uniform, const Texture2d &texture)
void bind_texture_cubemap(OpenglStates *states, const Uniform &uniform, const TextureCubemap &texture)
std::int32_t i32
Definition ints.h:9
std::uint32_t u32
Definition ints.h:14
A (inclusive) range between two values.
Definition range.h:19
"render to texture" feature
Definition texture.h:118
A "cache" for the current open gl state.
A helper class to change both the opengl state and the cache.
StateChanger(OpenglStates *s)
StateChanger & depth_func(Compare new_state)
StateChanger & blending(bool new_state)
StateChanger & cull_face(bool new_state)
StateChanger & cull_face_mode(CullFace new_state)
StateChanger & render_mode(RenderMode new_state)
StateChanger & stencil_func(Compare func, i32 ref, u32 mask)
StateChanger & depth_mask(bool new_state)
StateChanger & activate_texture(int new_texture)
StateChanger & stencil_op(StencilAction stencil_fail, StencilAction depth_fail, StencilAction pass)
StateChanger & bind_texture_cubemap(int slot, unsigned int texture)
StateChanger & bind_texture_2d(int slot, unsigned int texture)
StateChanger & stencil_test(bool new_state)
StateChanger & stencil_mask(u32 new_state)
Set a bitmask that is ANDed with the stencil value about to be written to the buffer.
StateChanger & blend_mode(Blend src, Blend dst)
StateChanger & depth_test(bool new_state)
A 2d image texture.
Definition texture.h:89
A cubemap texture.
Definition texture.h:105
Represents a found shader uniform and created via ShaderProgram::GetUniform()
Definition uniform.h:9