opentk

OpenGL 4.2 LookAt matrix only works with -z value for eye position

妖精的绣舞 提交于 2020-07-13 15:41:12
问题 I am trying to understand and apply modern OpenGL matrix transformations. I already read a lot of different sources but I am not sure what I am actually doing wrong. The issue I have is also commented in the code: If I set the eye coordinates of the Matrix4.LookAt to a z value that is greater or equal 0 or lower -2 the triangle is not visible anymore. Can someone explain why? As far as I understood the method the triangle should just be visible just from the other side (explicitly disabling

OpenGL 4.2 LookAt matrix only works with -z value for eye position

痞子三分冷 提交于 2020-07-13 15:40:26
问题 I am trying to understand and apply modern OpenGL matrix transformations. I already read a lot of different sources but I am not sure what I am actually doing wrong. The issue I have is also commented in the code: If I set the eye coordinates of the Matrix4.LookAt to a z value that is greater or equal 0 or lower -2 the triangle is not visible anymore. Can someone explain why? As far as I understood the method the triangle should just be visible just from the other side (explicitly disabling

C# OpenTK - Draw string on window

為{幸葍}努か 提交于 2020-05-09 08:38:07
问题 I've a big problem: I've an OpenTK window open where I draw textures, images, etc. I've to do a little videogame in this manner for a test and I'ld like to show text on it that shows game infos. Actually I've been only able to open a Window form with text and it's not what I need. Is there a manner to show text in a OpenTK window? I can't use OpenTK 3.0, so QuickFont has to be excluded. I can use GL Class. Thank you very much! 回答1: One possibility would be to use FreeType library to load a

How to clip circular region in OpenTK (mini-map!)

流过昼夜 提交于 2020-02-03 12:19:10
问题 My game is in C# using OpenTK, which is a wrapper around OpenGL. I'm rendering my mini-map as shown below. The problem is that objects aren't clipped at the edge, so they bleed over. I could render a thicker border to hide it, but that's not ideal and it won't work for larger objects. There could be trajectory lines and other things which also bleed beyond the bounds. I'm just rendering these using basic primitives. How can I go about clipping this region? Is there any way to render this to a

How to clip circular region in OpenTK (mini-map!)

荒凉一梦 提交于 2020-02-03 12:17:22
问题 My game is in C# using OpenTK, which is a wrapper around OpenGL. I'm rendering my mini-map as shown below. The problem is that objects aren't clipped at the edge, so they bleed over. I could render a thicker border to hide it, but that's not ideal and it won't work for larger objects. There could be trajectory lines and other things which also bleed beyond the bounds. I'm just rendering these using basic primitives. How can I go about clipping this region? Is there any way to render this to a