waynepiekarski / XTextureExtractor

XTextureExtractor for X-Plane 11 extracts the textures for the HSI, ND, EICAS, and CDU displays, and renders them in separate windows that you can place anywhere within X-Plane, on external unused monitors, and on separate computers via a network protocol.
http://xplane.tinmith.net
GNU General Public License v3.0
28 stars 14 forks source link

textures go weird when popped out... #4

Closed georgegohl888 closed 5 years ago

georgegohl888 commented 6 years ago

image

waynepiekarski commented 6 years ago

Which version of X-Plane are you running? Do you have the same problem with the Laminar 737 or 747? Has it ever worked before and do you know what changed to cause this?

georgegohl888 commented 6 years ago

no this is the first time I have used it. currently i havent tested it on any other aircraft and x plane is fully updated. I made another post saying it seemed to work better on my actual flight sim not my desktop.

waynepiekarski commented 6 years ago

Ah, just saw the other post and replied to that. I don't have the A320, and so I cannot test it. Please try it with a different aircraft like the Laminar ones and see if the same problem happens. From your screenshot, the windows don't look like they are labelled properly. But I do know that the A320 does the textures differently than any other aircraft, it has 3 textures instead of 1, so it might not be possible to get this right.

georgegohl888 commented 6 years ago

texture files.zip here is screen shots of each of the textures as i cycle through them. One of them also shows how when any windows is popped out it goes weird. It also demonstrates how when popped out the texture is initially too big and resizing the window doesn't resize the texture only allows more of it to be viewed.

georgegohl888 commented 6 years ago

hey have you had a chance to look at the files? it shows whats going on a bit better (on my desktop). as i said on my sim they pop out just dont resize.

waynepiekarski commented 6 years ago

I don't have the A320, but I updated to the latest X-Plane 11.21 and tried all the pop-out and hide decorations features in the default Laminar 737. The pop-out feature works correctly and the same as older X-Plane versions. I noticed that the "H" button, which hides the window decorations, works ok for popped-in windows, but there is some slight clipping on native popped-out windows. However, this is not the problem you are experiencing.

I looked at the images in your "texture files.zip", and the first thing I notice is that the OpenGL texture ids change for each image. XTextureExtractor starts at the highest available id, and scans backwards until it finds a texture that matches the dimensions it is looking for. The first one found (with the highest id) is selected, and it uses that. This works great for FF757/767, Laminar planes, Zibo, Ultimate, Tupolev, etc - everyone seems to do it this way. Sometimes, particularly when you restart the scenario or change aircraft, it just doesn't find the texture, and you end up with a piece of the airport map in your windows instead. (image number 8 in your ZIP file). So you use the << option to keep scanning until you find the right image.

However, the FF A320 is strange. Rather than having just one big texture with all the panels, it seems to have 3 from what I was told by someone who was looking at the textures. If you look at your images, there is a value printed in each window, something like GL4042, GL4037, GL4036, GL4035, etc. They keep going down each time. When you click <<, it keeps searching backwards from the current texture. If you click on the GLxxxx value, it will restart the scan from the top. When you do things like pop-out or pop-in, I think it causes a rescan and the texture id is changing. That might be why it seems like the resizing is broken, but it might be the texture id changing instead, and the textures look similar.

So what we need to do is two tests:

  1. Start up the default Laminar 737 (just the default included with XP11, not the Zibo or any other custom versions). Test all the functionality of XTextureExtractor, pop the windows in and out, etc. It should work perfectly. If it doesn't work perfectly, we need to fix this first. There might be some strange difference with your GPU, drivers, etc. Since I have the Laminar 737, I can test this too.
  2. Do more tests with the FF A320, but make sure the GL texture id remains the same, it should not change. If it changes, you are looking at a different texture. X-Plane actually has a texture browser built in where you can see the OpenGL id numbers, and see the whole texture in memory. Go to the "Developer" menu at the top, select "Show Texture Browser", then search for "fbo" and it will show a texture called fbo-lit Panel or something like that. When you click on it, the OGL id there should match what XTextureExtractor is showing.

Please try #1 so we have a baseline to compare with. If #1 fails then it is a bug I can try to fix. If #1 works with the 737, there might not be much we can do for the A320 since they are definitely doing something weird with textures that I've never seen before.

warptravel commented 5 years ago

Hello, how to save the texture id?

waynepiekarski commented 5 years ago

@warptravel the problem is that the texture id changes every time an aircraft is loaded, so it uses a scanning algorithm to search for the right texture. Are you finding that you need to click the << button every time, and you want to try to remember the number of clicks needed? I've been thinking about trying to save this, but I'm not sure if it is consistent all the time.

waynepiekarski commented 5 years ago

The scanning algorithm has been significantly changed in XTE 2.0 and is now automatic, I'd try this again and see if there are any problems still.