This commit is contained in:
Hajime Hoshi 2013-06-19 23:51:41 +09:00
parent e91ab21d8d
commit 6ed9102f01
10 changed files with 90 additions and 91 deletions

View File

@ -1,9 +1,9 @@
package ebiten
import (
"time"
"github.com/hajimehoshi/go-ebiten/graphics"
"github.com/hajimehoshi/go-ebiten/graphics/opengl"
"time"
)
type Game interface {

View File

@ -15,14 +15,14 @@ package main
//
import "C"
import (
"github.com/hajimehoshi/go-ebiten"
"github.com/hajimehoshi/go-ebiten/graphics"
"image"
"image/color"
_ "image/png"
"os"
"runtime"
"unsafe"
"github.com/hajimehoshi/go-ebiten"
"github.com/hajimehoshi/go-ebiten/graphics"
)
type GlutUI struct {
@ -62,7 +62,7 @@ func (ui *GlutUI) Init() {
ui.screenScale = 2
C.glutInit(&cargc, &cargs[0])
C.glutInitDisplayMode(C.GLUT_RGBA);
C.glutInitDisplayMode(C.GLUT_RGBA)
C.glutInitWindowSize(
C.int(ui.screenWidth*ui.screenScale),
C.int(ui.screenHeight*ui.screenScale))

View File

@ -1,8 +1,8 @@
package graphics_test
import (
"testing"
. "."
"testing"
)
func setElements(matrix *AffineMatrix, elements [][]float64) {

View File

@ -1,8 +1,8 @@
package graphics_test
import (
"testing"
. "."
"testing"
)
func TestGeometryMatrixElements(t *testing.T) {

View File

@ -7,10 +7,10 @@ package opengl
import "C"
import (
"fmt"
"github.com/hajimehoshi/go-ebiten/graphics"
"image"
"image/color"
"unsafe"
"github.com/hajimehoshi/go-ebiten/graphics"
)
type GraphicsContext struct {
@ -138,8 +138,7 @@ func (context *GraphicsContext) setOffscreenFramebuffer(framebuffer C.GLuint,
C.glFlush()
C.glBindFramebuffer(C.GL_FRAMEBUFFER, framebuffer)
if err := C.glCheckFramebufferStatus(C.GL_FRAMEBUFFER);
err != C.GL_FRAMEBUFFER_COMPLETE {
if err := C.glCheckFramebufferStatus(C.GL_FRAMEBUFFER); err != C.GL_FRAMEBUFFER_COMPLETE {
panic(fmt.Sprintf("glBindFramebuffer failed: %d", err))
}
C.glEnable(C.GL_BLEND)

View File

@ -1,8 +1,8 @@
package opengl_test
import (
"testing"
. "."
"testing"
)
func TestClp2(t *testing.T) {