From 3dfe2108cfab31ba3ee5527e217d0d8e99a51162 Mon Sep 17 00:00:00 2001 From: git perforce import user Date: Tue, 25 Oct 2016 12:29:14 -0600 Subject: Initial commit: PhysX 3.4.0 Update @ 21294896 APEX 1.4.0 Update @ 21275617 [CL 21300167] --- .../sampleViewer3/IJGWin32/CPPJPEGWrapper.h | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h (limited to 'KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h') diff --git a/KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h b/KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h new file mode 100644 index 00000000..da5f1f59 --- /dev/null +++ b/KaplaDemo/samples/sampleViewer3/IJGWin32/CPPJPEGWrapper.h @@ -0,0 +1,32 @@ +#pragma once +#include +#include +#include "jpeglib.h" +#include "jerror.h" + +class CPPJPEGWrapper{ +public: + CPPJPEGWrapper(); + ~CPPJPEGWrapper(); + void Unload(); + + unsigned char* GetData() const; + unsigned GetWidth(); + unsigned GetHeight(); + unsigned GetBPP(); + unsigned GetChannels(); + + + bool LoadJPEG(const char* FileName, bool Fast = true); +protected: + //if the jpeglib stuff isnt after I think stdlib then it wont work just put it at the end + unsigned long x; + unsigned long y; + unsigned short int bpp; //bits per pixels unsigned short int + unsigned char* data; //the data of the image + unsigned int ID; //the id ogl gives it + unsigned long size; //length of the file + int channels; //the channels of the image 3 = RGA 4 = RGBA + + +}; -- cgit v1.2.3