Example #1
0
/******************************************************************************

	Loads our font

******************************************************************************/
int GLFont::Load( glImage             *_font_sprite,
				   int   			   tilewidth,
				   int   			   tileheight,
				   int   			   bmpwidth,
				   int   			   bmpheight, 
				   GL_TEXTURE_TYPE_ENUM type,
				   int 	               sizeX,
				   int 	               sizeY,
				   int 	               param,
				   const uint8         *texture,
				   int 				   pallette_width,
				   const u16 		   *palette
				 )
{
	font_sprite = _font_sprite;
	
	int textureID = 
		glLoadTileSet( font_sprite,
					   tilewidth, 
					   tileheight,
					   bmpwidth,
					   bmpheight,
					   type,
					   sizeX,
					   sizeY,
					   param,
					   pallette_width,
					   palette,
					   texture	 
					 );
					   
	return textureID;

}
static int NDS_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
							 const SDL_Rect * rect, const void *pixels, int pitch)
{
    NDS_TextureData *txdat = (NDS_TextureData *) texture->driverdata;

	SDL_Log("enter %s\n", __func__);

	glLoadTileSet(txdat->image,
				  rect->w, rect->h,
				  rect->w, rect->h,
				  GL_RGBA,
				  get_gltexture_size(rect->w),
				  get_gltexture_size(rect->h),
				  TEXGEN_OFF, 0, NULL,
				  pixels);

    return 0;
}
Example #3
0
void Player::loadTextures(){
	glLoadTileSet("box.png",spr,512,512,1,1);

}