Determining max cube map size

Started by
1 comment, last by S1CA 19 years ago
Hi all, I'm trying to works out the max. size of a cube map at runtime. In OpenGL I can use: glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, ...). What's the D3D9 equivalent? The D3DCAPS9 structure doesn't have a "maxCubeMapTextureSize" sort of member the last time I checked. Can I just use "MaxTextureWidth" and "MaxTextureHeight"? Thanks.
http://www.dhpoware.com
Advertisement
I think a cube map just holds 6 textures for the sides so possibly; sorry I can't help any more.
1) for the maximum dimensions of a single face, caps.MaxTextureWidth and caps.MaxTextureHeight apply.

2) for general rules about sizes, the flags of caps.TextureCaps, such as D3DPTEXTURECAPS_CUBEMAP_POW2 apply.

3) to determine whether a cube map of a specific format will work with a particular device, use IDirect3D9::CheckDeviceFormat with D3DRTYPE_CUBETEXTURE.

It's very likely the values returned by the OpenGL function are computed in the device driver using information similar to the above.

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement