Coder Social home page Coder Social logo

dotnet-opentk-tutorial's Introduction

OpenTK / OpenGL 4.0 in dotnet core

A port of https://dreamstatecoding.blogspot.com/p/opengl4-with-opentk-tutorials.html to dotnet core 2.0

Build

dotnet restore
dotnet build
dotnet run

License

Original tutorial from dreamstatecoding.

The MIT License (MIT)

Copyright © 2017 Nathan Lowe

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

dotnet-opentk-tutorial's People

Contributors

nlowe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dotnet-opentk-tutorial's Issues

Running failed

Thanks for putting this up. I've been trying to find some .NET Core OpenGL examples (that run on Linux) and it's been a tad hard to find something that at least builds (this did). But when doing the dotnet run. I was treated with this:

Unhandled Exception: System.MissingMethodException: Method not found: '!0 System.ReadOnlySpan`1.get_Item(Int32)'.
   at SixLabors.ImageSharp.Formats.Bmp.BmpImageFormatDetector.IsSupportedFileFormat(ReadOnlySpan`1 header)
   at SixLabors.ImageSharp.Formats.Bmp.BmpImageFormatDetector.DetectFormat(ReadOnlySpan`1 header)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetLast[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at SixLabors.ImageSharp.Image.InternalDetectFormat(Stream stream, Configuration config)
   at SixLabors.ImageSharp.Image.Decode[TPixel](Stream stream, Configuration config)
   at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, Stream stream, IImageFormat& format)
   at SixLabors.ImageSharp.Image.Load[TPixel](Stream stream)
   at dotnet_opentk_tutorial.Rendering.TexturedRenderObject.LoadTexture(String texturePath, Int32& w, Int32& h) in /home/ben/Projects/third_party/dotnet-opentk-tutorial/Rendering/TexturedRenderObject.cs:line 96
   at dotnet_opentk_tutorial.Rendering.TexturedRenderObject.InitTextures(String texturePath) in /home/ben/Projects/third_party/dotnet-opentk-tutorial/Rendering/TexturedRenderObject.cs:line 56
   at dotnet_opentk_tutorial.Rendering.TexturedRenderObject..ctor(IReadOnlyCollection`1 vertices, ShaderProgram shaderProgram, String texturePath) in /home/ben/Projects/third_party/dotnet-opentk-tutorial/Rendering/TexturedRenderObject.cs:line 51
   at dotnet_opentk_tutorial.Actors.ActorFactory..ctor(ShaderProgram coloredSolidShader, ShaderProgram texturedSolidShader) in /home/ben/Projects/third_party/dotnet-opentk-tutorial/Actors/ActorFactory.cs:line 25
   at dotnet_opentk_tutorial.Components.MainWindow.OnLoad(EventArgs e) in /home/ben/Projects/third_party/dotnet-opentk-tutorial/Components/MainWindow.cs:line 71
   at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   at dotnet_opentk_tutorial.Program.Main(String[] args) in /home/ben/Projects/third_party/dotnet-opentk-tutorial/Program.cs:line 11

Any idea on how to fix this?

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.