Files
sunxfancyandCursor 8e0221c552 feat: enhance build system and documentation for SDK installation and shader support
- 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>
2026-08-06 21:08:47 +08:00

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;
}