Loading tga files
EVERY frame! Second, you are loading the cubemap wrong. You can look the proper way up in the specification or in some tutorials. However glGetError should already throw lots of stuff at you because your gluBuild2DMipmaps call is invalid.
For starters i would simply load a 2D texture and display a quad with it, just to check whether texturing is working, at all. SetSignature Signature ;. SetReservedCharacter ResChar ;. ClearAll ;. Seek 0 , SeekOrigin. Begin ;. ReadByte ;.
ReadInt16 ;. SetColorMapLength binReader. SetXOrigin binReader. SetYOrigin binReader. SetWidth binReader. SetHeight binReader. SetPixelDepth pixeldepth ;. SetAttributeBits byte Utilities. GetBits ImageDescriptor, 0 , 4 ;. GetBits ImageDescriptor, 5 , 1 ;.
GetBits ImageDescriptor, 4 , 1 ;. ReadBytes this. ImageIDLength ;. If color map is included for other file types we can ignore it. ReadBytes 2 ;. Add Utilities. GetColorFrom2Bytes color15 [ 1 ] , color15 [ 0 ] ;. GetColorFrom2Bytes color16 [ 1 ] , color16 [ 0 ] ;. Add new Color32 r, g, b, ;. Add new Color32 r, g, b, a ;.
Seek this. ExtensionAreaOffset , SeekOrigin. SetExtensionSize int binReader. SetAuthorName System. SetAuthorComments System. DateTime dtstamp ;. ToString ;. SetDateTimeStamp dtstamp ;. SetJobName System. SetJobTime ts ;. SetSoftwareID System. SetKeyColor new Color32 r, g, b, a ;. SetGammaNumerator int binReader.
SetGammaDenominator int binReader. SetColorCorrectionOffset binReader. SetPostageStampOffset binReader. SetScanLineOffset binReader. SetAttributesType int binReader. Can you provide this tga file? The plugin checks for this existence and refuses to load it if it is not found. Sadly the error message can not be moved up and is not printed to stdout through qWarning.
I will provide a patch for this. Thank you. I think I have to find out the point where the error occurs in QT's source code. Thank you for the patch, too.
It will not help you - the tga file has to be Truevision 2. I didn't mean to say that. I'm sorry I didn't speak very well. I tried to determine which part of the file did not meet the specification. I saw the part where it check the footer, so I attached the footer, and the problem was found. Oh I got it. You already gave me a link related to footer. I just recognized it as a tga document. I didn't recognize the anchor. I had passed it.
I checked it right now.
0コメント