void SVConditionParam::SetMapNode(MAPNODE &mapnode) { setStyleClass("t3"); EnumParam(mapnode); setDefaultValue(); SetCondition(mapnode); }
///////////////////////////////////////////////////////////////////////////////////////////////////////////// // 设置节点 ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void SVConditionParam::SetMapNode(MAPNODE &mapnode) { EnumParam(mapnode); setDefaultValue(); SetCondition(mapnode); }
/** * @glsymbols * @glfunref{PolygonMode} */ static void PolygonMode(oglplus::PolygonMode mode) { OGLPLUS_GLFUNC(PolygonMode)(GL_FRONT_AND_BACK, GLenum(mode)); OGLPLUS_VERIFY( PolygonMode, Error, EnumParam(mode) ); }
/** * @glsymbols * @glfunref{PolygonMode} */ static void PolygonMode(Face face, oglplus::PolygonMode mode) { OGLPLUS_GLFUNC(PolygonMode)(GLenum(face), GLenum(mode)); OGLPLUS_VERIFY( PolygonMode, Error, EnumParam(mode) ); }
/** * @glsymbols * @glfunref{FrontFace} */ static void FrontFace(FaceOrientation orientation) { OGLPLUS_GLFUNC(FrontFace)(GLenum(orientation)); OGLPLUS_VERIFY( FrontFace, Error, EnumParam(orientation) ); }
/** * @glsymbols * @glfunref{CullFace} */ static void CullFace(Face mode) { OGLPLUS_GLFUNC(CullFace)(GLenum(mode)); OGLPLUS_VERIFY( CullFace, Error, EnumParam(mode) ); }
/** * @glsymbols * @glfunref{LogicOp} */ static void LogicOp(ColorLogicOperation op) { OGLPLUS_GLFUNC(LogicOp)(GLenum(op)); OGLPLUS_VERIFY( LogicOp, Error, EnumParam(op) ); }
/** @note Only presets from the same instance of UniformSubroutines * that saved them can be loaded or applied. * * @see Preset * @see Save * @see Load */ void Apply(const Preset& preset) { assert(_program == preset._program); assert(_stage == preset._stage); assert(_get_indices().size() == preset._indices.size()); OGLPLUS_GLFUNC(UniformSubroutinesuiv) (GLenum(_stage), GLsizei(preset._indices.size()), preset._indices.data()); OGLPLUS_CHECK(UniformSubroutinesuiv, Error, EnumParam(_stage)); }
static GLuint _binding(void) { GLint name = 0; OGLPLUS_GLFUNC(GetIntegerv)(GL_CURRENT_PROGRAM, &name); OGLPLUS_VERIFY( GetIntegerv, Error, EnumParam(GLenum(GL_CURRENT_PROGRAM)) ); return name; }
static GLuint _binding(void) { GLint name = 0; OGLPLUS_GLFUNC(GetIntegerv)(GL_VERTEX_ARRAY_BINDING, &name); OGLPLUS_VERIFY( GetIntegerv, ObjectError, EnumParam(GLenum(GL_VERTEX_ARRAY_BINDING)) ); assert(!(name < 0)); return GLuint(name); }
/** * @glsymbols * @glfunref{StencilFunc} */ static void StencilFunc( CompareFunction func, GLint ref = GLint(0), GLuint mask = ~GLuint(0) ) { OGLPLUS_GLFUNC(StencilFunc)(GLenum(func), ref, mask); OGLPLUS_VERIFY( StencilFunc, Error, EnumParam(func) ); }
/// Return the maximum number of uniform blocks for a @p shader_type static GLuint MaxIn(ShaderType shader_type) { GLint result; OGLPLUS_GLFUNC(GetIntegerv)( _translate_max(shader_type), &result ); OGLPLUS_VERIFY( GetIntegerv, Error, EnumParam(_translate_max(shader_type)) ); assert(result >= 0); return GLuint(result); }
/** * @glsymbols * @glfunref{GetActiveUniformBlock} */ bool ReferencedBy(ShaderType shader_type) const { GLint result; OGLPLUS_GLFUNC(GetActiveUniformBlockiv)( this->_program, this->_location, _translate_ref(shader_type), &result ); OGLPLUS_VERIFY( GetActiveUniformBlockiv, Error, EnumParam(_translate_ref(shader_type)) ); return result == GL_TRUE; }
/** * @glsymbols * @glfunref{GetActiveUniformBlock} */ GLuint DataSize(void) const { GLint result; OGLPLUS_GLFUNC(GetActiveUniformBlockiv)( this->_program, this->_location, GL_UNIFORM_BLOCK_DATA_SIZE, &result ); OGLPLUS_VERIFY( GetActiveUniformBlockiv, Error, EnumParam(GLenum(GL_UNIFORM_BLOCK_DATA_SIZE)) ); assert(result >= 0); return GLuint(result); }
/** This function clears the specified color draw buffer of the currently * bound framebuffer. * * @throws Error * * @glsymbols * @glfunref{ClearBuffer} */ static void ClearColorBuffer( ColorBuffer buffer, GLint draw_buffer, const GLfloat* value ) { OGLPLUS_GLFUNC(ClearBufferfv)( GLenum(buffer), draw_buffer, value ); OGLPLUS_CHECK( ClearBufferfv, Error, EnumParam(buffer). Index(draw_buffer) ); }
/** * @param target use the buffer bound to the specified target * @param byte_offset map offset in machine bytes * @param size_bytes map size in machine bytes * @param access the access specifier for the buffer mapping * * @glsymbols * @glfunref{MapBufferRange} * * @throws Error */ BufferRawMap( BufferTarget target, GLintptr byte_offset, GLsizeiptr size_bytes, Bitfield<BufferMapAccess> access ): _offset(byte_offset) , _size(size_bytes) , _ptr( OGLPLUS_GLFUNC(MapBufferRange)( GLenum(target), byte_offset, size_bytes, GLbitfield(access) ) ), _target(target) { OGLPLUS_CHECK( MapBufferRange, Error, EnumParam(target) ); }
/** * @see Assign */ void Apply() { OGLPLUS_GLFUNC(UniformSubroutinesuiv) (GLenum(_stage), GLsizei(_get_indices().size()), _get_indices().data()); OGLPLUS_CHECK(UniformSubroutinesuiv, Error, EnumParam(_stage)); }
IncompleteFramebuffer& Status(FramebufferStatus status) { _status = status; EnumParam(status); return *this; }