| 1234567891011121314151617181920212223242526272829303132333435 |
- #include "UiPainterDevice.h"
- #include "rsrc/Texture.h"
- //==============================================================================
- // Constructor =
- //==============================================================================
- UiPainterDevice::UiPainterDevice(Texture& colorFai_)
- : colorFai(colorFai_)
- {}
- //==============================================================================
- // getSize =
- //==============================================================================
- Vec2 UiPainterDevice::getSize() const
- {
- return Vec2(colorFai.getWidth(), colorFai.getHeight());
- }
- //==============================================================================
- // create =
- //==============================================================================
- void UiPainterDevice::create()
- {
- Fbo::create();
- bind();
- setNumOfColorAttachements(1);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
- colorFai.getGlId(), 0);
- unbind();
- }
|