2009-08-30 10:36:11 +00:00
|
|
|
/*
|
|
|
|
* Cogl
|
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* A Low Level GPU Graphics and Utilities API
|
2009-08-30 10:36:11 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2007,2008,2009 Intel Corporation.
|
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software and associated documentation
|
|
|
|
* files (the "Software"), to deal in the Software without
|
|
|
|
* restriction, including without limitation the rights to use, copy,
|
|
|
|
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
* of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
2009-08-30 10:36:11 +00:00
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
2009-08-30 10:36:11 +00:00
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
2010-03-01 12:56:10 +00:00
|
|
|
*
|
|
|
|
*
|
2009-08-30 10:36:11 +00:00
|
|
|
*/
|
|
|
|
|
2011-10-08 10:53:20 +00:00
|
|
|
#ifndef __COGL_TEXTURE_2D_SLICED_PRIVATE_H
|
|
|
|
#define __COGL_TEXTURE_2D_SLICED_PRIVATE_H
|
2009-08-30 10:36:11 +00:00
|
|
|
|
|
|
|
#include "cogl-bitmap-private.h"
|
2010-10-27 17:54:57 +00:00
|
|
|
#include "cogl-pipeline-private.h"
|
2009-08-30 10:36:11 +00:00
|
|
|
#include "cogl-texture-private.h"
|
2011-10-08 10:53:20 +00:00
|
|
|
#include "cogl-texture-2d-sliced.h"
|
2009-08-30 10:36:11 +00:00
|
|
|
|
2011-10-08 10:53:20 +00:00
|
|
|
#include <glib.h>
|
2009-08-30 10:36:11 +00:00
|
|
|
|
|
|
|
struct _CoglTexture2DSliced
|
|
|
|
{
|
2012-11-22 21:46:54 +00:00
|
|
|
CoglTexture _parent;
|
2013-06-23 15:18:18 +00:00
|
|
|
|
2012-11-22 21:46:54 +00:00
|
|
|
GArray *slice_x_spans;
|
|
|
|
GArray *slice_y_spans;
|
|
|
|
GArray *slice_textures;
|
|
|
|
int max_waste;
|
2012-11-22 23:01:08 +00:00
|
|
|
CoglPixelFormat internal_format;
|
2009-08-30 10:36:11 +00:00
|
|
|
};
|
|
|
|
|
2011-10-08 10:53:20 +00:00
|
|
|
CoglTexture2DSliced *
|
2012-11-08 20:33:00 +00:00
|
|
|
_cogl_texture_2d_sliced_new_from_foreign (CoglContext *context,
|
|
|
|
unsigned int gl_handle,
|
|
|
|
unsigned int gl_target,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
int x_pot_waste,
|
|
|
|
int y_pot_waste,
|
2013-07-02 00:48:54 +00:00
|
|
|
CoglPixelFormat format);
|
2009-08-30 10:36:11 +00:00
|
|
|
|
2011-10-08 10:53:20 +00:00
|
|
|
CoglTexture2DSliced *
|
2012-11-08 17:54:10 +00:00
|
|
|
_cogl_texture_2d_sliced_new_from_bitmap (CoglBitmap *bmp,
|
2013-06-08 17:52:20 +00:00
|
|
|
int max_waste,
|
2013-07-02 00:48:54 +00:00
|
|
|
CoglBool can_convert_in_place);
|
2009-08-30 10:36:11 +00:00
|
|
|
|
2011-10-08 10:53:20 +00:00
|
|
|
#endif /* __COGL_TEXTURE_2D_SLICED_PRIVATE_H */
|