move shaders to .glsl files and stringify to .h file.
add crude screenshot facility (using F1 key), it can also be used for debugging start with shadows using shadowmap, not working yet add experimental 'ignore' body index in raycast, using b3HitInfo.m_m_hitResult2
This commit is contained in:
@@ -5,17 +5,22 @@
|
||||
///See http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/
|
||||
#include "OpenGLInclude.h"
|
||||
|
||||
enum
|
||||
{
|
||||
RENDERTEXTURE_COLOR=1,
|
||||
RENDERTEXTURE_DEPTH,
|
||||
};
|
||||
struct GLRenderToTexture
|
||||
{
|
||||
GLuint m_framebufferName;
|
||||
GLuint m_renderedTexture;
|
||||
GLuint m_depthrenderbuffer;
|
||||
bool m_initialized;
|
||||
int m_renderTextureType;
|
||||
public:
|
||||
|
||||
GLRenderToTexture();
|
||||
|
||||
void init(int width, int height);
|
||||
void init(int width, int height, GLuint textureId, int renderTextureType=RENDERTEXTURE_COLOR);
|
||||
bool enable();
|
||||
void disable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user