- Updated .gitignore to include new build and output directories for SDK packaging. - Modified CMakeLists.txt to include installation script for SDK. - Enhanced Makefile to support new SDK targets for various platforms. - Improved documentation to reflect new shader capabilities and 3D model support. - Added new shader functions and updated rendering systems to utilize custom shaders. Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
925 B
C++
38 lines
925 B
C++
#include "common/Export.h"
|
|
#include "common/Module.h"
|
|
|
|
#include <simplesquirrel/simplesquirrel.hpp>
|
|
|
|
#include <string>
|
|
|
|
// Minimal sample plugin: registers a Squirrel-visible module "HelloPlugin".
|
|
namespace eve::hello {
|
|
|
|
class HelloPlugin : public Module {
|
|
public:
|
|
Module_REG(HelloPlugin);
|
|
HelloPlugin() = default;
|
|
~HelloPlugin() override = default;
|
|
|
|
std::string greet() const { return "hello from native plugin"; }
|
|
};
|
|
|
|
Module_IMPL(HelloPlugin, new HelloPlugin());
|
|
|
|
void HelloPlugin::expose(ssq::Table& table) {
|
|
auto cls = table.addClass(name, HelloPlugin::create, false);
|
|
expose(cls);
|
|
}
|
|
|
|
void HelloPlugin::expose(ssq::Class& cls) {
|
|
cls.addFunc("getName", &HelloPlugin::getName);
|
|
cls.addFunc("greet", &HelloPlugin::greet);
|
|
}
|
|
|
|
} // namespace eve::hello
|
|
|
|
EVE_PLUGIN_EXPORT int eve_plugin_init(void) {
|
|
// Module_IMPL already registered HelloPlugin via static ModuleRegister.
|
|
return 0;
|
|
}
|