dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
766 stars 300 forks source link

Replace dynamic invoke #70

Closed robinsedlaczek closed 9 years ago

robinsedlaczek commented 9 years ago

I was a little confused by the performance project. I think I created it in the past. So I revert this commit. Hopefully it works now. There is no compilation error here.

robinsedlaczek commented 9 years ago

Don't know where this error comes from. I'll continue investigate it...

robinsedlaczek commented 9 years ago

I don't know why App Veyor shows this error. When I look into the changes of the OpenGLExtensions.cs in this PR, it looks fine. Please help!

dwmkerr commented 9 years ago

Hi Robin,

Let me help - basically you are probably compiling the branch ReplaceDynamicInvoke, which I'm guessing compiles without errors, however what AppVeyor is compiling is the result of the merge of ReplaceDynamicInvoke into v/2.4. So the merge result is different to what you have in your branch and that's probably why you are not seeing the error.

Try checking out v/2.4 and merging in ReplaceDynamicInvoke, that'll probably lead you in the right direction :)

You can also just do:

git fetch -q origin +refs/pull/70/merge:
git checkout -qf FETCH_HEAD
robinsedlaczek commented 9 years ago

Thanks a lot Dave! That was the problem. I forgot the merge. Next time I'll remember. :) There is one TODO in the code from me in method 'GetProgramResource'. Can you please have a look?

dwmkerr commented 9 years ago

Yes indeed, anything to get me away from battling with the Visual Studio Extensions for a bit :)

robinsedlaczek commented 9 years ago

Cool, thx! Sounds tricky with the extensions. I saw the correspondence. Good luck. I'll update the Wiki and then continue with the WPF control.

dwmkerr commented 9 years ago

Hi Robin,

PR looks good, with respects to the TODO I think it should just be:

var lengthParameter = new uint[1];
var parametersParameter = new int[bufSize];

GetDelegateFor<glGetProgramResourceiv>()(program, programInterface, index, propCount, props, bufSize, lengthParameter, parametersParameter);
length = lengthParameter[0];
parameters = parametersParameter;

The original implementation was off. I think this is the only change needed then we can merge it

robinsedlaczek commented 9 years ago

Great! Comes tomorrow! Ok, now I see the parameters and I am aware of it regarding the next time! :)

Von meinem Windows Phone gesendet


Von: Dave Kerrmailto:notifications@github.com Gesendet: ‎22.‎01.‎2015 19:16 An: dwmkerr/sharpglmailto:sharpgl@noreply.github.com Cc: Robin Sedlaczekmailto:robin.sedlaczek@live.de Betreff: Re: [sharpgl] Replace dynamic invoke (#70)

Hi Robin,

PR looks good, with respects to the TODO I think it should just be:

var lengthParameter = new uint[1];
var parametersParameter = new int[bufSize];

GetDelegateFor<glGetProgramResourceiv>()(program, programInterface, index, propCount, props, bufSize, lengthParameter, parametersParameter);
length = lengthParameter[0];
parameters = parametersParameter;

The original implementation was off. I think this is the only change needed then we can merge it


Reply to this email directly or view it on GitHub: https://github.com/dwmkerr/sharpgl/pull/70#issuecomment-71069315

robinsedlaczek commented 9 years ago

Hey Dave! Now it should be done!

robinsedlaczek commented 9 years ago

Ok, Wiki has been updated with our experiences regarding dynamic invocation of functions.

dwmkerr commented 9 years ago

Awesome :)