engine

package
v0.0.0-...-8e5a076 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDescriptorPools = []core1_0.DescriptorPoolSize{
	{
		Type:            core1_0.DescriptorTypeUniformBuffer,
		DescriptorCount: 10000,
	},
	{
		Type:            core1_0.DescriptorTypeStorageBuffer,
		DescriptorCount: 10000,
	},
	{
		Type:            core1_0.DescriptorTypeCombinedImageSampler,
		DescriptorCount: 100000,
	},
	{
		Type:            core1_0.DescriptorTypeInputAttachment,
		DescriptorCount: 1000,
	},
}

Functions

func NewFrameCounter

func NewFrameCounter(samples int) *framecounter

func NewStatsGUI

func NewStatsGUI(pool object.Pool) gui.Fragment

func RunProfilingServer

func RunProfilingServer(port int)

Types

type App

type App interface {
	Instance() *instance.Instance
	Device() *device.Device
	Destroy()

	Worker() command.Worker
	Flush()

	Pool() *descriptor.Pool
	Meshes() cache.MeshCache
	Textures() cache.TextureCache
	Shaders() cache.ShaderCache
}

func New

func New(appName string, deviceIndex int) App

type RenderTarget

type RenderTarget struct {
	// contains filtered or unexported fields
}

func NewColorTarget

func NewColorTarget(device *device.Device, key string, format core1_0.Format, size TargetSize) *RenderTarget

func NewDepthTarget

func NewDepthTarget(device *device.Device, key string, size TargetSize) *RenderTarget

func NewRenderTarget

func NewRenderTarget(device *device.Device, key string, format core1_0.Format, usage core1_0.ImageUsageFlags, size TargetSize) (*RenderTarget, error)

func (*RenderTarget) Aquire

func (i *RenderTarget) Aquire(worker command.Worker) (*swapchain.Context, error)

func (*RenderTarget) Destroy

func (r *RenderTarget) Destroy()

func (*RenderTarget) Frames

func (r *RenderTarget) Frames() int

func (*RenderTarget) Height

func (r *RenderTarget) Height() int

func (*RenderTarget) Present

func (t *RenderTarget) Present(worker command.Worker, context *swapchain.Context)

func (*RenderTarget) Scale

func (r *RenderTarget) Scale() float32

func (*RenderTarget) Size

func (r *RenderTarget) Size() TargetSize

func (*RenderTarget) SurfaceFormat

func (i *RenderTarget) SurfaceFormat() core1_0.Format

func (*RenderTarget) Surfaces

func (i *RenderTarget) Surfaces() image.Array

func (*RenderTarget) Width

func (r *RenderTarget) Width() int

type Renderer

type Renderer interface {
	Draw(scene object.Object, time, delta float32)
	Recreate()
	Screengrab() *image.RGBA
	Destroy()
}

type RendererFunc

type RendererFunc func(App, Target) Renderer

type Target

type Target interface {
	Size() TargetSize
	Scale() float32
	Width() int
	Height() int
	Frames() int

	Surfaces() image.Array
	SurfaceFormat() core1_0.Format
	Aquire(command.Worker) (*swapchain.Context, error)
	Present(command.Worker, *swapchain.Context)

	Destroy()
}

type TargetSize

type TargetSize struct {
	Width  int
	Height int
	Frames int
	Scale  float32
}

type Timing

type Timing struct {
	Current float32
	Average float32
	Max     float32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL