I am do with some game maps,this file has a format of so-called “pixel-16”.
I know that our windows has a display mode of 16-bit color.
If the R,G,B all have 3 byte,they are 24-bit.each 1 byte,8-bit.rage from 0 to 255.
but when they are 16-bit,2 byte…well,I am lost…How can they describe the 256 kinds of Rs,Gs,Bs?
I study on the pixel-16 game maps,and get some data, such as:
a pixel R=32,G=56,B=0,it store in hex of E0 10.
a pixel R=16,G=48,B=0,it store in hex of C0 08.
a pixel R=48,G=80,B=0,it store in hex of 40 19.
a pixel R=31,G=48,B=0,it store in hex of C0 0C.
Yeah~,I can not work out the rule of them.
RGB will be Converted to BGR,and the G maybe store in 6-bit,the R in 5-bit,B in 5-bit, am I Right?
But how they store in hex?
How can i read the map in my opengl application? fopen() can not read by bits.
Must i use the << or >> or & or | on a byte?
In the evil DirectX,maybe I can use the creating and get a Surface and lock and copy and …to use this map DIRECTLY.[The files from Micr$oft are named “Direct”,En…maybe it is reasonable.8) ]
What to do in OpenGL?