[SOLVED] Clipplanes in opengl
Re: [SOLVED] Clipplanes in opengl
@Sinsemilla: irr::core::string::empty is only available in svn trunk, that was not yet in Irrlicht 1.7. So I guess you will have to install svn trunk for that (often the better choice anyway).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 38
- Joined: Mon Jan 09, 2012 5:07 pm
Re: [SOLVED] Clipplanes in opengl
@CuteAlien: Thanks for the advice, by using the trunk the irr::core::string::empty errors are gone.
Unfortunately i still need a little bit help. The are 3 errors left which i don't really know what to do about. The compiler tells me that basically that the assingment operator for the class map can't be used. This happens in void CPostProcessManager::SwapAuxBuffers(), on this line of code:
||=== RMLWars, Release ===|
irrMap.h||In member function ‘irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::operator=(const irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass&)’:|
irrMap.h|631|error: non-static reference member ‘irr::core::map<const irr::core::string<char>, irr::video::ITexture*>& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::Tree’, can’t use default assignment operator|
irrMap.h|631|error: non-static reference member ‘const irr::core::string<char>& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::Key’, can’t use default assignment operator|
PostProcessManager.cpp||In member function ‘void CPostProcessManager::SwapAuxBuffers()’:|
PostProcessManager.cpp|53|note: synthesized method ‘irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::operator=(const irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass&)’ first required here |
||=== Build finished: 3 errors, 0 warnings ===|
||=== Build finished: 3 errors, 0 warnings ===|
Anyway, many thanks in advance.
Unfortunately i still need a little bit help. The are 3 errors left which i don't really know what to do about. The compiler tells me that basically that the assingment operator for the class map can't be used. This happens in void CPostProcessManager::SwapAuxBuffers(), on this line of code:
Code: Select all
RenderTargetMap["auxIn"] = RenderTargetMap["auxOut"];
irrMap.h||In member function ‘irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::operator=(const irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass&)’:|
irrMap.h|631|error: non-static reference member ‘irr::core::map<const irr::core::string<char>, irr::video::ITexture*>& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::Tree’, can’t use default assignment operator|
irrMap.h|631|error: non-static reference member ‘const irr::core::string<char>& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::Key’, can’t use default assignment operator|
PostProcessManager.cpp||In member function ‘void CPostProcessManager::SwapAuxBuffers()’:|
PostProcessManager.cpp|53|note: synthesized method ‘irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass& irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass::operator=(const irr::core::map<const irr::core::string<char>, irr::video::ITexture*>::AccessClass&)’ first required here |
||=== Build finished: 3 errors, 0 warnings ===|
||=== Build finished: 3 errors, 0 warnings ===|
Anyway, many thanks in advance.
Last edited by Sinsemilla on Tue Nov 18, 2014 12:45 am, edited 1 time in total.
-
- Posts: 38
- Joined: Mon Jan 09, 2012 5:07 pm
Re: [SOLVED] Clipplanes in opengl
I could solve the problem by rewriting the line in SwapAuxBuffers .
In the meantime i compiled the little demo code. But somehow i have a weird water effect where the normalmap seem to shine through the surface looking like this:
Also the distortion seems to be too strong during the underwater view:
I compiled the example on Linux, so it all about GLSL .
In the meantime i compiled the little demo code. But somehow i have a weird water effect where the normalmap seem to shine through the surface looking like this:
Also the distortion seems to be too strong during the underwater view:
I compiled the example on Linux, so it all about GLSL .
-
- Posts: 38
- Joined: Mon Jan 09, 2012 5:07 pm
Re: [SOLVED] Clipplanes in opengl
And btw: as you can see the sky has changed. I am using a skydome. However, i first compiled the example with a skybox, which had the same effect as result. I could be also important to say that the windows example executed through wine is looking identical to the first screenshots posted in this thread (therefore it is looking as expected since the skybox error is visible):
-
- Posts: 38
- Joined: Mon Jan 09, 2012 5:07 pm
Re: [SOLVED] Clipplanes in opengl
I have a little guess: The only thing which is really different is the revision of the svn trunk, mine is probably never. @tbw which Rev. did you use for the example? i used rev. 4113.
-
- Posts: 38
- Joined: Mon Jan 09, 2012 5:07 pm
Re: [SOLVED] Clipplanes in opengl
After a little bit of trying i found out that the changes from rev 4105 to 4106 are causing the weird effect. So using rev 4105 is fine for me
Re: [SOLVED] Clipplanes in opengl
I just checked the part that map's can't do the "mymap["foo"] = mymap["bar"]" thing. The reason is that core::map returns some AccessClass instead of just a reference to T. But I don't think that was ever different - so your code probably should use std::map instead (and maybe some day someone finds motiviation to dig into core::map and figure out if there is any reason for that...).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: [SOLVED] Clipplanes in opengl
Hi, in a rev4106 we added support for an int uniforms and now in Your shader callback, You must bind a textures by int instead of float parameter, so eg:
I think that we should add some note about this change (and improve example no. 10, because currently it usage wrong, floats type method). Bind a texture by a float interface caused problems on some machines (texture wasn't bind properly, but only in some cases, so was problematic for debugging and thats why I removed support for textures by a float interface and left only int interface for a textures).
BTW. In an OpenGL shader callback we use extGlGetUniformLocation call for an each setPixelShaderConstant call and this is serious fault (It can cause fps drop in an applications with many setPixelShaderConstant calls). In my opinion we should add a cache similar for this for vertex attribute locations in FVF stuff. For shaders, cache will be even simpler.
Code: Select all
int Tex0 = 0;
dervices->setPixelShaderConstant("tex0", &Tex0, 1)0;
int Tex2 = 2;
dervices->setPixelShaderConstant("tex2", &Tex2, 1);
BTW. In an OpenGL shader callback we use extGlGetUniformLocation call for an each setPixelShaderConstant call and this is serious fault (It can cause fps drop in an applications with many setPixelShaderConstant calls). In my opinion we should add a cache similar for this for vertex attribute locations in FVF stuff. For shaders, cache will be even simpler.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: [SOLVED] Clipplanes in opengl
I used a rev earlier than 4106, because the new setPixelShaderConstant with int uniforms Nadro mentioned was not available.
I didn't notice the change though I look into this part of the code quite often.
@Sinsemilla: In which way did you change the swapAuxBuffer code (I want to change the code and upload a new version for the xml postproc framework)
I thing changing SwapAuxBuffers from
to
should work
Also the water is nearly finished and I will upload it in the next days in the code snippets section.
Thanx in advance!
I didn't notice the change though I look into this part of the code quite often.
@Sinsemilla: In which way did you change the swapAuxBuffer code (I want to change the code and upload a new version for the xml postproc framework)
I thing changing SwapAuxBuffers from
Code: Select all
void CPostProcessManager::SwapAuxBuffers()
{
// swap the in and out buffers
video::ITexture* tmp = RenderTargetMap["auxIn"];
RenderTargetMap["auxIn"] = RenderTargetMap["auxOut"];
RenderTargetMap["auxOut"] = tmp;
}
Code: Select all
void CPostProcessManager::SwapAuxBuffers()
{
// swap the in and out buffers
video::ITexture* auxIn = RenderTargetMap["auxIn"];
video::ITexture* auxOut = RenderTargetMap["auxOut"];
RenderTargetMap["auxIn"] = auxOut;
RenderTargetMap["auxOut"] = auxIn;
}
Also the water is nearly finished and I will upload it in the next days in the code snippets section.
Thanx in advance!
-
- Posts: 38
- Joined: Mon Jan 09, 2012 5:07 pm
Re: [SOLVED] Clipplanes in opengl
@tbw: Looks like this is the most obvious change possible. My code in SwapAuxBuffers looks exactly the same, this will definitively work. Even the variable name is identical