Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2015 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
| 7 | // FramebufferGL.cpp: Implements the class methods for FramebufferGL. |
| 8 | |
| 9 | #include "libANGLE/renderer/gl/FramebufferGL.h" |
| 10 | |
| 11 | #include "common/debug.h" |
Jamie Madill | 87de362 | 2015-03-16 10:41:44 -0400 | [diff] [blame^] | 12 | #include "libANGLE/State.h" |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 13 | |
| 14 | namespace rx |
| 15 | { |
| 16 | |
Jamie Madill | d1405e5 | 2015-03-05 15:41:39 -0500 | [diff] [blame] | 17 | FramebufferGL::FramebufferGL(const gl::Framebuffer::Data &data) |
| 18 | : FramebufferImpl(data) |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 19 | {} |
| 20 | |
| 21 | FramebufferGL::~FramebufferGL() |
| 22 | {} |
| 23 | |
| 24 | void FramebufferGL::setColorAttachment(size_t index, const gl::FramebufferAttachment *attachment) |
| 25 | { |
Geoff Lang | f1e8592 | 2015-02-23 14:40:04 -0500 | [diff] [blame] | 26 | //UNIMPLEMENTED(); |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 27 | } |
| 28 | |
Jamie Madill | f90353e | 2015-03-05 19:37:58 -0500 | [diff] [blame] | 29 | void FramebufferGL::setDepthAttachment(const gl::FramebufferAttachment *attachment) |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 30 | { |
Geoff Lang | f1e8592 | 2015-02-23 14:40:04 -0500 | [diff] [blame] | 31 | //UNIMPLEMENTED(); |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | void FramebufferGL::setStencilAttachment(const gl::FramebufferAttachment *attachment) |
| 35 | { |
Geoff Lang | f1e8592 | 2015-02-23 14:40:04 -0500 | [diff] [blame] | 36 | //UNIMPLEMENTED(); |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | void FramebufferGL::setDepthStencilAttachment(const gl::FramebufferAttachment *attachment) |
| 40 | { |
Geoff Lang | f1e8592 | 2015-02-23 14:40:04 -0500 | [diff] [blame] | 41 | //UNIMPLEMENTED(); |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | void FramebufferGL::setDrawBuffers(size_t count, const GLenum *buffers) |
| 45 | { |
Geoff Lang | f1e8592 | 2015-02-23 14:40:04 -0500 | [diff] [blame] | 46 | //UNIMPLEMENTED(); |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | void FramebufferGL::setReadBuffer(GLenum buffer) |
| 50 | { |
Geoff Lang | f1e8592 | 2015-02-23 14:40:04 -0500 | [diff] [blame] | 51 | //UNIMPLEMENTED(); |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | gl::Error FramebufferGL::invalidate(size_t count, const GLenum *attachments) |
| 55 | { |
| 56 | UNIMPLEMENTED(); |
| 57 | return gl::Error(GL_INVALID_OPERATION); |
| 58 | } |
| 59 | |
| 60 | gl::Error FramebufferGL::invalidateSub(size_t count, const GLenum *attachments, const gl::Rectangle &area) |
| 61 | { |
| 62 | UNIMPLEMENTED(); |
| 63 | return gl::Error(GL_INVALID_OPERATION); |
| 64 | } |
| 65 | |
| 66 | gl::Error FramebufferGL::clear(const gl::State &state, GLbitfield mask) |
| 67 | { |
| 68 | UNIMPLEMENTED(); |
| 69 | return gl::Error(GL_INVALID_OPERATION); |
| 70 | } |
| 71 | |
| 72 | gl::Error FramebufferGL::clearBufferfv(const gl::State &state, GLenum buffer, GLint drawbuffer, const GLfloat *values) |
| 73 | { |
| 74 | UNIMPLEMENTED(); |
| 75 | return gl::Error(GL_INVALID_OPERATION); |
| 76 | } |
| 77 | |
| 78 | gl::Error FramebufferGL::clearBufferuiv(const gl::State &state, GLenum buffer, GLint drawbuffer, const GLuint *values) |
| 79 | { |
| 80 | UNIMPLEMENTED(); |
| 81 | return gl::Error(GL_INVALID_OPERATION); |
| 82 | } |
| 83 | |
| 84 | gl::Error FramebufferGL::clearBufferiv(const gl::State &state, GLenum buffer, GLint drawbuffer, const GLint *values) |
| 85 | { |
| 86 | UNIMPLEMENTED(); |
| 87 | return gl::Error(GL_INVALID_OPERATION); |
| 88 | } |
| 89 | |
| 90 | gl::Error FramebufferGL::clearBufferfi(const gl::State &state, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) |
| 91 | { |
| 92 | UNIMPLEMENTED(); |
| 93 | return gl::Error(GL_INVALID_OPERATION); |
| 94 | } |
| 95 | |
| 96 | GLenum FramebufferGL::getImplementationColorReadFormat() const |
| 97 | { |
| 98 | UNIMPLEMENTED(); |
| 99 | return GLenum(); |
| 100 | } |
| 101 | |
| 102 | GLenum FramebufferGL::getImplementationColorReadType() const |
| 103 | { |
| 104 | UNIMPLEMENTED(); |
| 105 | return GLenum(); |
| 106 | } |
| 107 | |
| 108 | gl::Error FramebufferGL::readPixels(const gl::State &state, const gl::Rectangle &area, GLenum format, GLenum type, GLvoid *pixels) const |
| 109 | { |
Jamie Madill | 87de362 | 2015-03-16 10:41:44 -0400 | [diff] [blame^] | 110 | const gl::PixelPackState &packState = state.getPackState(); |
| 111 | |
| 112 | if (packState.rowLength != 0 || packState.skipRows != 0 || packState.skipPixels != 0) |
| 113 | { |
| 114 | UNIMPLEMENTED(); |
| 115 | return gl::Error(GL_INVALID_OPERATION, "invalid pixel store parameters in readPixels"); |
| 116 | } |
| 117 | |
Geoff Lang | f9a6f08 | 2015-01-22 13:32:49 -0500 | [diff] [blame] | 118 | UNIMPLEMENTED(); |
| 119 | return gl::Error(GL_INVALID_OPERATION); |
| 120 | } |
| 121 | |
| 122 | gl::Error FramebufferGL::blit(const gl::State &state, const gl::Rectangle &sourceArea, const gl::Rectangle &destArea, |
| 123 | GLbitfield mask, GLenum filter, const gl::Framebuffer *sourceFramebuffer) |
| 124 | { |
| 125 | UNIMPLEMENTED(); |
| 126 | return gl::Error(GL_INVALID_OPERATION); |
| 127 | } |
| 128 | |
| 129 | GLenum FramebufferGL::checkStatus() const |
| 130 | { |
| 131 | UNIMPLEMENTED(); |
| 132 | return GLenum(); |
| 133 | } |
| 134 | |
| 135 | } |