<commit_before>/* Copyright (c) 2001, Stanford University
 * All rights reserved.
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#ifndef CR_STATE_TEXTURE_H
#define CR_STATE_TEXTURE_H

#include "cr_hash.h"
#include "state/cr_statetypes.h"
#include "state/cr_limits.h"

#define CRTEXTURE_HASHSIZE 1047
#define CRTEXTURE_NAMEOFFSET 4

#ifdef __cplusplus
extern "C" {
#endif

struct CRTextureFormat {
	GLubyte redbits;
	GLubyte greenbits;
	GLubyte bluebits;
	GLubyte alphabits;
	GLubyte luminancebits;
	GLubyte intensitybits;
	GLubyte indexbits;
};

typedef struct {
	GLubyte *img;
	int bytes;
	GLint width;
	GLint height;
	GLint depth;
	GLint internalFormat;
	GLint border;
	GLenum format;
	GLenum type;
	int bytesPerPixel;
#if CR_ARB_texture_compression
	GLboolean compressed;
#endif
	const struct CRTextureFormat *texFormat;

	CRbitvalue dirty[CR_MAX_BITARRAY];
} CRTextureLevel;

typedef struct {
	GLenum                 target;
	GLuint                 name;

	/* The mipmap levels */
	CRTextureLevel        *level;
#ifdef CR_ARB_texture_cube_map<commit_msg>new comment about texture sizes and borders<commit_after>/* Copyright (c) 2001, Stanford University
 * All rights reserved.
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#ifndef CR_STATE_TEXTURE_H
#define CR_STATE_TEXTURE_H

#include "cr_hash.h"
#include "state/cr_statetypes.h"
#include "state/cr_limits.h"

#define CRTEXTURE_HASHSIZE 1047
#define CRTEXTURE_NAMEOFFSET 4

#ifdef __cplusplus
extern "C" {
#endif

struct CRTextureFormat {
	GLubyte redbits;
	GLubyte greenbits;
	GLubyte bluebits;
	GLubyte alphabits;
	GLubyte luminancebits;
	GLubyte intensitybits;
	GLubyte indexbits;
};

typedef struct {
	GLubyte *img;
	int bytes;
	GLint width;  /* width, height, depth includes the border */
	GLint height;
	GLint depth;
	GLint internalFormat;
	GLint border;
	GLenum format;
	GLenum type;
	int bytesPerPixel;
#if CR_ARB_texture_compression
	GLboolean compressed;
#endif
	const struct CRTextureFormat *texFormat;

	CRbitvalue dirty[CR_MAX_BITARRAY];
} CRTextureLevel;

typedef struct {
	GLenum                 target;
	GLuint                 name;

	/* The mipmap levels */
	CRTextureLevel        *level;
#ifdef CR_ARB_texture_cube_map
{'fraction_non_alphanumeric': 0.07400881057268723, 'fraction_numerical': 0.007929515418502203, 'mean_word_length': 4.381516587677726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1522126', 'n_tokens_mistral': 836, 'n_tokens_neox': 791, 'n_words': 217}