summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lua-plugin.cc8
-rw-r--r--src/plugin-luaosmesa.cc10
2 files changed, 15 insertions, 3 deletions
diff --git a/src/lua-plugin.cc b/src/lua-plugin.cc
index 79968a6..92b379b 100644
--- a/src/lua-plugin.cc
+++ b/src/lua-plugin.cc
@@ -9,6 +9,8 @@ void LuaLoadPlugin(const String & _fname, Lua * L) throw (GeneralException) {
HMODULE handle;
String fname = _fname + ".dll";
+ printm(M_INFO, "Loading library " + fname + "\n");
+
if (!(handle = LoadLibraryEx(fname.to_charp(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) &&
!(handle = LoadLibraryEx(fname.to_charp(), NULL, NULL))) {
throw GeneralException("File not found or error loading shared object file: " + fname + "; Error #" + String((int) GetLastError()));
@@ -20,6 +22,8 @@ void LuaLoadPlugin(const String & _fname, Lua * L) throw (GeneralException) {
throw GeneralException("No init pointer on plugin " + fname);
}
+ printm(M_INFO, "Library loaded, init ptr = %p\n", init_ptr);
+
init_ptr(L);
}
#else
@@ -28,6 +32,8 @@ void LuaLoadPlugin(const String & _fname, Lua * L) throw (GeneralException) {
void LuaLoadPlugin(const String & fname, Lua * L) throw (GeneralException) {
void * handle = dlopen(("./" + fname + ".so").to_charp(), RTLD_NOW | RTLD_GLOBAL);
+ printm(M_INFO, "Loading library " + fname + "\n");
+
if (!handle) {
throw GeneralException("File not found or error loading shared object file: " + fname + "; " + dlerror());
}
@@ -38,6 +44,8 @@ void LuaLoadPlugin(const String & fname, Lua * L) throw (GeneralException) {
throw GeneralException("No init pointer on plugin " + fname);
}
+ printm(M_INFO, "Library loaded, init ptr = %p\n", init_ptr);
+
init_ptr(L);
}
#endif
diff --git a/src/plugin-luaosmesa.cc b/src/plugin-luaosmesa.cc
index 830c2db..09929b7 100644
--- a/src/plugin-luaosmesa.cc
+++ b/src/plugin-luaosmesa.cc
@@ -1,3 +1,5 @@
+#include <pthread.h>
+
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/osmesa.h>
@@ -28,7 +30,9 @@ class scene_t : public Base {
public:
std::list<Magick::Image> scene;
String filename, tmp_filename;
-};void empty_scene(scene_t scene) {
+};
+
+void empty_scene(scene_t scene) {
while (scene.scene.begin() != scene.scene.end()) {
scene.scene.pop_front();
}
@@ -68,14 +72,14 @@ void init_OSMesa() {
ctx = OSMesaCreateContextExt(OSMESA_BGRA, z, stencil, accum, NULL);
if (!ctx) {
- printf("OSMesaCreateContextExt() failed!\n");
+ Base::printm(M_ERROR, "OSMesaCreateContextExt() failed!\n");
return;
}
buffer = malloc(2048 * 2048 * 4);
if (!buffer) {
- printf("Alloc image buffer failed!\n");
+ Base::printm(M_ERROR, "Alloc image buffer failed!\n");
return;
}