Grrlib simple help June 06, 2009 12:02PM | Registered: 15 years ago Posts: 191 |
Re: Grrlib simple help June 06, 2009 07:29PM | Registered: 16 years ago Posts: 384 |
#include "graphics/image.h"
#include "image.h"
GRRLIB_Init();
GRRLIB_texImg *theImage = GRRLIB_LoadTexture(image);
GRRLIB_DrawImg (150, 100, theImage, 0, 1, 1, 0x000000FF);
GRRLIB_Render();
Re: Grrlib simple help June 06, 2009 07:43PM | Registered: 15 years ago Posts: 83 |
// include files #include "image.h" // loading image as texture u8 *tex_image=GRRLIB_LoadTexture(image); // displays the specified image GRRLIB_DrawImg(0,0,640,480,tex_black,0,1,1,255); GRRLIB_Render();
Re: Grrlib simple help June 09, 2009 02:42PM | Registered: 15 years ago Posts: 47 |
GRRLIB_texImg *background; long curfade = 0xFFFFFF00; int background_init(void) { background = GRRLIB_LoadTextureFromFile("content/background_640_480.png"); if(!background) return -1; return 1; } void background_draw(void) { GRRLIB_DrawImg(0,0,background,0,1,1,0xFFFFFFFF); }
svn checkout [grrlib.googlecode.com] grrlib-read-only
Re: Grrlib simple help June 12, 2009 10:59AM | Registered: 15 years ago Posts: 83 |
Quote
MrPeanut
You do not need need to convert images to headers any longer. This is relatively new with grrlib.. The file where GRRLIB_LoadTextureFromFile() resides in is GRRLIB_addon.c. Hope that helps!
Re: Grrlib simple help June 12, 2009 05:24PM | Registered: 15 years ago Posts: 47 |
Re: Grrlib simple help June 12, 2009 07:36PM | Registered: 16 years ago Posts: 384 |