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
| int prepaframe(void *data)
{
GLuint *texture=reinterpret_cast<GLuint*>(data);
*texture = loadTexture(cframe,0x1907);
return 0;
}
thread_prepa=SDL_CreateThread(prepaframe,&identifiant_texture); //Cela ne marche pas : Texture blanche
prepaframe(&identifiant_texture) //Cela marche
void no3d()
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(1, 1, 1, 1);
intmatrixmode2d();
glBegin(GL_QUADS);
//...
glEnd();
glDeleteTextures(1, &identifiant_texture );
} |
Partager