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] --- KaplaDemo/samples/sampleViewer3/RenderTarget.h | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 KaplaDemo/samples/sampleViewer3/RenderTarget.h (limited to 'KaplaDemo/samples/sampleViewer3/RenderTarget.h') diff --git a/KaplaDemo/samples/sampleViewer3/RenderTarget.h b/KaplaDemo/samples/sampleViewer3/RenderTarget.h new file mode 100644 index 00000000..6f77127b --- /dev/null +++ b/KaplaDemo/samples/sampleViewer3/RenderTarget.h @@ -0,0 +1,31 @@ +#ifndef RENDER_TARGET +#define RENDER_TARGET + +#include "FrameBufferObject.h" + +// ------------------------------------------------------------------------------------------- +class RenderTarget +{ +public: + RenderTarget(int width, int height); + ~RenderTarget(); + + void resize(int width, int height); + + void beginCapture(); + void endCapture(); + + GLuint getColorTexId() { return mColorTexId; } + GLuint getDepthTexId() { return mDepthTexId; } + +private: + void clear(); + GLuint createTexture(GLenum target, int width, int height, GLint internalFormat, GLenum format); + + GLuint mColorTexId; + GLuint mDepthTexId; + + FrameBufferObject *mFBO; +}; + +#endif \ No newline at end of file -- cgit v1.2.3