
TextureMinFilter in CLI/C++
Posted Saturday, 11 December, 2010 - 00:59 by LikeTK inThe following statement does not work in CLI C++
GL::TexParameterI( TextureTarget::Texture2D,TextureParameterName::TextureMinFilter, (int)TextureMinFilter::Linear); GL::TexParameterI( TextureTarget::Texture2D,TextureParameterName::TextureMagFilter, (int)TextureMagFilter::Linear);
(int)TextureMinFilter::Linear); (int)TextureMagFilter::Linear);
Both are not recognized as acceptable parameters
Any feedback?


Comments
Re: TextureMinFilter in CLI/C++
What is the error message?
Edit (slightly offtopic): you may wish to take a look at glplusplus. It's a raw C++ version of the bindings that can be used along with OpenTK. It's slightly lower level (no implicit GC pins) but should be faster (no interop overhead).
Re: TextureMinFilter in CLI/C++
The visual studio intellisense does not recognize
TextureMinFilter::Linear in the first place.
Both TextureParameterName and TextureMinFilter are enum from OpenTK.Graphics.OpenGL
With TextureParameterName :: this will produce a list of option to choose
With TextureMinFilter:: this will not produce a list of option to choose
I will try to use the lastest version and feedback.
Please provide some working example of glplusplus, now, it is not clear what kinds DLLS, that I need to put in the same folder as the test.exe generated from Cmakelist to run the example.
IT is a new standard, but I have not figure out where to read and find more info just to get a quick idea of the values of the glplusplus. More examples will help, ready to run.
Thanks
Re: TextureMinFilter in CLI/C++
The visual studio intellisense does not recognize
TextureMinFilter::Linear in the first place.
Does the code compile? You might be hitting a bug in intellisense (which is not as far-fetched as it sounds).
Please provide some working example of glplusplus, now, it is not clear what kinds DLLS, that I need to put in the same folder as the test.exe generated from Cmakelist to run the example.
IT is a new standard, but I have not figure out where to read and find more info just to get a quick idea of the values of the glplusplus. More examples will help, ready to run.
Glplusplus is brand new, barely a week old, so examples and documentation are sparse. Check out its readme: the main idea to copy the contents of the include/ and src/ folders into your project,
#include "gl++"and then use it just as regular (native) OpenGL.The test is just a sanity check: does it compile? Does it run? No need to compile it or include it in your project.
More examples will be coming down the road but usage is identical to regular OpenGL. The main difference is that glplusplus formats its functions like OpenTK (i.e. GL::Vertex3 and GL::Ext::GenFramebuffer instead of glVertex3[fdui]v and glGenFramebufferEXT) and that it uses enum parameters instead of const ints.
Re: TextureMinFilter in CLI/C++
With TextureParameterName :: this will produce a list of option to choose ( type TextureParameterName :: and the intellisense produce a list of option)
The issue is why
With TextureMinFilter:: this will not produce a list of option to choose
( type TextureMinFilter:: nothing happen,
this means, OpenGL::TextureMinFilter is fine, but not OpenGL::TextureMinFilter::Linear , it is not accepted)
No, the code does not compile, without solving this problem, one can not enable texture in OpenTK CLI/C++.
for most of the time, it is possible to cut and paste codes from C# to CLI/C++. THis is the only exception I found so far. Please advice what I can do to look into the codes to see If I can correct this.
Re: TextureMinFilter in CLI/C++
I have replaced the binary with OpenTK 1.1
Not sure this is the main reason, but now intellisense work
Summary:
With TextureMinFilter:: this produce a list of option to choose
Problem: The codes do not compile
Error 1 error C2665: 'OpenTK::Graphics::OpenGL::GL::TexParameterI' : none of the 6 overloads could convert all the argument types
(Solved) TextureMinFilter in CLI/C++