// modify the rate at which generic vertex attributes advance during instanced rendering
762623
func VertexAttribDivisor(index uint32, divisor uint32) {
	C.glowVertexAttribDivisor(gpVertexAttribDivisor, (C.GLuint)(index), (C.GLuint)(divisor))
}
1106673
func GeDoubleScalarMultVartime(r *ProjectiveGroupElement, a *[32]byte, A *ExtendedGroupElement, b *[32]byte) {
	var aSlide, bSlide [256]int8
	var Ai [8]CachedGroupElement // A,3A,5A,7A,9A,11A,13A,15A
	var t CompletedGroupElement
	var u, A2 ExtendedGroupElement
	var i int

	slide(&aSlide, a)
	slide(&bSlide, b)

	A.ToCached(&Ai[0])
	A.Double(&t)
	t.ToExtended(&A2)

	for i := 0; i < 7; i++ {
		geAdd(&t, &A2, &Ai[i])
		t.ToExtended(&u)
		u.ToCached(&Ai[i+1])
	}

	r.Zero()

	for i = 255; i >= 0; i-- {
		if aSlide[i] != 0 || bSlide[i] != 0 {
			break
		}
	}

	for ; i >= 0; i-- {
		r.Double(&t)

		if aSlide[i] > 0 {
			t.ToExtended(&u)
			geAdd(&t, &u, &Ai[aSlide[i]/2])
		} else if aSlide[i] < 0 {
			t.ToExtended(&u)
			geSub(&t, &u, &Ai[(-aSlide[i])/2])
		}

		if bSlide[i] > 0 {
			t.ToExtended(&u)
			geMixedAdd(&t, &u, &bi[bSlide[i]/2])
		} else if bSlide[i] < 0 {
			t.ToExtended(&u)
			geMixedSub(&t, &u, &bi[(-bSlide[i])/2])
		}

		t.ToProjective(r)
	}
}
1088040
func (c MaxReplicationLagModuleConfig) MaxDurationBetweenIncreases() time.Duration {
	return time.Duration(c.MaxDurationBetweenIncreasesSec) * time.Second
}
356525
func MakeVertexSlice(shader *Shader, len, cap int) *VertexSlice {
	if len > cap {
		panic("failed to make vertex slice: len > cap")
	}
	return &VertexSlice{
		va: newVertexArray(shader, cap),
		i:  0,
		j:  len,
	}
}
282128
func (m *Mat64Instances) AllClassAttributes() []Attribute {
	ret := make([]Attribute, 0)
	for i := range m.classAttrs {
		if m.classAttrs[i] {
			ret = append(ret, m.attributes[i])
		}
	}

	return ret
}
285780
func (client *Client) ModifyVRouterAttribute(args *ModifyVRouterAttributeArgs) error {
	response := ModifyVRouterAttributeResponse{}
	return client.Invoke("ModifyVRouterAttribute", args, &response)
}
703598
func (opts *Options) OptimizeUniversalStyleCompaction(memtable_memory_budget uint64) {
	C.rocksdb_options_optimize_universal_style_compaction(opts.c, C.uint64_t(memtable_memory_budget))
}
130052
func (q *rateLimitingType) AddRateLimited(item interface{}) {
	q.DelayingInterface.AddAfter(item, q.rateLimiter.When(item))
}
358112
func (rs *RenderSystem) Update(dt float32) {
	if engo.Headless() {
		return
	}

	if rs.sortingNeeded {
		sort.Sort(rs.entities)
		rs.sortingNeeded = false
	}

	if rs.newCamera {
		newCamera(rs.world)
		rs.newCamera = false
	}

	engo.Gl.Clear(engo.Gl.COLOR_BUFFER_BIT)

	preparedCullingShaders := make(map[CullingShader]struct{})
	var cullingShader CullingShader // current culling shader
	var prevShader Shader           // shader of the previous entity
	var currentShader Shader        // currently "active" shader

	// TODO: it's linear for now, but that might very well be a bad idea
	for _, e := range rs.entities {
		if e.RenderComponent.Hidden {
			continue // with other entities
		}

		// Retrieve a shader, may be the default one -- then use it if we aren't already using it
		shader := e.RenderComponent.shader

		if !compareShaders(shader, prevShader) {
			// to increase performance avoid the type assertions when possible
			prevShader = shader
			if cs, ok := shader.(CullingShader); ok {
				cullingShader = cs
				if _, isPrepared := preparedCullingShaders[cullingShader]; !isPrepared {
					cullingShader.PrepareCulling()
					preparedCullingShaders[cullingShader] = struct{}{}
				}
			} else {
				cullingShader = nil
			}
		}

		if cullingShader != nil && !cullingShader.ShouldDraw(e.RenderComponent, e.SpaceComponent) {
			continue
		}

		// Change Shader if we have to
		if !compareShaders(shader, currentShader) {
			if currentShader != nil {
				currentShader.Post()
			}
			shader.Pre()
			currentShader = shader
		}

		// Setting default scale to 1
		if e.RenderComponent.Scale.X == 0 && e.RenderComponent.Scale.Y == 0 {
			e.RenderComponent.Scale = engo.Point{X: 1, Y: 1}
		}

		// Setting default to white
		if e.RenderComponent.Color == nil {
			e.RenderComponent.Color = color.White
		}

		currentShader.Draw(e.RenderComponent, e.SpaceComponent)
	}

	if currentShader != nil {
		currentShader.Post()
	}
}
282884
func (l *LazilyFilteredInstances) AllClassAttributes() []Attribute {
	ret := make([]Attribute, 0)
	for a := range l.classAttrs {
		if l.classAttrs[a] {
			ret = append(ret, a)
		}
	}
	return ret
}
684369
func (at AttrType) Size() int {
	switch at {
	case Int:
		return 4
	case Float:
		return 4
	case Vec2:
		return 2 * 4
	case Vec3:
		return 3 * 4
	case Vec4:
		return 4 * 4
	case Mat2:
		return 2 * 2 * 4
	case Mat23:
		return 2 * 3 * 4
	case Mat24:
		return 2 * 4 * 4
	case Mat3:
		return 3 * 3 * 4
	case Mat32:
		return 3 * 2 * 4
	case Mat34:
		return 3 * 4 * 4
	case Mat4:
		return 4 * 4 * 4
	case Mat42:
		return 4 * 2 * 4
	case Mat43:
		return 4 * 3 * 4
	default:
		panic("size of vertex attribute type: invalid type")
	}
}
839161
func progressBehavior(state *nstyle.WidgetStates, in *Input, r rect.Rect, maxval int, value int, modifiable bool) int {
	if !modifiable {
		*state = nstyle.WidgetStateInactive
		return value
	}

	exitstate := basicWidgetStateControl(state, in, r)

	if *state == nstyle.WidgetStateActive {
		if !in.Mouse.Down(mouse.ButtonLeft) {
			*state = exitstate
		} else {
			ratio := maxFloat(0, float64(in.Mouse.Pos.X-r.X)) / float64(r.W)
			value = int(float64(maxval) * ratio)
			if value < 0 {
				value = 0
			}
		}
	}

	if maxval > 0 && value > maxval {
		value = maxval
	}
	return value
}
548551
func (o Object) IterateAttributes(it AttributeIterator) error {
	names := make([]string, len(o))
	i := 0
	for n := range o {
		names[i] = n
		i++
	}
	sort.Strings(names)
	for _, n := range names {
		if err := it(n, o[n]); err != nil {
			return err
		}
	}
	return nil
}
953084
func (client *Client) ModifyDBInstanceDescription(args *ModifyDBInstanceDescriptionArgs) error {
	response := common.Response{}
	return client.Invoke("ModifyDBInstanceDescription", args, &response)
}
930160
func (sb *StatsdBuffer) PrecisionTiming(stat string, delta time.Duration) error {
	sb.eventChannel <- event.NewPrecisionTiming(stat, delta)
	return nil
}
133295
func (m *Mat64Instances) AllAttributes() []Attribute {
	ret := make([]Attribute, len(m.attributes))
	for i, a := range m.attributes {
		ret[i] = a
	}
	return ret
}
917338
func (m *HashMap) Fillrate() uintptr {
	data := m.mapData()
	count := atomic.LoadUintptr(&data.count)
	l := uintptr(len(data.index))
	return (count * 100) / l
}