Categorygithub.com/tbogdala/eweygewey
modulepackage
0.3.2
Repository: https://github.com/tbogdala/eweygewey.git
Documentation: pkg.go.dev

# README

EweyGewey v0.3.2

EweyGewey is an OpenGL immediate-mode GUI library written in the Go programming language that is designed to be integrated easily into an OpenGL application.

The design of the library is heavily inspired by imgui.

UNDER CONSTRUCTION

At present, it is very much in an alpha stage with new development adding in features, widgets and possibly API breaks. Any API break should increment the minor version number and any patch release tags should remain compatible even in development 0.x versions.

Screenshots

Here's some of what's available right now in the basic example:

basic_ss

Requirements

  • Mathgl - for 3d math
  • Freetype - for dynamic font texture generation
  • Fizzle - provides an OpenGL 3/es2/es3 abstraction
  • GLFW (v3.1) - currently GLFW is the only 'host' support for input

Additionally, a backend graphics provider needs to be used. At present, fizzle supports the following:

  • Go GL - pre-generated OpenGL bindings using their glow project
  • opengles2 - Go bindings to the OpenGL ES 2.0 library

These are included when the graphicsprovider subpackage is used and direct importing is not required.

Installation

The dependency Go libraries can be installed with the following commands.

go get github.com/go-gl/glfw/v3.1/glfw
go get github.com/go-gl/mathgl/mgl32
go get github.com/golang/freetype
go get github.com/tbogdala/fizzle

An OpenGL library will also be required for desktop applications; install the OpenGL 3.3 library with the following command:

go get github.com/go-gl/gl/v3.3-core/gl

If you're compiling for Android/iOS, then you will need an OpenGL ES library, and that can be installed with the following command instead:

go get github.com/remogatto/opengles2

This does assume that you have the native GLFW 3.1 library installed already accessible to Go tools. This should be the only native library needed.

Current Features

  • Basic windowing system
  • Basic theming support
  • Basic input support that detects mouse clicks and double-clicks
  • Basic scaling for larger resolutions
  • Widgets:
    • Text
    • Buttons
    • Sliders for integers and floats with ranges and without
    • Scroll bars
    • Images
    • Editbox
    • Checkbox
    • Separator
    • Custom drawn 3d widgets

TODO

The following need to be addressed in order to start releases:

  • more widgets:
    • text wrapping
    • multi-line text editors
    • combobox
    • image buttons
  • detailed theming (e.g. custom drawing of slider cursor)
  • texture atlas creation
  • z-ordering for windows
  • scroll bars don't scroll on mouse drag
  • editbox cursor doesn't start where mouse was clicked
  • text overflow on editboxes isn't handled well
  • better OpenGL flag management
  • documentation
  • samples

LICENSE

EweyGewey is released under the BSD license. See the LICENSE file for more details.

Fonts in the examples/assets directory are licensed under the SIL OFL open font license.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

ClipF32 returns a value that is between the closed interval of [min .
ColorIToV takes the color parameters as integers and returns them as a float vector.
NewManager is the constructor for the Manager type that will create a new object and sets sane defaults.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
constants used for polling the state of a mouse button.
constants used for polling the state of a mouse button.
constants used for polling the state of a mouse button.
constants used for polling the state of a mouse button.

# Variables

DefaultStyle is the default style to use for drawing widgets.
FragShader330 is the GLSL fragment shader program for the user interface.
VertShader330 is the GLSL vertex shader program for the user interface.

# Structs

Font contains data regarding a font and the texture that was created with the specified set of glyphs.
KeyPressEvent represents the data associated with a single key-press event from whatever input library is used in conjunction with this package.
Manager holds all of the widgets and knows how to draw the UI.
Style defines parameters to the drawing functions that control the way the widgets are organized and drawn.
TextRenderData is a structure containing the raw OpenGL VBO data needed to render a text string for a given texture.
Window represents a collection of widgets in the user interface.

# Type aliases

BuildCallback is a type for the function that builds the widgets for the window.
FrameStartFunc is the type of function to be called when the manager is starting a new frame to construct and draw.