<commit_before>package com.lds;

import javax.microedition.khronos.opengles.*;

import android.opengl.GLUtils;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class TextureLoader 
{
	
	private int[] textureFiles;
	private int texture; //the current index of textureFiles.
	
	private GL10 gl;
	private Context context;
	
	public TextureLoader(GL10 _gl, Context _context)
	{
		gl = _gl;
		context = _context;
	}
	
	public void load(int id)
	{
		//Adjust the size of the texture pointer array by handing the values to
		//a temporary array, declaring a new one, and placing the data back, but
		//leaving the last value empty
		if (textureFiles == null)
		{
			textureFiles = new int[1];
		}
		else
		{
			int[] tempTextureFiles = textureFiles;
			textureFiles = new int[textureFiles.length + 1];
			for (int i = 0; i < tempTextureFiles.length; i++)
			{
				textureFiles[i] = tempTextureFiles[i];
			}
			tempTextureFiles = null;
		}
		
		//Load a bitmap from the passed in texture (R.drawable.whatever)
		Bitmap bmp = BitmapFactory.decodeResource(context.getResources(), id);
		
		//Generate a unique integer that OpenGL stores as a pointer to the texture
		gl.glGenTextures(1, textureFiles, textureFiles.length - 1);
		
		//Bind said pointer to the default texture pointer, so it render that texture
		gl.glBindTexture(GL10.GL_TEXTURE_2D, textureFiles[textureFiles.length - 1]);
		
		//Parameters for this texture
		gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
		gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);
		
		//generate the texture from the bitmap. Calling GL10.GL_TEXTURE_2D routes
		//the data back to the location stored by our textureFiles pointer
		GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bmp, 0);
	}
	
	//sets the textureFiles index. This does not set the actual values!
	public void setTexture(int id)
	{
			texture = id;
	}
	
	//returns the texture pointer value, so it can be fed into
	public int getTexture()
	{
		return textureFiles[texture];
	}
}<commit_msg>minor update, pre-recloning to LDS_PROJECT for proper branching<commit_after>package com.lds;

import javax.microedition.khronos.opengles.*;

import android.opengl.GLUtils;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class TextureLoader 
{
	
	private static int[] textureFiles;
	private static int texture; //the current index of textureFiles.
	
	private GL10 gl;
	private Context context;
	
	public TextureLoader(GL10 _gl, Context _context)
	{
		gl = _gl;
		context = _context;
	}
	
	public void load(int id)
	{
		//Adjust the size of the texture pointer array by handing the values to
		//a temporary array, declaring a new one, and placing the data back, but
		//leaving the last value empty
		if (textureFiles == null)
		{
			textureFiles = new int[1];
		}
		else
		{
			int[] tempTextureFiles = textureFiles;
			textureFiles = new int[textureFiles.length + 1];
			for (int i = 0; i < tempTextureFiles.length; i++)
			{
				textureFiles[i] = tempTextureFiles[i];
			}
			tempTextureFiles = null;
		}
		
		//Load a bitmap from the passed in texture (R.drawable.whatever)
		Bitmap bmp = BitmapFactory.decodeResource(context.getResources(), id);
		
		//Generate a unique integer that OpenGL stores as a pointer to the texture
		gl.glGenTextures(1, textureFiles, textureFiles.length - 1);
		
		//Bind said pointer to the default texture pointer, so it render that texture
		gl.glBindTexture(GL10.GL_TEXTURE_2D, textureFiles[textureFiles.length - 1]);
		
		//Parameters for this texture
		gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
		gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);
		
		//generate the texture from the bitmap. Calling GL10.GL_TEXTURE_2D routes
		//the data back to the location stored by our textureFiles pointer
		GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bmp, 0);
	}
	
	//sets the textureFiles index. This does not set the actual values!
	public static void setTexture(int id)
	{
			texture = id;
	}
	
	//returns the texture pointer value, so it can be fed into
	public static int getTexture()
	{
		return textureFiles[texture];
	}
}
{'fraction_non_alphanumeric': 0.08804448563484708, 'fraction_numerical': 0.016682113067655237, 'mean_word_length': 3.9112627986348123, 'pattern_counts': {'":': 0, '<': 5, '<?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': '220552', 'n_tokens_mistral': 1545, 'n_tokens_neox': 1341, 'n_words': 439}