Questions tagged [opentk]

The Open Toolkit is an advanced, low-level C# library that wraps OpenGL, OpenCL and OpenAL. It is suitable for games, scientific applications and any other project that requires 3d graphics, audio or compute functionality.

The opentk toolkit wraps OpenGL, OpenCL, OpenAL to C#. This is done using types aiming to make development less error-prone.

The project ships with additional code for instance to render OpenGL graphics on a System.Windows.Forms.Form dialog or control together with loaders for various format.

The project is licensed under the MIT/X11 license.

References

Tutorials and examples:

972 questions
3
votes
1 answer

OpenGL - strange SSAO artifact

I followed the tutorial at Learn OpenGL to implement Screenspace Ambient Occlusion. Things are mostly looking okay besides a strange artifact at the top and bottom of the window. The problem is more obvious moving the camera, when it appears as if…
livin_amuk
  • 1,285
  • 12
  • 26
3
votes
1 answer

Show half portion of image side by side - OpenGL

I have created two textures for two images. Now I want to show this textures in opengl in an order that left part of image2, full image1, right part of image2. I have done like below. Image1 shows at the center of opengl screen. But left and right…
nsds
  • 961
  • 4
  • 13
  • 39
3
votes
1 answer

Problems using GLTexImage3D correctly

This is how I give the Bitmaps to OpenGL. (C#) public static int Generate3DTexture( string[] names ) // file paths { //basically merging the images into one vertical column of images MagickImageCollection allimages = new…
gunfulker
  • 678
  • 6
  • 23
3
votes
1 answer

OpenTK text animation

Does anybody know how to do, or where to find some good examples, for scrolling (animating) 2D text using OpenTK framework. I need something like bottom (top) scrolling tickers on news TV channels. Thanks.
m1k4
  • 829
  • 2
  • 12
  • 26
3
votes
1 answer

GLSL Passthrough Geometry Shader

I've been learning OpenGL (actually OpenTK) for a month or so, and I've started playing with geometry shaders. I originally wrote a much more complicated shader, which didn't work, so I've stripped everything down a simple passthrough shader, which…
Andrew Tofelt
  • 300
  • 2
  • 8
3
votes
1 answer

OpenTK-based game stutters intermittently

I'm currently developing a game using OpenTK for rendering; C#, .Net 4.0, OpenGL 2. Running maximized (not full screen, but taking up all the available screen space) on 1280x1024 resolution, I'm seeing about 400 FPS average. On 1680x1050 resolution,…
Kelsie
  • 1,000
  • 1
  • 9
  • 21
3
votes
1 answer

OpenGL Normals don't work?

I'm working on a OpenGL project and I want at least a little lighting in it. I'm trying to use OpenGLs built in lighting for a while now but I'm not having much success. Models I load have their correct normals (calculated by Wings3D) attached to…
Cobra_Fast
  • 15,671
  • 8
  • 57
  • 102
3
votes
2 answers

VS code how to add System.Drawing

I want to use system.drawing in my project but I cant make it work. I have found this question, but it shows only how to add SQLite.NET-PCL, if I try doing it the same way for System.Drawing it doesnt work. Here is my project.json: { "version":…
Tygrak
  • 31
  • 1
  • 4
3
votes
1 answer

openTk .net core keep window always on top

I'm trying to find a way to keep a window always on top. (it has to be in windowed mode) I'm currently using OpenTk.NetCore library for making a window in .net core. Is it possible to use OpenTk for keeping this window on top or is there an other…
3
votes
1 answer

Use monogame with winforms

I'm currently trying to create a mapeditor using monogame and winforms in C#. I'm working in Visual Studio 2015 on a Windows 7 machine. I created a winforms project and proceeded by adding the following references: MonoGame.Framework, OpenTk and…
TS1997
  • 106
  • 1
  • 11
3
votes
1 answer

OpenTK keypress?

I'm looking for a cross platform (Win & MacOS) method to detect keypresses in C# for an OpenGL application. The following works, but for alphanumeric characters only. protected override void OnKeyPress(OpenTK.KeyPressEventArgs e) { if (e.KeyChar…
livin_amuk
  • 1,285
  • 12
  • 26
3
votes
1 answer

Artifact when drawing with a rotation

I have noticed a weird artifact occuring when I'm drawing a texture in a rotated rectangle. My basic picture is this : When I draw "horizontally", the result is as expected : But when I start drawing them in a rotated square, 2 artifacts apear…
Remy Grandin
  • 1,638
  • 1
  • 14
  • 34
3
votes
2 answers

What's wrong with my project and unproject functions?

I'm using OpenTK for a game in C#, and it doesn't come with the project and unproject functions, which convert between world and screen coordinates. Well, it does, but they're deprecated and I couldn't get them to work. I took a shot at implementing…
Tesserex
  • 17,166
  • 5
  • 66
  • 106
3
votes
1 answer

OpenTK error, Unable to load DLL 'libGLES.dll

So I just got started with OpenTK, and have this code in a class that subclasses the GameWindow class: protected override void OnRenderFrame(FrameEventArgs e) { base.OnRenderFrame(e); int val = (int)ClearBufferMask.ColorBufferBit; …
Nattfrosten
  • 1,999
  • 4
  • 16
  • 21
3
votes
1 answer

GLSL 110 does not allow sub- or super-matrix constructors

I am trying to convert a 330 shader to 110 but can't find a work around for: v_norm = normalize(mat3(modelview) * vNormal); The error returned is: GLSL 110 does not allow sub- or super-matrix constructors The complete shader: #version…
livin_amuk
  • 1,285
  • 12
  • 26