2009-08-30 06:36:11 -04:00
|
|
|
/*
|
|
|
|
* Cogl
|
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* A Low Level GPU Graphics and Utilities API
|
2009-08-30 06:36:11 -04:00
|
|
|
*
|
|
|
|
* Copyright (C) 2007,2008,2009 Intel Corporation.
|
|
|
|
*
|
2014-02-21 20:28:54 -05: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 06:36:11 -04:00
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
2009-08-30 06:36:11 -04:00
|
|
|
*
|
2014-02-21 20:28:54 -05: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 07:56:10 -05:00
|
|
|
*
|
|
|
|
*
|
2009-08-30 06:36:11 -04:00
|
|
|
*/
|
|
|
|
|
2011-10-08 06:53:20 -04:00
|
|
|
#ifndef __COGL_TEXTURE_2D_SLICED_PRIVATE_H
|
|
|
|
#define __COGL_TEXTURE_2D_SLICED_PRIVATE_H
|
2009-08-30 06:36:11 -04:00
|
|
|
|
|
|
|
#include "cogl-bitmap-private.h"
|
2010-10-27 13:54:57 -04:00
|
|
|
#include "cogl-pipeline-private.h"
|
2009-08-30 06:36:11 -04:00
|
|
|
#include "cogl-texture-private.h"
|
2011-10-08 06:53:20 -04:00
|
|
|
#include "cogl-texture-2d-sliced.h"
|
2009-08-30 06:36:11 -04:00
|
|
|
|
2011-10-08 06:53:20 -04:00
|
|
|
#include <glib.h>
|
2009-08-30 06:36:11 -04:00
|
|
|
|
|
|
|
struct _CoglTexture2DSliced
|
|
|
|
{
|
2012-11-22 16:46:54 -05:00
|
|
|
CoglTexture _parent;
|
2013-06-23 11:18:18 -04:00
|
|
|
|
2012-11-22 16:46:54 -05:00
|
|
|
GArray *slice_x_spans;
|
|
|
|
GArray *slice_y_spans;
|
|
|
|
GArray *slice_textures;
|
|
|
|
int max_waste;
|
2012-11-22 18:01:08 -05:00
|
|
|
CoglPixelFormat internal_format;
|
2009-08-30 06:36:11 -04:00
|
|
|
};
|
|
|
|
|
2011-10-08 06:53:20 -04:00
|
|
|
CoglTexture2DSliced *
|
2012-11-08 15:33:00 -05: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-01 20:48:54 -04:00
|
|
|
CoglPixelFormat format);
|
2009-08-30 06:36:11 -04:00
|
|
|
|
2011-10-08 06:53:20 -04:00
|
|
|
CoglTexture2DSliced *
|
2012-11-08 12:54:10 -05:00
|
|
|
_cogl_texture_2d_sliced_new_from_bitmap (CoglBitmap *bmp,
|
2013-06-08 13:52:20 -04:00
|
|
|
int max_waste,
|
2013-07-01 20:48:54 -04:00
|
|
|
CoglBool can_convert_in_place);
|
2009-08-30 06:36:11 -04:00
|
|
|
|
2011-10-08 06:53:20 -04:00
|
|
|
#endif /* __COGL_TEXTURE_2D_SLICED_PRIVATE_H */
|