-
-
Notifications
You must be signed in to change notification settings - Fork 425
There was a bug that existed in open GL ES 2.0 implementations and random textures #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
where glTexImage2D could not convert GL_RGB formed textures into GL_RGBA while generating the noise textures. The GL error was GL_INVALID_OPERATION(0x502) This probably made the noise textures blank. So a new class was added that has the alpha channel for the values.
|
|
||
| static inline float noise( int x) | ||
| { | ||
| x = (x<<13)^x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i truly actually have no idea what is going on here. comment? make some constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is generating random noise data used by some of the visualizers.
The noise functions convert the standard random numbers to follow different
ranges, styles, etc.
inline float noise looks to be generating a psuedo random number that is seeded with X.
This file is basically a copy of PerlInNoise.hpp, and does the same thing as PerlInNoise class, except that it generates the noise in an RGBA buffer instead of an RGB buffer.
OpenGL ES 2.0 cannot transform RGB into RGBA in hardware, but it can do RGBA to RGBA. This is why I me the step-sibling class.
|
you can merge master in to (hopefully) get tests to pass - i just made some fixes |
|
The windows build still appears to be failing |
|
I think I got it. Unable to test on win32 so I reverted that section in timer.h (and cpp) to what it was. |
|
Thanks for the effort! Appreciate it.
https://ci.appveyor.com/project/revmischa/projectm/builds/27573266 |
projectM_SDL_main.cpp - there is code added to make the initial random number dependent on the time of day, making the sequence of visualizers more unexpected. But the posix command time does not exist in Win32 land, so we disable it.
|
Fixed projectM_SDL_main.cpp for windows platforms. |
…ndom textures (#239) * There was a bug that existed in open GL ES 2.0 implementations where glTexImage2D could not convert GL_RGB formed textures into GL_RGBA while generating the noise textures. The GL error was GL_INVALID_OPERATION(0x502) This probably made the noise textures blank. So a new class was added that has the alpha channel for the values. * Added a fudge for render farming milkdrop where we control the time and the ticks. * User defined time: Got rid of testing code * Attempt to fix WIN32 compile - it doesnt use or need the ability to control the time * Got rid of debug - got rid of minor warning * projectM.hpp - type in ifdef projectM_SDL_main.cpp - there is code added to make the initial random number dependent on the time of day, making the sequence of visualizers more unexpected. But the posix command time does not exist in Win32 land, so we disable it.
where glTexImage2D could not convert GL_RGB formed textures into GL_RGBA
while generating the noise textures. The GL error
was GL_INVALID_OPERATION(0x502)
This probably made the noise textures blank.
So a new class was added that has the alpha channel for the values.
Also - added a hook so that the time of day can be manipulated in case milkdrop is being used for non-real time rendering. This hook is not implemented on WIN32 variants.