blob: b519cdde88444dd500683b02083fbc78522fe02f [file] [log] [blame]
/*
* Copyright 2015, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Note this file is included in context in gles_spy.h:
//
// namespace gapii {
//
// class GlesSpy {
// protected:
virtual void maybeAddErrorStateExtra(gapic::Vector<gapic::Encodable*>& extras) {}
// getProgramInfo returns a ProgramInfo, populated with the details of all the
// attributes and uniforms exposed by program.
std::shared_ptr<ProgramInfo> getProgramInfo(int32_t program);
// Declarations of the routines which actually add the extras. These
// are not inline so that gles_spy.h can use a forward declaration.
void addGlLinkProgramExtra(gapic::coder::gles::GlLinkProgram& atom);
void addGlProgramBinaryExtra(gapic::coder::gles::GlProgramBinary& atom);
template<typename T>
inline void addExtras(T& atom, int reduce_overload_precedence = 0) {
maybeAddErrorStateExtra(atom.mextras);
}
inline void addExtras(gapic::coder::gles::GlLinkProgram& atom) {
maybeAddErrorStateExtra(atom.mextras);
addGlLinkProgramExtra(atom);
}
inline void addExtras(gapic::coder::gles::GlProgramBinary& atom) {
maybeAddErrorStateExtra(atom.mextras);
addGlProgramBinaryExtra(atom);
}
// implemented in gles_context.cpp
void setContextInfo(int32_t backbuffer_width, int32_t backbuffer_height,
uint32_t backbuffer_color_fmt, uint32_t backbuffer_depth_fmt,
uint32_t backbuffer_stencil_fmt, bool reset_viewport_scissor,
bool preserve_buffers_on_swap);
void setContextInfo(
int32_t backbuffer_width, int32_t backbuffer_height,
uint32_t backbuffer_color_fmt, uint32_t backbuffer_depth_fmt,
uint32_t backbuffer_stencil_fmt, bool reset_viewport_scissor,
bool preserve_buffers_on_swap, const struct ConstantDesc* constantDescs);