NOTICE: This workaround is not needed anymore! See below...
I put this in a file "openglwrapper.c":
I then stuck this at the top of "MiniB3D.bmx"
Finally I changed all occurences of glActiveTexture() and glClientActiveTexture() to call my wrapper:
The test code "test-anim.bmx" no longer crashes! This workaround seems to fix the crash, but I have not tested it carefully yet. Perhaps it helps anyway. Love Mini3D and will try to help out. We have experienced opengl programmers on our team, but I'm not one of them. Still learning. ;)
I put this in a file "openglwrapper.c":
#include <OpenGL/gl.h> int ActiveTexture(GLenum texUnit) { glActiveTexture(texUnit); } int ClientActiveTexture(GLenum texUnit) { glClientActiveTexture(texUnit); }
I then stuck this at the top of "MiniB3D.bmx"
Import "openglwrapper.c" Extern Function ActiveTexture(texUnit) Function ClientActiveTexture(texUnit) End Extern
Finally I changed all occurences of glActiveTexture() and glClientActiveTexture() to call my wrapper:
Select ix Case 0 ActiveTexture(GL_TEXTURE0); ClientActiveTexture(GL_TEXTURE0) Case 1 ActiveTexture(GL_TEXTURE1); ClientActiveTexture(GL_TEXTURE1) Case 2 ActiveTexture(GL_TEXTURE2); ClientActiveTexture(GL_TEXTURE2) Case 3 ActiveTexture(GL_TEXTURE3); ClientActiveTexture(GL_TEXTURE3) Case 4 ActiveTexture(GL_TEXTURE4); ClientActiveTexture(GL_TEXTURE4) Case 5 ActiveTexture(GL_TEXTURE5); ClientActiveTexture(GL_TEXTURE5) Case 6 ActiveTexture(GL_TEXTURE6); ClientActiveTexture(GL_TEXTURE6) Case 7 ActiveTexture(GL_TEXTURE7); ClientActiveTexture(GL_TEXTURE7) End Select
The test code "test-anim.bmx" no longer crashes! This workaround seems to fix the crash, but I have not tested it carefully yet. Perhaps it helps anyway. Love Mini3D and will try to help out. We have experienced opengl programmers on our team, but I'm not one of them. Still learning. ;)