void fill_t::draw(point_t p,float width,float height){ if(getFillMode()==1){ solid_fill(p,width,height); } else{ checkerboard_fill(p,width,height); } }
void RenderingSystemOgl::setRasterizationTechnique( RasterizationTechnique::Pointer technique ) { storm_assert( technique ); if( _rasterizationTechnique == technique ) return; auto nativeTechnique = std::static_pointer_cast< RasterizationTechniqueOgl >( technique ); GLenum cullMode = nativeTechnique->getCullMode(); GLenum fillMode = nativeTechnique->getFillMode(); const bool cullingEnabled = (cullMode != GL_NONE); setBooleanGlState( GL_CULL_FACE, cullingEnabled ); if( cullingEnabled ) { ::glFrontFace( GL_CW ); checkResult( "::glFrontFace" ); ::glCullFace( cullMode ); checkResult( "::glCullFace" ); } ::glPolygonMode( GL_FRONT_AND_BACK, fillMode ); checkResult( "::glPolygonMode" ); const auto &description = nativeTechnique->getDescription(); setBooleanGlState( GL_SCISSOR_TEST, description.rectangleClippingEnabled ); setBooleanGlState( GL_DEPTH_CLAMP, !description.depthClippingEnabled ); ::glPolygonOffset( static_cast<GLfloat>(description.slopeScaleDepthBias), static_cast<GLfloat>(description.depthBias) ); checkResult( "::glPolygonOffset" ); _rasterizationTechnique = technique; return; }