Hello colleagues,
First of all I want to apologize for the length of this message. I tried to make it short, but…
I use constantly OpenGL on Windows. I know that it doesn’t work on OSX, but that is a too long story.
I remember when I discovered that I should use MyOpenGLContext.MakeCurrent because it creates somewhere to store all the values I want to use.
At that moment I created dozens of these orders and everything went smooth. So I forgot about it.
But recently I bought a laptop and nothing was drawn using OpenGL.
Of course I began updating all the drivers and looking into Internet. Unfortunately OpenGL is not part of Xojo, so its help is really small.
After many changes something was drawn on my Laptop, so I knew that the laptop worked and something in my program was the culprit.
But the program had worked during years in my Desktop, why? Finally I noticed that the Graphic Board was NVIDIA and on my laptop it was Intel Iris Xe.
The thing is with NVIDIA you can write as many lines as you want with .MakeCurrent, but with other Boards if you put an unnecessary one nothing is drawn.
I imagine that an error is generated but I am not sure.
My question is:
Is it possible yo know when .MakeCurrent is necessary?
I imagine that when the context is clear there is no need to write this line and if you do it out of NVIDIA (I’ve seen the same problem with other Boards) you get nothing drawn and you don’t know why. Of course, perhaps I did something in my Desktop some time ago but I don’t remember what.
Can you help me? I would appreciate it.