Jump to content
  • Advertisement
Sign in to follow this  
dpoon

OpenGL Determining max cube map size

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
I think a cube map just holds 6 textures for the sides so possibly; sorry I can't help any more.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!