MCPcopy Index your code
hub / github.com/EngoEngine/engo / RenderComponent

Struct RenderComponent

common/render.go:61–91  ·  view source on GitHub ↗

RenderComponent is the component needed to render an entity.

Source from the content-addressed store, hash-verified

59
60// RenderComponent is the component needed to render an entity.
61type RenderComponent struct {
62 // Hidden is used to prevent drawing by OpenGL
63 Hidden bool
64 // Scale is the scale at which to render, in the X and Y axis. Not defining Scale, will default to engo.Point{1, 1}
65 Scale engo.Point
66 // Color defines how much of the color-components of the texture get used
67 Color color.Color
68 // Drawable refers to the Texture that should be drawn
69 Drawable Drawable
70 // Repeat defines how to repeat the Texture if the SpaceComponent of the entity
71 // is larger than the texture itself, after applying scale. Defaults to NoRepeat
72 // which allows the texture to draw entirely without regard to th SpaceComponent
73 // Do not set to anything other than NoRepeat for textures in a sprite sheet.
74 // This does not yet work with sprite sheets.
75 Repeat TextureRepeating
76 // Buffer represents the buffer object itself
77 // Avoid using it unless your are writing a custom shader
78 Buffer *gl.Buffer
79 // BufferContent contains the buffer data
80 // Avoid using it unless your are writing a custom shader
81 BufferContent []float32
82 // StartZIndex defines the initial Z-Index. Z-Index defines the order which the content is drawn to the
83 // screen. Higher z-indices are drawn on top of lower ones. Beware that you must use `SetZIndex` function to change
84 // the Z-Index.
85 StartZIndex float32
86
87 magFilter, minFilter ZoomFilter
88
89 shader Shader
90 zIndex float32
91}
92
93// SetShader sets the shader used by the RenderComponent.
94func (r *RenderComponent) SetShader(s Shader) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected