Skip to content

Conversation

@hibengler
Copy link
Contributor

@hibengler hibengler commented Sep 18, 2019

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.

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;
Copy link
Member

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?

Copy link
Contributor Author

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.

@revmischa
Copy link
Member

you can merge master in to (hopefully) get tests to pass - i just made some fixes

@revmischa
Copy link
Member

The windows build still appears to be failing

       "C:\projects\projectm\msvc\projectM.sln" (default target) (1) ->
       "C:\projects\projectm\msvc\projectM.vcxproj.metaproj" (default target) (4) ->
       "C:\projects\projectm\msvc\projectM.vcxproj" (default target) (8) ->
       (ClCompile target) -> 
         C:\projects\projectm\msvc\../src\libprojectM\timer.cpp(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\projects\projectm\msvc\projectM.vcxproj]
         C:\projects\projectm\msvc\../src\libprojectM\timer.cpp(30): error C2146: syntax error: missing ';' before identifier 'pprojectm_gettimeofday' [C:\projects\projectm\msvc\projectM.vcxproj]
         C:\projects\projectm\msvc\../src\libprojectM\timer.cpp(66): error C2065: 'pprojectm_gettimeofday': undeclared identifier [C:\projects\projectm\msvc\projectM.vcxproj]
         C:\projects\projectm\msvc\../src\libprojectM\timer.cpp(70): error C3861: 'projectm_gettimeofday': identifier not found [C:\projects\projectm\msvc\projectM.vcxproj]

@hibengler
Copy link
Contributor Author

I think I got it. Unable to test on win32 so I reverted that section in timer.h (and cpp) to what it was.

@revmischa
Copy link
Member

Thanks for the effort! Appreciate it.

    C:\projects\projectm\msvc\../src\projectM-sdl\projectM_SDL_main.cpp(112): error C3861: 'time': identifier not found [C:\projects\projectm\msvc\projectMSDL.vcxproj]

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.
@hibengler
Copy link
Contributor Author

Fixed projectM_SDL_main.cpp for windows platforms.

@revmischa revmischa merged commit d1314d0 into projectM-visualizer:master Oct 1, 2019
revmischa pushed a commit that referenced this pull request Nov 16, 2019
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants