c++ - glGetTexImage() doesnt work properly on ATI cards? fails when miplevel > 0 -


I use that function to get my texture from graphics card, but for some reason this is something on some cards If the miplevel> 0

image here is IM to get the image:

  glGetTexImage (GL_TEXTURE_2D, miplevel, GL_RGB, GL_UNSIGNED_BYTE, data);  

Here is the code that I use to check what method to use mipmapping:

  ext = (char *) glGetString ( GL_EXTENSIONS); If (strstr (ext, "SGIS_generate_mipmap") == faucet) {// Usage gluBuild2DMipmaps ()} Other {// Usage GL_GENERATE_MIPMAP}  

So far it has worked properly, so It is called

  1. ATI Radeon 9550 / X1050 Series
  2. High Mobility Radeon HD 3470 GL_GENERATE_MIPMAP is supported for those ATI cards below.
  3. ATI Radeon X700
  4. ATI Radeon HD4870
  5. ATI Radeon HD 3450

At this time I Am taking miplevel 0 and generate mipmap by your code. Is there a better solution for this?

In addition to this, glagarer (0) returns 0 for all cards, so there is no error. It just does not work, maybe a driver problem?

I'm still looking for better solutions than resizing myself on the CPU ...

Check GlGetTexImage reporting error . It probably tells you what the error is.

EDIT: It seems like the pleasure of using the spoiled OpenGL drivers of ATI. Assume that your drivers are up-to-date, use an NVIDI card, work around it or accept that this will not work. Thats too much your own option may be worth to bother about it but they will most likely do nothing, alas.

EDIT 2: On the problem card you are using GL_ GENERATE_MIPMAP? It may be that you can not hold the mip levels until they are clearly created ...? Try gluBuild2DMipmaps () for everything else. Edit 3: Although it may be the cause of your "problems", it is not likely for me that the ATI card captures texture from the local copy, even if you use automatic map maps So do it completely on the card and never copy them. Clearly try to map the map map locally and see if it fixes your issues, it can not happen, but you need to do these things or you will never understand the problem. Hi test and error that works with such problems. This is the reason that in a fair few games, there is a large database with the name of the driver, the name of the card and the driver version, to decide whether there will be any facility or not work.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -