View Full Version : Convert Photoshot colour to OpenGL
01-13-2006, 04:06 PM
Is there a mathmatical operation to convert the standard opengl colour that you get from pain programs, like photoshop; into openGL format, between 0 and 1.
01-13-2006, 04:12 PM
Sorry to waste your space but as soon as I posted that I realised how stupid I am. All you do is divide it by 255. Oh well guess its there for others to search hehe, sorry
01-13-2006, 04:17 PM
It's not such a silly question, you can also feed the color in as a packed unsigned byte format, so only an explicit float format load would need to be divided, but OpenGL can take RGB and RGBA data as a packed 8 bit unsigned byte per component and that's probably the sort of data you have straight out of whatever application you're tinkering with.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.