Documentation
¶
Overview ¶
Engine implements...
Error implements...
Input implements...
Monitor implements...
Window implements...
Index ¶
- Constants
- Variables
- func CheckGLError()
- func DefaultKeyCallback(w *glfw.Window, key glfw.Key, scancode int, action glfw.Action, ...)
- func DefaultLoopCallback(w *Window, e *Engine)
- func Mat4dToMat4f(m mgl64.Mat4) (M mgl32.Mat4)
- type Camera
- type ColladaDoc
- type Engine
- func (e *Engine) ActivateCamera(c *Camera)
- func (e *Engine) ActivateCameraIndex(i int) *Camera
- func (e *Engine) Finish()
- func (e *Engine) FromCollada(c *ColladaDoc)
- func (e *Engine) FromColladaFile(filepath string)
- func (e *Engine) Hint()
- func (e *Engine) Init() error
- func (e *Engine) NewCamera() (c *Camera)
- func (e *Engine) NewObject() (o *Object)
- func (e *Engine) Run() error
- type GeneralError
- type InitCallBack
- type KeyCallback
- type LoopCallback
- type Mesh
- type Monitor
- type OGLError
- type OGLObjectError
- type OGLProgramError
- type OGLShaderError
- type Object
- type Program
- type Settings
- type Shader
- type Vec2
- type Vec3
- type Vec4
- type Vertex
- type Window
Constants ¶
View Source
const ( ORTHOGRAPHIC = iota PERSPECTIVE = iota )
Variables ¶
View Source
var ( DefaultWindowHints = map[glfw.Hint]int{ glfw.ContextVersionMajor: 3, glfw.ContextVersionMinor: 3, glfw.OpenglForwardCompatible: glfw.True, glfw.OpenglProfile: glfw.OpenglCoreProfile, } DefaultSettings = Settings{ Vsync: 1, Windows: []Window{ Window{ KeyCallbacks: []KeyCallback{ DefaultKeyCallback, }, LoopCallback: DefaultLoopCallback, Title: "GameEngine", }, }, } )
Functions ¶
func CheckGLError ¶
func CheckGLError()
Types ¶
type Camera ¶
type Camera struct {
Object
ProjectionType uint
//Projection Properties
Far, Near,
Left, Right, Bottom, Top,
Aspect, SensorHeight, SensorWidth, FocalLength float64
}
func (*Camera) ProjectionMatrix ¶
func (*Camera) TransformationMatrix ¶
func (*Camera) ViewMatrix ¶
type ColladaDoc ¶
type ColladaDoc struct {
XMLName xml.Name `xml:"COLLADA"`
Collada14.TxsdCollada
}
func ImportColladaFile ¶
func ImportColladaFile(filename string) (c *ColladaDoc)
type Engine ¶
type Engine struct {
Settings *Settings
Monitors []Monitor
Windows []Window
Objects []*Object
Cameras []*Camera
ActiveCamera *Camera
InitCallBacks []InitCallBack
WindowHints map[glfw.Hint]int
}
Main Driver
func (*Engine) ActivateCamera ¶
func (*Engine) ActivateCameraIndex ¶
func (*Engine) FromCollada ¶
func (e *Engine) FromCollada(c *ColladaDoc)
func (*Engine) FromColladaFile ¶
type GeneralError ¶
func (*GeneralError) Error ¶
func (e *GeneralError) Error() string
func (*GeneralError) Log ¶
func (e *GeneralError) Log(d string)
type InitCallBack ¶
type InitCallBack func(e *Engine)
type KeyCallback ¶
type LoopCallback ¶
type Mesh ¶
func (*Mesh) CalculateNormals ¶
func (m *Mesh) CalculateNormals()
func (*Mesh) NewProgram ¶
type OGLError ¶
type OGLError struct {
*GeneralError
}
type OGLObjectError ¶
type OGLObjectError struct {
*GeneralError
OGLObject *gl.Object
}
type OGLProgramError ¶
type OGLProgramError struct {
*GeneralError
OGLProgram *Program
}
type OGLShaderError ¶
type OGLShaderError struct {
*GeneralError
OGLShader *Shader
}
func (*OGLShaderError) Log ¶
func (e *OGLShaderError) Log(s *Shader, d string)
type Program ¶
func (*Program) MakeProgram ¶
func (p *Program) MakeProgram()
type Shader ¶
func (*Shader) Register ¶
Use TBD over this method--may be unexported in the future; Reserves the shader resource on the GPU
func (*Shader) SourceFile ¶
type Vertex ¶
func (*Vertex) CalculateNormal ¶
type Window ¶
type Window struct {
*glfw.Window
*Monitor
KeyCallbacks []KeyCallback
LoopCallback
Title string
Width int
Height int
ClearColor mgl.Vec4
}
func (*Window) SetKeyCallbackRange ¶
func (w *Window) SetKeyCallbackRange()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.