Commit 09ca7309 authored by Matthias Klumpp's avatar Matthias Klumpp

Fix parser and some other problems, as well as an OGL issue

parent 269b2ab9
fix to parser in cases like 1.0-1.0-2.0
--- a/src/libprojectM/MilkdropPresetFactory/Parser.cpp
+++ b/src/libprojectM/MilkdropPresetFactory/Parser.cpp
@@ -1013,7 +1013,7 @@
of the item to be inserted is greater than the root's
precedence, then make gen_expr the root */
- if (infix_op->precedence > (*root)->infix_op->precedence)
+ if (infix_op->precedence >= (*root)->infix_op->precedence)
{
new_root = new TreeExpr(infix_op, NULL, *root, NULL);
(*root) = new_root;
--- a/src/libprojectM/MilkdropPresetFactory/BuiltinFuncs.hpp
+++ b/src/libprojectM/MilkdropPresetFactory/BuiltinFuncs.hpp
@@ -41,11 +41,16 @@
static inline float sqr_wrapper(float * arg_list) {
-
-return pow(2, arg_list[0]);
+ return pow(arg_list[0], 2);
}
+static inline float sigmoid_wrapper(float * arg_list)
+{
+ const double t = (1+exp(-arg_list[0]*arg_list[1]));
+ return (fabs(t) > 0.00001) ? 1.0/t : 0;
+}
+
static inline float sign_wrapper(float * arg_list) {
return -arg_list[0];
@@ -67,11 +72,6 @@
return arg_list[1];
}
-/* consult your AI book */
-static inline float sigmoid_wrapper(float * arg_list) {
-return (RR / (1 + exp( -(((float)(arg_list[0])) * arg_list[1]) / R) - R));
-}
-
static inline float bor_wrapper(float * arg_list) {
Unbind framebuffer object when initialization is done
--- a/src/libprojectM/Renderer/FBO.cpp
+++ b/src/libprojectM/Renderer/FBO.cpp
@@ -141,6 +141,9 @@
this->textureID[1] = other_tex;
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
+
+ glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
+
if (status == GL_FRAMEBUFFER_COMPLETE_EXT) {
return;
}
......@@ -17,3 +17,6 @@
17_lprojectm-linkinflibs.patch
18_pulseaudio_remove_unused_header.patch
19_fix-qprojectm-hppinclude.patch
20_fix-parser.patch
21_fix-builtin.patch
22_unbind_fbo.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment