Home | History | Annotate | Download | only in egl
      1 #ifndef _EGLUSTRUTIL_HPP
      2 #define _EGLUSTRUTIL_HPP
      3 /*-------------------------------------------------------------------------
      4  * drawElements Quality Program EGL Utilities
      5  * ------------------------------------------
      6  *
      7  * Copyright 2014 The Android Open Source Project
      8  *
      9  * Licensed under the Apache License, Version 2.0 (the "License");
     10  * you may not use this file except in compliance with the License.
     11  * You may obtain a copy of the License at
     12  *
     13  *      http://www.apache.org/licenses/LICENSE-2.0
     14  *
     15  * Unless required by applicable law or agreed to in writing, software
     16  * distributed under the License is distributed on an "AS IS" BASIS,
     17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     18  * See the License for the specific language governing permissions and
     19  * limitations under the License.
     20  *
     21  *//*!
     22  * \file
     23  * \brief EGL String Utilities.
     24  *//*--------------------------------------------------------------------*/
     25 
     26 #include "tcuDefs.hpp"
     27 #include "tcuFormatUtil.hpp"
     28 
     29 namespace eglu
     30 {
     31 
     32 struct ConfigAttribValueFmt
     33 {
     34 	deUint32	attribute;
     35 	int			value;
     36 	ConfigAttribValueFmt (deUint32 attribute_, int value_) : attribute(attribute_), value(value_) {}
     37 };
     38 
     39 struct SurfaceAttribValueFmt
     40 {
     41 	deUint32	attribute;
     42 	int			value;
     43 	SurfaceAttribValueFmt (deUint32 attribute_, int value_) : attribute(attribute_), value(value_) {}
     44 };
     45 
     46 struct ContextAttribValueFmt
     47 {
     48 	deUint32	attribute;
     49 	int			value;
     50 	ContextAttribValueFmt (deUint32 attribute_, int value_) : attribute(attribute_), value(value_) {}
     51 };
     52 
     53 struct ConfigAttribListFmt
     54 {
     55 	const int* attribs;
     56 	ConfigAttribListFmt (const int* attribs_) : attribs(attribs_) {}
     57 };
     58 
     59 struct SurfaceAttribListFmt
     60 {
     61 	const int* attribs;
     62 	SurfaceAttribListFmt (const int* attribs_) : attribs(attribs_) {}
     63 };
     64 
     65 struct ContextAttribListFmt
     66 {
     67 	const int* attribs;
     68 	ContextAttribListFmt (const int* attribs_) : attribs(attribs_) {}
     69 };
     70 
     71 inline ConfigAttribValueFmt		getConfigAttribValueStr		(deUint32 attribute, int value) { return ConfigAttribValueFmt(attribute, value); }
     72 std::ostream&					operator<<					(std::ostream& str, const ConfigAttribValueFmt& attribFmt);
     73 
     74 inline SurfaceAttribValueFmt	getSurfaceAttribValueStr	(deUint32 attribute, int value) { return SurfaceAttribValueFmt(attribute, value); }
     75 std::ostream&					operator<<					(std::ostream& str, const SurfaceAttribValueFmt& attribFmt);
     76 
     77 inline ContextAttribValueFmt	getContextAttribValueStr	(deUint32 attribute, int value) { return ContextAttribValueFmt(attribute, value); }
     78 std::ostream&					operator<<					(std::ostream& str, const ContextAttribValueFmt& attribFmt);
     79 
     80 inline ConfigAttribListFmt		getConfigAttribListStr		(const int* attribs) { return ConfigAttribListFmt(attribs); }
     81 std::ostream&					operator<<					(std::ostream& str, const ConfigAttribListFmt& fmt);
     82 
     83 inline SurfaceAttribListFmt		getSurfaceAttribListStr		(const int* attribs) { return SurfaceAttribListFmt(attribs); }
     84 std::ostream&					operator<<					(std::ostream& str, const SurfaceAttribListFmt& fmt);
     85 
     86 inline ContextAttribListFmt		getContextAttribListStr		(const int* attribs) { return ContextAttribListFmt(attribs); }
     87 std::ostream&					operator<<					(std::ostream& str, const ContextAttribListFmt& fmt);
     88 
     89 #include "egluStrUtilPrototypes.inl"
     90 
     91 } // eglu
     92 
     93 #endif // _EGLUSTRUTIL_HPP
     94