Sign in to follow this  
LordOrion

Mixing GL_TEXTURE_2D and GL_TEXTURE_RECTANGLE_ARB

Recommended Posts

LordOrion    174
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
Solias    564
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this