thothbot / parallax

Cross-platform Java 3D SDK
http://thothbot.github.io
MIT License
84 stars 26 forks source link

SEVERE: material.getId() != this.cache_currentMaterialId #4

Closed patheros closed 9 years ago

patheros commented 10 years ago

I have create a simple test program following the directions found here: https://github.com/thothbot/parallax/wiki/NewApplication

The program constantly logs "SEVERE: material.getId() != this.cache_currentMaterialId"

As far as I can tell this log is coming out of WebGLRenderer:1530

Looking through the code of WebGLRenderer, I don't see any way in which cache_currentMaterialId is set except when this log is triggered.

If this is expected behavior then log level should not be error/severe. If it is logging this frequently then I think it should be at debug/fine level.

I am using GWT 2.4.0 and Parallax 1.3

stikdragon commented 10 years ago

I also see this behaviour, it looks unavoidable if you check out WebGLRenderer:818 which sets cache_currentMaterialId to -1 in the render method, then in setProgram it checks to see if it's the same as the current material. As far as i can tell these are the only references to this field. It almost looks as though this is normal behaviour, and the log message should just be a FINE rather than SEVERE. It's basically saying "if it's not the current material then set it, and log an message".

I get a very similiar problem a few lines down if i use any Plugin, it constantly "warns" that the shader has changed. It's irritating as it hides actual log information behind a rapidly scrolling wall of text!

jbruchanov commented 10 years ago

same problem here, can please someone disable this log spamming ?...

sebasbaumh commented 10 years ago

I created a pull request for this one as it was the first thing I stumbled upon: https://github.com/thothbot/parallax/pull/10