Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tags in this Discussion

mutitexturing in nvidia cg
  • hi guys,

    I need some clarifications with regards to multitexturing with nvidia cg and opengl. I figure that there are two ways of doing this.

    One way is to bind each texture object with activating each texture units using glactivetexture(TEXTURE0+i) and specifying the texture unit as a semantic in cg code.

    The otherway is to let cg do automatic texture unit handling. I.e, enable the texture parameter using cgGLEnableTextureParameter().Looking at its docs, tells that the texture object for the texture parameter is enable for its texture unit. How does cg automatically determine the texture unit for the texture object? Is it the order in which the samplers are defined(input parameters) in the cg code? For example, i have multiple 1D and 2D textures that i would like to use, but i am also interested in cg's way of handling texture units where you dont need to specify the texture units explicitly in cg code.

    Any insight is very much appreciated.

    thanks
  • 1 Comment sorted by
  • anyone? maybe a pointer to some place where i can look it up?