OpenTK.3D.Library 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OpenTK.3D.Library --version 1.2.0                
NuGet\Install-Package OpenTK.3D.Library -Version 1.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenTK.3D.Library" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OpenTK.3D.Library --version 1.2.0                
#r "nuget: OpenTK.3D.Library, 1.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OpenTK.3D.Library as a Cake Addin
#addin nuget:?package=OpenTK.3D.Library&version=1.2.0

// Install OpenTK.3D.Library as a Cake Tool
#tool nuget:?package=OpenTK.3D.Library&version=1.2.0                

OpenTK3DEngine

Example code:

  1. Add a new .cs line to your console app, that will be your main place to code
  2. On your program.cs file add the example code no. 2,
  3. If you dont want the console opening change your project properties to Windows Application
using System;
using OpenTK;
using OpenTK.Graphics;
using Program;

namespace yourNameSpace
{
    public class yourClass : MainRenderWindow
    {
        public yourClass(int width, int height, string title)
            : base(width, height, title)
        {
        }

        protected override void OnLoad(EventArgs e)
        {
            setClearColor(new Color4(0.0f, 0.0f, 0.0f, 1.0f)); //Sets Background Color
            UseDepthTest = false; //Enables Depth Testing for 3D
            RenderLight = false; //Makes the 3D light visible
            UseAlpha = true; //Enables alpha use
            KeyboardAndMouseInput = false; //Enables keyboard and mouse input for 3D movement
            base.OnLoad(e);
        }

        protected override void OnRenderFrame(FrameEventArgs e)
        {
            Clear();

            drawEllipse(500, 500, 10f, 10f, new Color4(1.0f, 1.0f, 1.0f, 1.0f)); //Draws a circle

            base.OnRenderFrame(e);

        }

        protected override void OnUpdateFrame(FrameEventArgs e)
        {
            base.OnUpdateFrame(e);
        }
    }
}
namespace yourNamespace
{
    static class Program
    {
        static void Main(string[] args)
        {
            using youClass game = new youClass(1000, 1000, "Test App");
            //Run takes a double, which is how many frames per second it should strive to reach.
            //You can leave that out and it'll just update as fast as the hardware will allow it.
            game.Run(60.0);
        }
    }
}

Current Available Functions

On OnLoad
  1. Make sure to add these after base.OnLoad()

  2. createMainLight(Vector3 pos, Vector3 color) ⇒ Creates your main Light (static), make sure to run this function before any other 3D function but after Base.OnLoad(),

  3. createCube(Vector3 Color) ⇒ Creates a 3D cube of the color you specify, returns a handle for making modifications to the cube,

  4. createSphere(Vector3 Color) ⇒ Creates a 3D sphere of the color you specify, returns a handle for making modifications to the sphere,

  5. createTorus(Vector3 Color) ⇒ Creates a 3D torus of the color you specify, returns a handle for making modifications to the torus,

  6. createCylinder(Vector3 Color) ⇒ Creates a 3D cylinder of the color you specify, returns a handle for making modifications to the cylinder,

  7. public int createPlane(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4, Vector3 color) ⇒ Creates a 3D plane of the color you specify, returns a handle for making modifications to the plane,

  8. openTexturedObj(string obj, string texture) ⇒ Opens .obj file with an attached .png texture, returns a handle for making modifications to the object,

  9. openObj(string obj, Vector3 color) ⇒ Opens .obj file with no attached .png texture, returns a handle for making modifications to the object,

On OnRenderFrame
  1. 3D Functions:

    1. rotateObject(float x, float y, float z, int handle),
    2. rotateTexturedObject(float x, float y, float z, int handle),
    3. scaleObject(float scale, int handle),
    4. translateObject(float x, float y, float z, int handle),
    5. translateTexturedObject(float x, float y, float z, int handle),
  2. 2D Functions:

    1. drawRectangle(float x1, float y1, float x2, float y2, Color4 color),
    2. drawLine(float x1, float y1, float x2, float y2, Color4 color),
    3. drawEllipse(float x, float y, float radiusX, float radiusY, Color4 color),
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.4.0 981 12/8/2020
2.3.0 394 12/8/2020
2.2.0 401 12/7/2020
2.1.0 377 12/7/2020
2.0.1 430 11/6/2020
2.0.0 441 11/4/2020
1.8.5 472 11/2/2020
1.8.4 438 11/2/2020
1.8.3 446 11/2/2020
1.8.2 490 11/1/2020
1.8.1 454 11/1/2020
1.8.0 374 11/1/2020
1.7.6 374 11/1/2020
1.7.5 368 11/1/2020
1.7.4 519 10/31/2020
1.7.3 428 10/28/2020
1.7.2 459 10/28/2020
1.7.1 493 10/27/2020
1.7.0 430 10/25/2020
1.6.6 421 10/24/2020
1.6.5 432 10/24/2020
1.6.4 433 10/24/2020
1.6.3 418 10/24/2020
1.6.2 479 10/23/2020
1.6.1 476 10/23/2020
1.6.0 473 10/23/2020
1.5.0 390 10/22/2020
1.4.9 427 10/22/2020
1.4.8 423 10/22/2020
1.4.7 433 10/22/2020
1.4.6 368 10/22/2020
1.4.5 396 10/22/2020
1.4.4 424 10/21/2020
1.4.3 412 10/21/2020
1.4.2 395 10/21/2020
1.4.1 404 10/21/2020
1.4.0 409 10/21/2020
1.3.4.3 420 10/21/2020
1.3.4.2 423 10/21/2020
1.3.4.1 449 10/21/2020
1.3.4 437 10/21/2020
1.3.3 408 10/21/2020
1.3.2.5 427 10/21/2020
1.3.2.4 436 10/21/2020
1.3.2.3 425 10/21/2020
1.3.2.2 395 10/21/2020
1.3.2.1 424 10/21/2020
1.3.2 438 10/21/2020
1.3.1 429 10/21/2020
1.3.0 395 10/21/2020
1.2.0 562 10/18/2020
1.1.0 385 10/18/2020
1.0.0 422 10/18/2020