-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmf.h
More file actions
31 lines (20 loc) · 753 Bytes
/
Copy pathmf.h
File metadata and controls
31 lines (20 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef MF_H
#define MF_H
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <string.h>
#include "type.h"
void mf(TEXTUREIMAGE textureImg, GLuint * texName)
{
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glGenTextures(1,texName);
glBindTexture(GL_TEXTURE_2D , *texName);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, textureImg.imgWidth,textureImg.imgHeight, 0,
GL_RGB, GL_UNSIGNED_BYTE, textureImg.data);
}
#endif