Hi,
this is really an OpenGL question, so it's best to ask it in the
appropriate forum.
On a first glance you are missing a glTexImage2D to download your texture.
HTH,
Stefan.
On Mon, Nov 24, 2008 at 3:06 PM, Gelson_Reinaldo <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm try to render a example that use a simple texture over a cube. I
> start with eqHello and put a few lines to load and setup a texture in
> GL_TRIANGLE_STRIP planes:
>
> glEnable(GL_TEXTURE_2D);
> // Create The Textures' Id List
> glGenTextures(TEXTURES_NUM, g_texid);
> // Load The Image From A Disk File
> if (!load_rgb_image("cube_128x128.raw", 128, 128, &img)) return false;
> // Create Nearest Filtered Texture
> glBindTexture(GL_TEXTURE_2D, g_texid[0]);
> glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
> glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
>
> //in hello.cpp -- void Channel::frameDraw( const uint32_t spin ) add the
> next line before render six axis-aligned colored quads:
>
> glBindTexture(GL_TEXTURE_2D, g_texid[0]);
>
> The cube is rendering well, but no texture is showed. Anybody know what I'm
> doing wrong?
>
> Thanks in advance,
> Gelson
>
>
>
>
>
> --
> View this message in context:
> http://n2.nabble.com/Simple-texturing-example--tp1572172p1572172.html
> Sent from the Equalizer - Parallel Rendering mailing list archive at
> Nabble.com.
>
>
> _______________________________________________
> eq-dev mailing list
> [email protected]
> http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
> http://www.equalizergraphics.com
>
--
http://www.eyescale.ch
http://www.equalizergraphics.com
http://www.linkedin.com/in/eilemann
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com