Hi RHX, You just using an osg::Texture2D class. Have a search throw the example directories for instances of Texture2D. Also have a browse through the include/osg/Texture and include/osg/Texture2D headers as this will provide lots of OpenGL familiar methods and enums so you should feel at home.
Robert. On Sun, Nov 9, 2008 at 7:49 AM, dmu_rhx <[EMAIL PROTECTED]> wrote: > Hi! > I wrote a program with opengl, now I want to rewrite the program with > OSG. But I don't know how to rewrite the following code: > > glGenTextures(1, &texture[l]); > glBindTexture(GL_TEXTURE_2D, texture[l]); > glTexParameteri(GL_TEXTURE_2D,GL_GENERATE_MIPMAP_SGIS, GL_TRUE); > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); > glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB_FLOAT16_ATI, WaterTexSize, > WaterTexSize, 0, GL_RGBA, GL_FLOAT, pBuf); > > This code generates a texture using the data saved in pBuf. How > to rewrite this code with OSG? > Thank you! > RHX > > > > ________________________________ > [广告] 金秋最关注楼盘-房不胜房 > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

