Hello Johannes,

On 2016-07-01 01:53, Johannes wrote:
> On 01.07.2016 01:14, Carsten Neumann wrote:
>>> and the problem is gone for me. Could you check that in your setup please.
>>
>> hmm, it now is non-deterministic, i.e. sometimes it works sometimes it
>> does not. I suspect that is because the texture contents are indeed
>> undefined.
>> Ideally we would have a way to issue a glClearTex{Sub,}Image call to
>> initialize the texture content.
>>
> Could you elaborate a little at which place do you think that this api
> should be called.

I suspect the problem is that the texture memory is not initialized, 
because there is no data specified for the OSG::Image used with the 
OSG::TextureObjChunk - which is mostly fine since these textures are 
used as render targets before they are read for the first time - except 
for the adaptive luminance texture from the previous frame (which has 
undefined content on the very first frame).
For this texture we would need a way to initialize it when it is 
created. I haven't thought through all the consequences, but one way to 
do this is add a field SFVector4f "ClearValues" to TextureObjChunk and 
if the Image has no data issue the glClearTexImage call when creating 
the OpenGL texture object in TextureObjChunk::handleTexture.

> First, why do you do not accept the nullptr instead of macro NULL? Do we
> really have to support such ancient compilers from the pre c++11 time?

On linux it is more about the default compiler dialect. GCC 6.1 
(released 2016-04) is the first release that switched the default to 
C++14 (previous C++98). So while it had full support for C++11 for a 
long time it is not enabled by default.
That means system compiler for distributions that are widely used at 
this point in time need an extra compiler switch to compile C++11 code.

> Second, you did make a change in OSGStateOverride.cpp from a
> const_iterator to a mutable iterator. What was the reason for that change?

The overload of std::vector<T>::erase() that takes a const_iterator 
overload is a C++11 addition, before erase() required a iterator 
argument, see http://en.cppreference.com/w/cpp/container/vector/erase

> Third, I'm still hoping for a CMake build system solution for the
> AntTweakBar library, that allows me to easily integrate the library in
> the generated example projects. Do you have an idea how to setup things
> for that. If not, however, I will take some time to come up with a
> solution, hopefully.

I haven't gotten around to that. If you want to take a stab at it that 
would certainly be appreciated. It should be possible to model this 
after the existing external dependencies (e.g. image format libs). So 
add a OSG_CONFIGURE_ANTTWEAKBAR macro to 
CMake/OSGConfigurePackages.cmake and call find_package() from there. For 
more details I'll have to dive back into the build system myself, been a 
while that I looked at it.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to