Sha256: 09de692b34d08b3fb2ec33e668408cec0ba9518b45e17685854513be22b2a6ac
Contents?: true
Size: 866 Bytes
Versions: 5
Compression:
Stored size: 866 Bytes
Contents
#include "rays/ruby/shader.h" #include <rucy.h> #include "defs.h" using namespace Rucy; RUCY_DEFINE_VALUE_FROM_TO(Rays::Shader) #define THIS to<Rays::Shader*>(self) #define CHECK RUCY_CHECK_OBJECT(Rays::Shader, self) static VALUE alloc(VALUE klass) { return new_type<Rays::Shader>(klass); } static VALUE initialize(VALUE self, VALUE source) { RUCY_CHECK_OBJ(Rays::Shader, self); if (!source.is_s()) argument_error(__FILE__, __LINE__); *THIS = Rays::Shader(source.c_str()); return self; } static Class cShader; void Init_shader () { Module mRays = rb_define_module("Rays"); cShader = rb_define_class_under(mRays, "Shader", rb_cObject); rb_define_alloc_func(cShader, alloc); rb_define_private_method(cShader, "initialize", RUBY_METHOD_FUNC(initialize), 1); } namespace Rays { Class shader_class () { return cShader; } }// Rays
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rays-0.1.12 | .doc/ext/rays/shader.cpp |
rays-0.1.11 | .doc/ext/rays/shader.cpp |
rays-0.1.10 | .doc/ext/rays/shader.cpp |
rays-0.1.9 | .doc/ext/rays/shader.cpp |
rays-0.1.8 | .doc/ext/rays/shader.cpp |