Class: Roglew::FramebufferContextEXT
- Inherits:
-
Object
- Object
- Roglew::FramebufferContextEXT
- Defined in:
- lib/roglew/extensions/GL_EXT_framebuffer_object/framebuffer_context.rb
Instance Method Summary collapse
- #attach(obj, attachment, level = 0) ⇒ Object
-
#initialize(framebuffer, deferred, target, &block) ⇒ FramebufferContextEXT
constructor
A new instance of FramebufferContextEXT.
Constructor Details
#initialize(framebuffer, deferred, target, &block) ⇒ FramebufferContextEXT
Returns a new instance of FramebufferContextEXT.
27 28 29 30 |
# File 'lib/roglew/extensions/GL_EXT_framebuffer_object/framebuffer_context.rb', line 27 def initialize(framebuffer, deferred, target, &block) @target = target super(framebuffer, deferred, &block) end |
Instance Method Details
#attach(obj, attachment, level = 0) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/roglew/extensions/GL_EXT_framebuffer_object/framebuffer_context.rb', line 32 def attach(obj, , level = 0) case obj when RenderbufferEXT glFramebufferRenderbufferEXT(@target, , GL::RENDERBUFFER_EXT, obj.id) when Texture2d #TODO glFramebufferTexture1DEXT glFramebufferTexture3DEXT glFramebufferTexture2DEXT(@target, , GL::TEXTURE_2D, obj.id, level) else raise ArgumentError, "first parameter isn't a RenderbufferEXT nor a Texture2d" end end |