Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/nullboundary/gopenframeworks

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/nullboundary/gopenframeworks

  • v0.0.0-20151020103419-34f9a8cf6aed
  • Source
  • Go
  • Socket score

Version published
Created
Source

Gopenframeworks

Gopenframeworks (temporary project name) is a proof of concept exploring the possibility of using go to create a graphics framework inspired by openframeworks. All contributions to the framework are welcome, but this framework is NOT ready for use yet.

Installation

  • Make sure that Go is installed on your computer.
  • Follow the instructions to install GLFW. https://github.com/go-gl/glfw3
  • Follow the instructions to install GL. https://github.com/go-gl/gl
  • Once you have installed Go, GL and GLFW:
go get github.com/nullboundary/gopenframeworks

Example

package main

import (
	"fmt"
	gof "github.com/nullboundary/gopenframeworks"
)

var y float32 = 100
var width float32 = 1024
var height float32 = 768

//--------------------------------------------------------------
func (app testApp) Setup() {
	fmt.Println("Hello World")
	gof.Background(0, 0, 0.2)

}

//--------------------------------------------------------------
func (app testApp) Update() {

	y = y - 1
	if y < 0 {
		y = height
	}
}

//--------------------------------------------------------------
func (app testApp) Draw() {

	redTriangle := gof.Triangle(0, 0, 0, width, 0, 0, width/2, height, 0)
	redTriangle.Fill(1, 0, 0, 1.0) //r,g,b,a
	redTriangle.Draw()

	cutOutRect := gof.Rectangle((width/2)-150.0, 0, 300, 300) //x,y,w,h
	cutOutRect.Fill(0, 0, 0.2, 0.4)                 //r,g,b,a
	cutOutRect.Draw()
	
	movingLine := gof.NewLine(0, y, 0, width, y, 0)
	movingLine.Fill(1, 0, 0, 1.0)
	movingLine.Draw()
}

Image

FAQs

Package last updated on 20 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc