• Advertisement
Sign in to follow this  

Mixing GL_TEXTURE_2D and GL_TEXTURE_RECTANGLE_ARB

This topic is 3591 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi to everyone: I've added this post due I have new question/doubt that come out form the answers I got to my previous post: Using GL_ARB_texture_rectangle with POT textures. the question is: Is it possible to mix GL_TEXTURE_2D and GL_TEXTURE_RECTANGLE_ARB texture targets into the same scene? I.e. can I render one poligon whit a texture associated to GL_TEXTURE_2D and another polygon with GL_TEXTURE_RECTANGLE_ARB target? I omit the reasons why I wish/need to do that just to save space, if you are interested in knowing them just follow the link above and you will get the whole picture.

Share this post


Link to post
Share on other sites
Advertisement
I didn't read the linked post, so this may not apply. Within a single draw call you can use both targets, but not on the same texture unit at the same time. So, for example, unit 0 could be a 2d texture while unit 1 is a rectangle texture. You could not use both targets on unit 0 at the same time however.

Between draw calls you can change the target used by a texture unit. So you could draw one batch of triangles using a rect texture on unit 0 and then draw another batch of triangles using a 2d texture on unit 0. You will have to make a separate draw call for each batch.

Share this post


Link to post
Share on other sites
Thank you very much for the info! I can do as you suggested: changing the active texture target between 2 consecutive calls!


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement