3D Texture??

This topic contains 2 replies, has 3 voices, and was last updated by  Martin Kraus 7 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30350

    In PowerVR SDK, How I use 3d texture??

    void TexImage3DOES(enum target, int level, enum internalFormat,

                          sizei width, sizei height, sizei depth, int border,

                          enum format, enum type, const void *pixels)

    this function does not working. T.T

    I don’t know why…….

    #34513

    Hi,

    Whilst OpenGL supports 3D textures, OpenGL ES doesn’t support them as it is targeted at platforms which generally wouldn’t be able to support the memory costs of such large textures. Perhaps there might be a better way to achieve the effect you’re after. What is it you are actually trying to do with the 3D texture?

    Thanks,

    TobiasTobias2010-11-10 11:31:19

    #34514

    For 3D textures in OpenGL ES, the “GL_OES_texture_3D” extension has to be supported by the GPU and the driver. (I’m not sure any available PowerVR GPU supports this extension; there is support for 3D textures in OpenCL by the SGX545: https://www.imgtec.com/News/Release/index.asp?NewsID=516 but this might be limited to nearest-neighbor interpolation, which is probably not enough to support the GL_OES_texture_3D extension in OpenGL ES.) In any case, you should check whether your particular device and driver are supporting 3D textures by querying const GLubyte *glGetString(GL_EXTENSIONS) .

    On the other hand, you can always put multiple 2D images (slices of a 3D texture) into a larger 2D texture and emulate a 3D texture with an appropriate fragment shader. (For linear interpolation, it would first determine the two closest slices for a given z texture coordinate; then do two 2D texture lookups in those slices (tiles of a large 2D texture); and then linearly blend between the results depending on the z texture coordinate).

    Martin Kraus2010-11-16 08:35:30

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.