go-sdl2 | SDL2 binding for Go | Game Engine library

 by   veandco C Version: v0.4.0 License: BSD-3-Clause

kandi X-RAY | go-sdl2 Summary

kandi X-RAY | go-sdl2 Summary

go-sdl2 is a C library typically used in Gaming, Game Engine applications. go-sdl2 has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

SDL2 binding for Go
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              go-sdl2 has a medium active ecosystem.
              It has 1959 star(s) with 219 fork(s). There are 46 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 68 open issues and 278 have been closed. On average issues are closed in 12 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of go-sdl2 is v0.4.0

            kandi-Quality Quality

              go-sdl2 has no bugs reported.

            kandi-Security Security

              go-sdl2 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              go-sdl2 is licensed under the BSD-3-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              go-sdl2 releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-sdl2
            Get all kandi verified functions for this library.

            go-sdl2 Key Features

            No Key Features are available at this moment for go-sdl2.

            go-sdl2 Examples and Code Snippets

            No Code Snippets are available at this moment for go-sdl2.

            Community Discussions

            QUESTION

            no required module provides package SDL2
            Asked 2021-Feb-19 at 08:30

            I am trying to import sdl2 package from https://github.com/veandco/go-sdl2. I followed all the steps that appear on readme.md for Windows. Installing mingw64 and do on cmd:

            ...

            ANSWER

            Answered 2021-Feb-19 at 08:30

            According to New module changes in Go 1.16 blog

            The go command now builds packages in module-aware mode by default, even when no go.mod is present. This is a big step toward using modules in all projects.

            as suggested in the blog change the value for GO111MODULE to auto go env -w GO111MODULE=auto would fix the issue.

            Source https://stackoverflow.com/questions/66267267

            QUESTION

            go + SDL + OpenGL + MacOS example = I get INVALID_OPERATION after DrawArrays()
            Asked 2020-May-11 at 01:46

            SDL version: 2.0.12
            OpenGL version: 3.3 INTEL-10.4.14
            I had to force the OpenGL version to 3.3 by requesting core profile, the default version I would get otherwise is 1.2

            Following this video tutorial http://youtu.be/yxAPS2eyKmA Games with Go, I tried the OpenGL sample code, and it just shows a black window.
            It's supposed to render an orange triangle.

            I'm getting INVALID_OPERATION after the second-to-last statement gl.DrawArrays(gl.TRIANGLES, 0, 3)

            https://gist.github.com/ErnestoBorio/87b09bf3cc496657a83637fd4876e943

            ...

            ANSWER

            Answered 2020-May-11 at 01:46

            Your code never calls glUseProgram which means you attempt to draw without a current program object, which is not valid in core profile OpenGL.

            Source https://stackoverflow.com/questions/61715246

            QUESTION

            SDL2 only returns first registered UserEvent
            Asked 2019-Aug-05 at 05:59

            I register three events via SDL_RegisterEvents. However, SDL_PollEvent() only returns events of the first type and swallows the others.

            This is my code (it's Go, but I don't think that's relevant here):

            ...

            ANSWER

            Answered 2019-Aug-05 at 05:59

            It only is because of go binding, specifically the line https://github.com/veandco/go-sdl2/blob/24851c1f2d98dcac2a68223a24e6f799fc921f1e/sdl/events.go#L1035 (type conversion only triggered on SDL_USEREVENT, which matches only with first registered event; anything else is reported as "CommonEvent", losing all extra data you may have passed) . You probably should report a bug to developer of said binding.

            Source https://stackoverflow.com/questions/57349140

            QUESTION

            go-sdl2 not clearing window surface after first run
            Asked 2018-Mar-29 at 13:59

            I just started going through the SDL tutorial lessons at http://lazyfoo.net/tutorials/SDL/index.php and am working on the first lesson (Lesson 01). I am hand-translating the C/C++ code to Go using the github.com/veandco/go-sdl2 library.

            This is my code:

            ...

            ANSWER

            Answered 2018-Mar-29 at 13:59

            Add an event loop and redraw either unconditionally or when asked to by window manager (SDL_WINDOWEVENT). You can't just draw once and expect things to stay on screen, or even ever be visible (e.g. your draw happened before window manager was ready to show your window), especially with compositing window managers.

            Source https://stackoverflow.com/questions/49542093

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install go-sdl2

            To get the bindings, type: go get -v github.com/veandco/go-sdl2/sdl go get -v github.com/veandco/go-sdl2/img go get -v github.com/veandco/go-sdl2/mix go get -v github.com/veandco/go-sdl2/ttf go get -v github.com/veandco/go-sdl2/gfx. or type this if you use Bash terminal: go get -v github.com/veandco/go-sdl2/{sdl,img,mix,ttf}. Due to go-sdl2 being under active development, a lot of breaking changes are going to happen during v0.x. With versioning system coming to Go soon, we'll make use of semantic versioning to ensure stability in the future.

            Support

            GoDoc documentation for go-sdl2Original SDL2 wiki
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/veandco/go-sdl2.git

          • CLI

            gh repo clone veandco/go-sdl2

          • sshUrl

            git@github.com:veandco/go-sdl2.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link