Giter Site home page Giter Site logo

Comments (6)

pwaller avatar pwaller commented on June 11, 2024

Unfortunately my old netbook does worse, the above gist causes:

panic: runtime error: call of nil func value
[signal 0xb code=0x1 addr=0x0 pc=0x0]

goroutine 1 [syscall]:
github.com/go-gl/gl._Cfunc_glGenBuffers(0x1, 0x187001a0)
    /tmp/go-build242548822/github.com/go-gl/gl/_obj/_cgo_defun.c:1138 +0x32
github.com/go-gl/gl.GenBuffer(0x0, 0x0)
    /tmp/go-build242548822/github.com/go-gl/gl/_obj/gl.cgo1.go:829 +0x41

It has GL_ARB_vertex_buffer_object, but I guess glew doesn't do translation to "ARB-style" calls? I think is why I ended up abandoning vertex buffers for the time being.

from gl.

pwaller avatar pwaller commented on June 11, 2024

(Oh, and gl.UnbindBuffer is undefined - if you implemented it locally mind sending a PR?)

from gl.

 avatar commented on June 11, 2024

gl.UnbindBuffer should be gl.BufferUnbind. it seems I've changed that at some point while messing around with the gl API. The gist is fixed accordingly.

from gl.

banthar avatar banthar commented on June 11, 2024
verts   = [...][]float32{{0, 0}, {100, 0}, {100, 100}, {0, 100}}

Is an array of slices. It should be:

verts   = [...][2]float32{{0, 0}, {100, 0}, {100, 100}, {0, 100}}

If I change that it still doesn't work. There are other problems.

from gl.

banthar avatar banthar commented on June 11, 2024

OK. I fixed it: https://gist.github.com/3947436

Size in BufferData was wrong and VertexPointer and DrawElements should have offset instead of absolute pointer.

There is nothing wrong with gl, except it accepts silly arguments.

from gl.

 avatar commented on June 11, 2024

Nice, thanks.

from gl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.