Skip to content

Commit

Permalink
remove gl renderer and need to use CGO (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelk authored Dec 16, 2024
1 parent aa9d527 commit 4179da0
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 507 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: go version && go mod download

- name: Run tests
run: make test-no-gui
run: make test

- name: Run linter
run: make lint
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
run:
timeout: 5m
modules-download-mode: readonly
build-tags:
- nogui

linters:
enable:
Expand Down
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@ help: ## show help, shown by default if no target is specified
lint: ## run code linters
golangci-lint run

build-all: ## build code with all 3 GUI mode settings
go build ./...
go build -tags noopengl,sdl ./...
go build -tags nogui ./...
build: ## build code
CGO_ENABLED=0 go build ./...

test: ## run tests
go test -timeout 10s -race ./...

test-no-gui: ## run unit tests with gui disabled
go test -timeout 10s -tags nogui ./...

test-coverage: ## run unit tests and create test coverage
go test -timeout 10s -tags nogui ./... -coverprofile coverage.txt
go test -timeout 10s ./... -coverprofile coverage.txt

test-coverage-web: test-coverage ## run unit tests and show test coverage in browser
go tool cover -func coverage.txt | grep total | awk '{print "Total coverage: "$$3}'
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RetroGoLib is a Golang library designed to simplify the development of tools for
It provides a set of functionalities that can be used to create tools for various retro consoles,
like emulators and debugging tools, all while keeping dependencies to a minimum.

The GUI renderer supports SDL without the use of CGO/SDL2, which makes it easier to build and distribute.

## Current system support

CPUs:
Expand All @@ -27,7 +29,6 @@ Systems:
├─ arch/nes NES common types and helpers
├─ assert test assertion helpers
├─ buildinfo show version info that is embedded in the binary
├─ cpu general CPU defines and helpers
├─ gui GUIs renderers
├─ input hardware controller/keyboard helpers
├─ log fast and structured logging based on slog
7 changes: 1 addition & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@ module github.com/retroenv/retrogolib

go 1.22

require (
github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a
github.com/veandco/go-sdl2 v0.4.40
github.com/ebitengine/purego v0.8.1
)
require github.com/ebitengine/purego v0.8.1
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE=
github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71 h1:5BVwOaUSBTlVZowGO6VZGw2H/zl9nrd3eCZfYV+NfQA=
github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71/go.mod h1:9YTyiznxEY1fVinfM7RvRcjRHbw2xLBJ3AAGIT0I4Nw=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a h1:vxnBhFDDT+xzxf1jTJKMKZw3H0swfWk9RpWbBbDK5+0=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/veandco/go-sdl2 v0.4.40 h1:fZv6wC3zz1Xt167P09gazawnpa0KY5LM7JAvKpX9d/U=
github.com/veandco/go-sdl2 v0.4.40/go.mod h1:OROqMhHD43nT4/i9crJukyVecjPNYYuCofep6SNiAjY=
2 changes: 0 additions & 2 deletions gui/gui.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build !nesgo

// Package gui implements different GUIs renderers.
package gui

Expand Down
251 changes: 0 additions & 251 deletions gui/opengl.go

This file was deleted.

Loading

0 comments on commit 4179da0

Please sign in to comment.