[[RzR]]

Projects : Pinball Mini3D FPS gl

TODO

UT : GLU GLUT etc

glsl

OPENGL REFERENCE

[[Debian]]

# http://packages.debian.org/cgi-bin/search_contents.pl?word=gl.h&searchmode=searchfiles&case=insensitive&version=stable&arch=i386
apt-get install xlibmesa-gl-dev

TEXTURES

Stupid man pages (of cygwin & Debian 200404) , dont believe liers :

# man glTexImage2D
... 2n+2(border) for some integer  n.  All  implementations ...

I Suppose the 'n' in 2n+2 was noted as an exposant, and the ntroff filter ommited the '^' in 2^n+2

http://sourceforge.net/tracker/index.php?func=detail&atid=100003&aid=949337&group_id=3

<RzR> sous opengl on peut charger des textures de tailles 2n+2 x 2m+2 ? je croyais que c t 2^n x 2^m
<rem`> RzR: si t'as l'extension pr avoir des textures rectangulaires :)
<RzR> ha c bien ce ke je pensais
<rem`> GL_EXT_texture_rectangle, GL_NV_texture_rectangle
<RzR> sinon faut faire du padding a la main
makeCheckImage();
GLuint* gltexturename_ = new GLuint[[1]];
glGenTextures(1, gltexturename_ );
glTexImage2D(GL_TEXTURE_2D, 0, 3, 64, 64, 0 , 0, GL_UNSIGNED_BYTE,
             p_texture_default_ );
assert( glIsTexture( *gltexturename_ )  ); //crash why ?

SHADERS

TRANSPARENCY

Do not use Accum buffer :

  • render to texture et apres tu fades entre tes textures
  • r l'alpha de ton mesh au pire tu rends dans une grosse texture
  • vi ou tu bouge l'alpha du mesh si c par mesh ouai meme en 1024×1024 ca passe
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
glColor4f(1.0f, 1.0f, 1.0f, 0.5);
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_BLEND);
glColor4d(1,1,1, (GLdouble) a);
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, (GLfloat) a );

MISC

MORE

opengl.txt · Last modified: 2022/11/05 11:25 by rzr
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki