Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


NPOT textures


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 KumGame07   Members   -  Reputation: 145

Like
0Likes
Like

Posted 31 July 2007 - 12:40 AM

Hi all, I have a NPOT texture and the extension GL_ARB_texture_non_power_of_two is supported on my card (ATI X1600) . According to the spec, with this extension, all addressing modes are supported for NPOT textures as well. But if I use any of the addressing modes 'GL_REPEAT' or 'GL_MIRRORED_REPEAT' texture look-up fails. Does anyone know the reason for this ?
Best Regards,KumGame07

Sponsor:

#2 phantom   Moderators   -  Reputation: 7401

Like
0Likes
Like

Posted 31 July 2007 - 04:03 AM

how are you confirming that the extension is supported? As I have a X1900XT and it's only 'supported' in that my card supports OGL2.0, the extension string itself isn't present.

This is because, while card can use NPOT textures, there are restrictions on the use (no addressing modes other than normal non-wrapping modes, no texture filtering, and maybe a couple of other restrictions I can't recall), which is why it the extension string doesn't show up.

#3 songho   Members   -  Reputation: 268

Like
0Likes
Like

Posted 31 July 2007 - 05:32 AM

KumGame07,
You may be talking about "GL_ARB_texture_rectangle". This extension does not support GL_REPEAT and mipmaps, though a similar extension "GL_ARB_texture_non_power_of_two" supports GL_REPEAT.

I also have a X1900, and it doesn't support "GL_ARB_texture_non_power_of_two" yet. However, I notice it partially works on Radeon cards. You can use this extention (simply load a npot texture into your application), even if it isn't shown in the extension string.

But, whenever you use GL_REPEAT on the npot texture, the program becomes extremely slow. So, loading a npot texture is okay on Radeon cards, but there is a big performance hit when GL_REPEAT is used.



#4 KumGame07   Members   -  Reputation: 145

Like
0Likes
Like

Posted 31 July 2007 - 05:51 AM

Thanks for the reply.

@phantom :-
I checked out the extension string using glGetString() call, and found the extension 'GL_ARB_texture_non_power_of_two' in it. Is there anything else I need to check ?

@songho :-
Initially I thought of using 'GL_ARB_texture_rectangle'. But then I had to change all the texture targets (from GL_TEXTURE_2D to GL_TEXTURE_RECTANGLE_EXT). So I'm planning to use 'GL_ARB_texture_non_power_of_two' where, I think, I need not change the texture target.

#5 KumGame07   Members   -  Reputation: 145

Like
0Likes
Like

Posted 01 August 2007 - 05:31 AM

BTW, I checked on my friend's machine (on ATI X1900, OGL 2.0), it showed the extension 'GL_ARB_texture_non_power_of_two' . Is it another ATI fuckup ? Anyways, I'm gonna check on another NVIDIA card as well. Its really killing me :(

#6 songho   Members   -  Reputation: 268

Like
0Likes
Like

Posted 01 August 2007 - 06:29 AM

Weird... I actually updated the latest WinXP driver yesterday if GL_ARB_texture_non_power_of_two was added or not. But still, I don't see this extension in my card (X1900).

KumGame07, could you tell me what version of the driver you use? Here is my version and extension strings:

OpenGL Driver Info
==================
Vendor: ATI Technologies Inc.
Version: 2.0.6645 WinXP Release
Renderer: Radeon X1900 Series x86/MMX/3DNow!/SSE2

Total Number of Extensions: 97
==============================
GL_ARB_depth_texture
GL_ARB_draw_buffers
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_occlusion_query
GL_ARB_pixel_buffer_object
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_shader_objects
GL_ARB_shading_language_100
GL_ARB_shadow
GL_ARB_shadow_ambient
GL_ARB_texture_border_clamp
GL_ARB_texture_compression
GL_ARB_texture_cube_map
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3
GL_ARB_texture_float
GL_ARB_texture_mirrored_repeat
GL_ARB_texture_rectangle
GL_ARB_transpose_matrix
GL_ARB_vertex_blend
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_window_pos
GL_ATIX_texture_env_combine3
GL_ATIX_texture_env_route
GL_ATIX_vertex_shader_output_point_size
GL_ATI_draw_buffers
GL_ATI_element_array
GL_ATI_envmap_bumpmap
GL_ATI_fragment_shader
GL_ATI_map_object_buffer
GL_ATI_separate_stencil
GL_ATI_shader_texture_lod
GL_ATI_texture_compression_3dc
GL_ATI_texture_env_combine3
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_ATI_vertex_array_object
GL_ATI_vertex_attrib_array_object
GL_ATI_vertex_streams
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_compiled_vertex_array
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_framebuffer_object
GL_EXT_multi_draw_arrays
GL_EXT_packed_pixels
GL_EXT_point_parameters
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shadow_funcs
GL_EXT_stencil_wrap
GL_EXT_texgen_reflection
GL_EXT_texture3D
GL_EXT_texture_compression_s3tc
GL_EXT_texture_cube_map
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_vertex_array
GL_EXT_vertex_shader
GL_HP_occlusion_test
GL_NV_blend_square
GL_NV_occlusion_query
GL_NV_texgen_reflection
GL_S3_s3tc
GL_SGIS_generate_mipmap
GL_SGIS_multitexture
GL_SGIS_texture_border_clamp
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SGI_color_matrix
GL_SUN_multi_draw_arrays
GL_WIN_swap_hint
WGL_EXT_extensions_string
WGL_EXT_swap_control


#7 KumGame07   Members   -  Reputation: 145

Like
0Likes
Like

Posted 01 August 2007 - 07:41 PM

Thanks songho for the concern.

BTW, I'm workin on Mac OS X (10.4.9) following are the extensions supported.


OpenGL version : 2.0 ATI-1.4.52
Renderer : ATI Radeon X1600 OpenGL Engine
Vendor : ATI Technologies Inc.
Shading lang version : 1.10

Total extensions : 94


GL_ARB_transpose_matrix
GL_ARB_vertex_program
GL_ARB_vertex_blend
GL_ARB_window_pos
GL_ARB_shader_objects
GL_ARB_vertex_shader
GL_EXT_multi_draw_arrays
GL_EXT_clip_volume_hint
GL_EXT_rescale_normal
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_gpu_program_parameters
GL_APPLE_client_storage
GL_APPLE_specular_vector
GL_APPLE_transform_hint
GL_APPLE_packed_pixels
GL_APPLE_fence
GL_APPLE_vertex_array_object
GL_APPLE_vertex_program_evaluators
GL_APPLE_element_array
GL_APPLE_flush_render
GL_NV_texgen_reflection
GL_NV_light_max_exponent
GL_IBM_rasterpos_clip
GL_SGIS_generate_mipmap
GL_ARB_shading_language_100
GL_ARB_imaging
GL_ARB_point_parameters
GL_ARB_texture_env_crossbar
GL_ARB_texture_border_clamp
GL_ARB_multitexture
GL_ARB_texture_env_add
GL_ARB_texture_cube_map
GL_ARB_texture_env_dot3
GL_ARB_multisample
GL_ARB_texture_env_combine
GL_ARB_texture_compression
GL_ARB_texture_mirrored_repeat
GL_ARB_shadow
GL_ARB_depth_texture
GL_ARB_shadow_ambient
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_occlusion_query
GL_ARB_point_sprite
GL_ARB_texture_non_power_of_two
GL_ARB_vertex_buffer_object
GL_ARB_pixel_buffer_object
GL_ARB_draw_buffers
GL_ARB_shader_texture_lod
GL_EXT_compiled_vertex_array
GL_EXT_framebuffer_object
GL_EXT_texture_rectangle
GL_ARB_texture_rectangle
GL_EXT_texture_env_add
GL_EXT_blend_color
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_texture_lod_bias
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_stencil_wrap
GL_EXT_texture_filter_anisotropic
GL_EXT_separate_specular_color
GL_EXT_secondary_color
GL_EXT_blend_func_separate
GL_EXT_shadow_funcs
GL_EXT_stencil_two_side
GL_EXT_texture_compression_s3tc
GL_EXT_texture_compression_dxt1
GL_EXT_blend_equation_separate
GL_EXT_texture_mirror_clamp
GL_EXT_packed_depth_stencil
GL_APPLE_flush_buffer_range
GL_APPLE_ycbcr_422
GL_APPLE_vertex_array_range
GL_APPLE_texture_range
GL_APPLE_float_pixels
GL_ATI_texture_float
GL_ARB_texture_float
GL_APPLE_pixel_buffer
GL_NV_blend_square
GL_NV_fog_distance
GL_ATI_texture_mirror_once
GL_ATI_text_fragment_shader
GL_ATI_blend_equation_separate
GL_ATI_blend_weighted_minmax
GL_ATI_texture_env_combine3
GL_ATI_separate_stencil
GL_ATI_texture_compression_3dc
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SGI_color_matrix



#8 KumGame07   Members   -  Reputation: 145

Like
0Likes
Like

Posted 02 August 2007 - 01:57 AM


[quote]
But, whenever you use GL_REPEAT on the npot texture, the program becomes extremely slow. So, loading a npot texture is okay on Radeon cards, but there is a big performance hit when GL_REPEAT is used.
[/quotew]

Yes songho. Even I observed the same performance hit while using GL_REPEAT. I avoided the usage of GL_REPEAT (I'm using GL_CLAMP_TO_EDGE instead). But still ATI fucks !!!!

Another update.....

Same code runs perfectly on NVIDIA Geforce 7400 GT (even with GL_REPEAT)


Best Regards,KumGame07

#9 3dmaniac   Members   -  Reputation: 124

Like
0Likes
Like

Posted 04 August 2007 - 03:14 PM

well, nor i cant see npots suport in the extension list on my x1950pro catalyst 7.7 :( and it doesn't work

#10 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 04 August 2007 - 09:23 PM

Quote:
Original post by 3dmaniac
well, nor i cant see npots suport in the extension list on my x1950pro catalyst 7.7 :( and it doesn't work


He is using a Mac so we can assume the ATI driver has a fault. Not sure if Apple is in the mix or not since GL is done differently on Apple.

Everyone on Windows says they don't have that extension with their ATI and latest drivers.

#11 3dmaniac   Members   -  Reputation: 124

Like
0Likes
Like

Posted 05 August 2007 - 01:18 AM

I'm already through with few tests surveying npots support on ati x1x00 and here are conclusions:
-you can specify any non power of two texture size and use it with mipmapping and auto mipmap generation(texture filtering allowed)
-you can't use any of REPEAT wrap modes for such a texture

And now let me quote:
"An implementation which supports relaxing traditional GL's
power-of-two size restrictions across all texture targets will export
the extension string: "ARB_texture_non_power_of_two".

When this extension is supported, mipmapping, automatic mipmap
generation, and all the conventional wrap modes are supported for
non-power-of-two textures"
(from ARB_texture_non_power_of_two extension specification)

As not all conventional wrap modes are supported, its not fully compatible with specification and this is why the "ARB_texture_non_power_of_two" string is not exported, which doesn't mean you can't use npots in, for example, postprocessing where GL_CLAMP_TO_EDGE wrapping mode is being commonly used.

#12 KumGame07   Members   -  Reputation: 145

Like
0Likes
Like

Posted 05 August 2007 - 05:55 PM

Quote:

-you can specify any non power of two texture size and use it with mipmapping and auto mipmap generation(texture filtering allowed)


Again, my ATI doesn't allow any mipmapping [if I set the filtering mode to GL_NEAREST_MIPMAP_NEAREST]. May be ATI bug !!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS