PDA

View Full Version : Multiple texture object sharing same texturedata?



PeTeAR
12-15-2011, 01:51 AM
Hi,

I wonder if there is some way to have multiple texture objects (with different wrapping for example) setup initially using the same texture data that has been pushed to the gpu with glTexImage2D?

You could change the texture object while drawing of course but it would be nice to be able to setup multiple textureobjects initially (sharing the same texturedata) and just use them.

Thanks
/P

Alfonse Reinheart
12-15-2011, 02:07 AM
The purpose of sampler objects (http://www.opengl.org/registry/specs/ARB/sampler_objects.txt) is to be able to separate texture data from texture parameters. So you have one texture, but multiple ways to sample from it.

PeTeAR
12-15-2011, 02:13 AM
Thank you! Now I just need to figure out if that extension is available in OpenGL ES 2.0.

/P

PeTeAR
12-15-2011, 02:25 AM
These are the extensions available on my HTC Desire HD Android phone. Doesn't look like the GL_ARB_sampler_objects is supported.

GL_AMD_compressed_3DC_texture
GL_AMD_compressed_ATC_texture
GL_AMD_performance_monitor
GL_AMD_program_binary_Z400
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_type_2_10_10_10_REV
GL_NV_fence
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_depth_texture
GL_OES_depth24
GL_OES_EGL_image
GL_OES_element_index_uint
GL_OES_fbo_render_mipmap
GL_OES_fragment_precision_high
GL_OES_get_program_binary
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_texture_3D
GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_vertex_half_float
GL_OES_vertex_type_10_10_10_2
GL_QCOM_binning_control
GL_QCOM_driver_control
GL_QCOM_perfmon_global_mode
GL_QCOM_extended_get
GL_QCOM_extended_get2
GL_QCOM_tiled_rendering
GL_QCOM_writeonly_rendering
GL_QCOM_memory_monitor

/P

Alfonse Reinheart
12-15-2011, 02:30 AM
This is an OpenGL forum, not an OpenGL ES forum. If you wanted an answer specific to GL ES, you should have at least mentioned it in your initial inquiry. Then, I could have told you, "Desktop GL has sampler objects, but GL ES has no equivalent, so there's nothing you can do except change your texture parameters as needed."

PeTeAR
12-15-2011, 02:37 AM
Have I understood it correctly that there are a number of extensions available for lets say OpenGL ES 2.0 ->

http://www.khronos.org/registry/gles/

but it's up to the various vendors to choose which ones to support?

EDIT : Ah, I missed that there is ES forum. Thanks for pointing it out! Sorry for cluttering this forum with ES specific stuff...

Thanks
P