| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Dear All, I'm using rendering few textures in my OpenGL which is NPOT(non power of two). I've tried using both GL_TEXTURE_RECTANGLE_ARB and GL_TEXTURE_RECTANGLE_NV as target texture. Bother are working fine in my nVidia Hardware. Is there any advantage for either of these over other? ARB is the standard format and NV is the nVidia format. Will I get any performance improvements for NV texture rectangle if I use it with nVidia Hardware? |
|
#2
| |||
| |||
| Knockr wrote: > Dear All, > > I'm using rendering few textures in my OpenGL which is NPOT(non > power of two). > > I've tried using both GL_TEXTURE_RECTANGLE_ARB and > GL_TEXTURE_RECTANGLE_NV as target texture. Bother are working > fine in my nVidia Hardware. Is there any advantage for either > of these over other? ARB is the standard format and NV is the > nVidia format. Will I get any performance improvements for NV > texture rectangle if I use it with nVidia Hardware? It was NVidia who came up with NPO2 textures first, so that's why there is the _NV extension. Then NPO2 textures got accepted as a standard feature and they became _ARB. Now if you looked into the specification of both extensions, then you would have seen that the newly introduced tokens have the same values: ~ $ grep TEXTURE_RECTANGLE /usr/include/GL/glext #define GL_TEXTURE_RECTANGLE_ARB 0x84F5 #define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 #define GL_TEXTURE_RECTANGLE_NV 0x84F5 #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 So there's absolutely no difference. But for reasons of portability you should use the ARB variant in your code. The _NV version might go away. Wolfgang Draxinger -- E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867 |
|
#3
| |||
| |||
| On Aug 28, 1:28*pm, Wolfgang Draxinger <wdraxin...@darkstargames.de> wrote: > Knockr wrote: > > Dear All, > > > I'm using rendering few textures in my OpenGL which is NPOT(non > > power of two). > > > I've tried using both GL_TEXTURE_RECTANGLE_ARB and > > GL_TEXTURE_RECTANGLE_NV as target texture. Bother are working > > fine in my nVidia Hardware. Is there any advantage for either > > of these over other? ARB is the standard format and NV is the > > nVidia format. Will I get any performance improvements for NV > > texture rectangle if I use it with nVidia Hardware? > > It was NVidia who came up with NPO2 textures first, so that's why > there is the _NV extension. Then NPO2 textures got accepted as a > standard feature and they became _ARB. > > Now if you looked into the specification of both extensions, then > you would have seen that the newly introduced tokens have the > same values: > > ~ $ grep TEXTURE_RECTANGLE /usr/include/GL/glext > #define GL_TEXTURE_RECTANGLE_ARB * * * * *0x84F5 > #define GL_PROXY_TEXTURE_RECTANGLE_ARB * *0x84F7 > #define GL_TEXTURE_RECTANGLE_NV * * * * * 0x84F5 > #define GL_PROXY_TEXTURE_RECTANGLE_NV * * 0x84F7 > > So there's absolutely no difference. But for reasons of > portability you should use the ARB variant in your code. The _NV > version might go away. > > Wolfgang Draxinger > -- > E-Mail address works, Jabber: hexar...@jabber.org, ICQ: 134682867 Thanks alot for your prompt reply. It was really helpful. I'm also using Cg fragment programs with my application. Is it possible to execute it without "GL_NV_fragment_program "? will it work fine with "GL_ARB_fragment_program "? In my understanding "GL_NV_fragment_program " is required. |
|
#4
| |||
| |||
| Knockr wrote: > Thanks alot for your prompt reply. It was really helpful. > > I'm also using Cg fragment programs with my application. Is it > possible to execute it without "GL_NV_fragment_program"? Yes, Cg has a profile, that explicitly emits ARB programs. > will it work fine with "GL_ARB_fragment_program "? If you enable the correct profile, then yes. Usually the Cg library figures out, what capabilities the OpenGL implementation has and switches to the correct profile. Or instead of using Cg you might want to use GLSL. > In my understanding "GL_NV_fragment_program " is required. No. NV extensions are only avaliable on NVidia hardware, but AMD/ATI hardware does vertex/fragment programs as well. There are however certain features that are only avaliable through NV extensions. For example geometry programs of shader model 4. NVidias implementation of GLSL is in fact a meta compiler, that compiles to ARB/NV_xxx_program code, which is then sent to the OpenGL driver in turn. Officially SM4 functionality is to be exposed through GLSL, however I prefer the lower level assembler code. Wolfgang Draxinger -- E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867 |
|
#5
| |||
| |||
| So are you saying that Cg can work with Non-nVidia Hardware? Wolfgang Draxinger wrote: > Knockr wrote: > > > Thanks alot for your prompt reply. It was really helpful. > > > > I'm also using Cg fragment programs with my application. Is it > > possible to execute it without "GL_NV_fragment_program"? > > Yes, Cg has a profile, that explicitly emits ARB programs. > > > will it work fine with "GL_ARB_fragment_program "? > > If you enable the correct profile, then yes. Usually the Cg > library figures out, what capabilities the OpenGL implementation > has and switches to the correct profile. > > Or instead of using Cg you might want to use GLSL. > > > In my understanding "GL_NV_fragment_program " is required. > > No. NV extensions are only avaliable on NVidia hardware, but > AMD/ATI hardware does vertex/fragment programs as well. > > There are however certain features that are only avaliable > through NV extensions. For example geometry programs of shader > model 4. NVidias implementation of GLSL is in fact a meta > compiler, that compiles to ARB/NV_xxx_program code, which is > then sent to the OpenGL driver in turn. Officially SM4 > functionality is to be exposed through GLSL, however I prefer > the lower level assembler code. > > Wolfgang Draxinger > -- > E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867 |
|
#6
| |||
| |||
| Knockr wrote: > So are you saying that Cg can work with Non-nVidia Hardware? Yes. Wolfgang Draxinger -- E-Mail address works, Jabber: hexarith@jabber.org, ICQ: 134682867 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.