*** empty log message ***

svn path=/trunk/boinc/; revision=1525
This commit is contained in:
Tim Lan 2003-06-17 22:57:47 +00:00
parent 5094289ab1
commit a7149c4596
2 changed files with 6 additions and 4 deletions

View File

@ -422,10 +422,11 @@ int read_ppm_file(char* name, int& w, int& h, unsigned char** arrayp) {
unsigned int texture_id;
void init_texture(char* filename) {
int init_texture(char* filename) {
unsigned char* pixels;
int width, height;
read_ppm_file(filename, width, height, &pixels);
int width, height, retVal;
retVal = read_ppm_file(filename, width, height, &pixels);
if (retVal) return retVal;
glGenTextures(1, &texture_id);
glBindTexture(GL_TEXTURE_2D, texture_id);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@ -443,6 +444,7 @@ void init_texture(char* filename) {
GL_UNSIGNED_BYTE,
pixels
);
return 0;
}
struct Vertex
{

View File

@ -87,6 +87,6 @@ public:
//
extern int read_ppm(char* name, int& w, int& h, unsigned char** arrayp);
extern void init_texture(char* filename);
extern int init_texture(char* filename);
extern void draw_texture(float* pos, float* size);