tag:blogger.com,1999:blog-1265125331765205173.post627865381412250840..comments2024-03-13T09:09:15.066+01:00Comments on Dreamstate Coding: OpenGL 4 with OpenTK in C# Part 3: Passing data to shadersUnknownnoreply@blogger.comBlogger21125tag:blogger.com,1999:blog-1265125331765205173.post-29282138963437159422021-02-13T22:41:49.326+01:002021-02-13T22:41:49.326+01:00I really, really love you! This is my second tutor...I really, really love you! This is my second tutorial and it is answering all my major question so far.Anonymoushttps://www.blogger.com/profile/00968136583718567521noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-16731989559645564132018-12-01T15:53:35.365+01:002018-12-01T15:53:35.365+01:00Hi there!
Yes, this guide uses the opengl 4+ way o...Hi there!<br />Yes, this guide uses the opengl 4+ way of doing things.Eowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-1711205189218952182018-11-28T14:22:15.941+01:002018-11-28T14:22:15.941+01:00I am trying to learn a little about modern Opengl,...I am trying to learn a little about modern Opengl, I am grateful to use csharp, but I wonder if these classes use the modern Opengl concept?Anonymoushttps://www.blogger.com/profile/18161073333385322825noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-61544836758304242152018-08-12T21:27:04.521+02:002018-08-12T21:27:04.521+02:00Hi. same problem here. I retyped passing fuction t...Hi. same problem here. I retyped passing fuction to GL.VertexAttrib1(0, (float)_time); to get proper float overload, but this did not help. Furthermore, when I change code on shader side only just to "load" from any other location ( = 5 for example), it shows fixed color, but for 0 it shows none square (or transparent).Karelnoreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-79770328444504556272018-06-29T22:04:59.926+02:002018-06-29T22:04:59.926+02:00Hi there! My tutorials focus on the OpenGL API ver...Hi there! My tutorials focus on the OpenGL API version 4. There are a lot of resources describing previous openGL versions elsewhere on the internet. Just that when I started out with v4, there was no other tutorial, hence this series.Eowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-75199204018744747352018-06-28T17:24:50.410+02:002018-06-28T17:24:50.410+02:00Found out the hard way my little Potato of a compu...Found out the hard way my little Potato of a computer can't handle some of the code in the tutorial. Just wondering what sections of code would need to be replaced with what for getting this usable for those of us on older graphics cards? I know OpenTK has several versions it can target even now so it might just be a matter of figuring out what lib of the OpenTK graaphics lib to use.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-35630904671769942592018-03-12T14:22:06.463+01:002018-03-12T14:22:06.463+01:00Hi there, sorry for the late reply.
Little bit uns...Hi there, sorry for the late reply.<br />Little bit unsure, I would check that the C# code binds the variables correctly as a starter.. I.e. GL.VertexAttrib4(1, position); And that you are using the correct overload of the API call. VertexAttrib4 for a Vector4 and VertexAttrib1 for a float for example.. Hope this helps!Eowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-38644781660728331662018-03-12T14:16:47.143+01:002018-03-12T14:16:47.143+01:00Hi there, sorry for the late reply. I think that y...Hi there, sorry for the late reply. I think that you need a newer graphics chip to fully use these tutorials as they target OpenGL 4.5 and up, i.e. many of the API calls that are used do not work on older hardware. Please refer to the following wikipedia article for information on how the versions of GLSL and OpenGL work together: https://en.wikipedia.org/wiki/OpenGL_Shading_Language#VersionsEowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-54097313255063401332018-02-25T05:37:36.668+01:002018-02-25T05:37:36.668+01:00Hello, great tutorial but I have a question.
For ...Hello, great tutorial but I have a question.<br /><br />For some reason if I use the variable defined in "layout (location = 0)" the point don't show. It works if I change that to layout (location = 1) and layout (location = 2).<br /><br />Did you have an idea what may causing this?<br /><br />Thankszoserhttps://www.blogger.com/profile/00421904707951551339noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-4243696761613934652018-02-20T23:50:45.348+01:002018-02-20T23:50:45.348+01:00Hello, thanks you for your great tutorials, they a...Hello, thanks you for your great tutorials, they are really helpful.<br /><br />I am having problems recreating this particular bit in my code.<br />I am running Lubuntu with mono, as the machine i am using is rather old .<br />The graphics chip support OpenGL 2.1 so i think the problem might be because of that.<br />I can see the dot in the middle of the window, however i am failing to reproduce the movement and color change. My code does correlate with the code on your github page.<br />The program does not complain about anything. Any help would be appreciated.<br /><br />best regards.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-22650745661218711842018-01-22T22:31:49.638+01:002018-01-22T22:31:49.638+01:00Hmm.. Wouldn't that take quite a while? :)
Gi...Hmm.. Wouldn't that take quite a while? :) <br />Given that _time is per second and double has the approximate range ±5.0 × 10^−324 to ±1.7 × 10^308<br />See documentation https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/doubleEowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-31472325333395556532018-01-22T08:01:39.830+01:002018-01-22T08:01:39.830+01:00Maybe mod _time by 2 * Math.PI in case of double o...Maybe mod _time by 2 * Math.PI in case of double overflow when the program runs for a long while.<br /><br />Just some trivia for thought. :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-84373280229156549552017-02-03T17:05:17.174+01:002017-02-03T17:05:17.174+01:00Thank you for your comments,
I had similar issue, ...Thank you for your comments,<br />I had similar issue, I found a way to trigger the application to use Nvidia as default in http://dreamstatecoding.blogspot.se/2017/01/opentk-glcompileshader.html<br />Now my driver reports opengl 4.5 on nvidia (updated drivers) and later posts require that..Eowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-7204883080654628242017-02-03T17:02:22.436+01:002017-02-03T17:02:22.436+01:00Ah. should probably have read a bit more indepth. ...Ah. should probably have read a bit more indepth. so your opengl version reports No errors in the info. Ill probably just change it to info logging and no exceptions in later tutorial. I did not think of that as my machine just returns empty string.Eowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-50321824041412699732017-02-03T16:59:29.665+01:002017-02-03T16:59:29.665+01:00Hi there,
old habit to use just that method to che...Hi there,<br />old habit to use just that method to check, if info contains anything we got an error or a warning and want to quit here. If it is empty, null or just blanks then we assume that everything went OK. I.e. it has no content :)<br />Eowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-17108260212256869312017-02-03T16:38:57.424+01:002017-02-03T16:38:57.424+01:00I had similar situation under intel graphics and o...I had similar situation under intel graphics and openGL 4.0.0. After changing on Nvidia and openGL 4.4.0 program normally works.Nedeljko Sovljanskihttps://www.blogger.com/profile/14381457785222375569noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-61001391055548381902017-02-03T16:36:39.540+01:002017-02-03T16:36:39.540+01:00Previous comment is done under Inter graphics. Und...Previous comment is done under Inter graphics. Under Intel my computer is using OpenGL 4.0.0 so I changed version in your code on 4 0 0. Also I removed ! from if statement conditions and program have normally run but I have got static blue screen (no point, no movement).<br />Then, I changed graphic card on nvidia. Now OpenGL is 4.4.0 so I changed code again and also I have to put ! in if statements, because variable info is now equal "". After this modification program normally work. Point is running and changing color.Nedeljko Sovljanskihttps://www.blogger.com/profile/14381457785222375569noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-23584347206428337312017-02-03T16:12:52.513+01:002017-02-03T16:12:52.513+01:00I pasted your code as you recommended but during r...I pasted your code as you recommended but during running method CompileShader info variable is equal "no errors.\n" and <br />if (!string.IsNullOrWhiteSpace(info))<br /> throw new Exception($"CompileShader {type} had errors: {info}");<br />return shader;<br />throw exception. Why you use !string.IsNullOrWhiteSpace?Nedeljko Sovljanskihttps://www.blogger.com/profile/14381457785222375569noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-8867970811177437962017-02-03T16:11:19.745+01:002017-02-03T16:11:19.745+01:00This comment has been removed by the author.Nedeljko Sovljanskihttps://www.blogger.com/profile/14381457785222375569noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-10347413812515586132017-01-30T16:31:04.178+01:002017-01-30T16:31:04.178+01:00Hi there!
Thank you for your comment, thanks to y...Hi there! <br />Thank you for your comment, thanks to you I've now created my first GitHub repository. It contains the code at the end of part 4 of this series.<br />https://github.com/eowind/dreamstatecoding<br />Hope that you sort out the issue, if you find that I've missed to add something in the article please let me know :)Eowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-1265125331765205173.post-71275615606706571682017-01-30T15:15:17.035+01:002017-01-30T15:15:17.035+01:00After making this changes I don't see the poin...After making this changes I don't see the point any more.<br />I saw the static one in the previous post.<br />Can you please give the complete code so far?Anonymousnoreply@blogger.com