<commit_before>/**
 * \file OgreOculusRenderer.hpp
 * \brief Initialize rendering for the rift with SDK post traitement (OpenGL)
 * \author <NAME> (Ybalrid)
 */

#ifndef OGRE_OCULUS_RENDERER
#define OGRE_OCULUS_RENDERER

#include <glew.h>
#ifndef _WIN32 //NOT ON WINDOWS (Assuming Linux. Usinig X Window System as display server
#include <glxew.h> //Need GLX glew on X window system
#else
#include <wglew.h> //Need wgelw
#endif


//Oculus Rift Lib
#include <OVR.h>

#ifdef _WIN32
 #include <Windows.h>
#endif
#include <OVR_CAPI_GL.h>
/*
#include <OVR_CAPI.h>

//OpenGL CAPI OVR
#include <OVR_CAPI_GL.h>
#include <CAPI/GL/CAPI_GL_Util.h>
*/



//C++ SDL Includes
#include <iostream>
#include <sstream>

/*
//Oculus Rift Lib
#include <OVR.h>
//CAPI
#include <OVR_CAPI.h>

//OpenGL CAPI OVR
#include <OVR_CAPI_GL.h>
#include <CAPI/GL/CAPI_GL_Util.h>
*/
/*
#ifdef _WIN32
//Direct3D CAPI OVR. Forcing version 11
#define OVR_D3D_VERSION 11
#include <OVR_CAPI_D3D.h>
#include <CAPI/D3D1X/CAPI_D3D1X_Util.h>
#endif
*/

#ifndef _WIN32 //Assuming Linux  here. Any Unix based have that header includable
#include <unistd.h>
#endif

//Ogre
#include <Ogre.h>

//Texture manipulation
#include <OgreTexture.h>

//OpenGL Classes. Some low level access required
#include <RenderSystems/GL/OgreGLRenderSystem.h>
#include <RenderSystems/GL/OgreGLRenderTexture.h>
#include <RenderSystems/GL/OgreGLTexture.h>
#include <RenderSystems/GL/OgreGLTextureManager.h>


#ifdef _WIN32 //Possibility of adding D3D11 compatibility
#include <RenderSystems/Direct3D11/OgreD3D11RenderSystem.h>
#include <RenderSystems/Direct3D11/OgreD3D11Texture.h>
#include <RenderSystems/Direct3D11/OgreD3D11TextureManager.h>
#endif

//Accessing Oculus Rift through a class : 
#include "OculusInterface.hpp"

//OS Specific build macro 
#include "systemMacro.h"

using namespace std;
using namespace OVR;

struct OgrePose
{
	Ogre::Vector3 position;
	Ogre::Quaternion orientation;
};

class DLL OgreOculusRender
{
    public:
        OgreOculusRender(std::string windowName = "OgreOculusRender");
        ~OgreOculusRender();

		///Calculate, time and present a frame on the Rift display
		void RenderOneFrame();

		///Set the near Z clipping plane distance from the POV. Used to calculate Projections matricies
		void setCamerasNearClippingDistance(float distance);

		///Automatic initialization of the renderer.
        void initialize();

		///Start Oculus and Ogre libraries.<commit_msg>remove useless headers. Keep everything D3D11 commented<commit_after>/**
 * \file OgreOculusRenderer.hpp
 * \brief Initialize rendering for the rift with SDK post traitement (OpenGL)
 * \author <NAME> (Ybalrid)
 */

#ifndef OGRE_OCULUS_RENDERER
#define OGRE_OCULUS_RENDERER

#include <glew.h>
#ifndef _WIN32 //NOT ON WINDOWS (Assuming Linux. Usinig X Window System as display server
#include <glxew.h> //Need GLX glew on X window system
#else
#include <wglew.h> //Need wgelw
#endif


//Oculus Rift Lib
#include <OVR.h>

#ifdef _WIN32
#include <Windows.h>
#endif

#include <OVR_CAPI_GL.h>

//C++ SDL Includes
#include <iostream>
#include <sstream>

/*
#ifdef _WIN32
//Direct3D CAPI OVR. Forcing version 11
#define OVR_D3D_VERSION 11
#include <OVR_CAPI_D3D.h>
#include <CAPI/D3D1X/CAPI_D3D1X_Util.h>
#endif
*/

#ifndef _WIN32 //Assuming Linux  here. Any Unix based have that header includable
#include <unistd.h>
#endif

//Ogre
#include <Ogre.h>

//Texture manipulation
#include <OgreTexture.h>

//OpenGL Classes. Some low level access required
#include <RenderSystems/GL/OgreGLRenderSystem.h>
#include <RenderSystems/GL/OgreGLRenderTexture.h>
#include <RenderSystems/GL/OgreGLTexture.h>
#include <RenderSystems/GL/OgreGLTextureManager.h>

/*
#ifdef _WIN32 //Possibility of adding D3D11 compatibility
#include <RenderSystems/Direct3D11/OgreD3D11RenderSystem.h>
#include <RenderSystems/Direct3D11/OgreD3D11Texture.h>
#include <RenderSystems/Direct3D11/OgreD3D11TextureManager.h>
#endif
*/
//Accessing Oculus Rift through a class : 
#include "OculusInterface.hpp"

//OS Specific build macro 
#include "systemMacro.h"

using namespace std;
using namespace OVR;

struct OgrePose
{
	Ogre::Vector3 position;
	Ogre::Quaternion orientation;
};

class DLL OgreOculusRender
{
    public:
        OgreOculusRender(std::string windowName = "OgreOculusRender");
        ~OgreOculusRender();

		///Calculate, time and present a frame on the Rift display
		void RenderOneFrame();

		///Set the near Z clipping plane distance from the POV. Used to calculate Projections matricies
		void setCamerasNearClippingDistance(float distance);

		///Automatic initialization of the renderer.
        void initialize();

		///Start Oculus and Ogre libraries.
{'fraction_non_alphanumeric': 0.10770877944325481, 'fraction_numerical': 0.019057815845824413, 'mean_word_length': 4.594011976047904, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 52, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '215107', 'n_tokens_mistral': 1781, 'n_tokens_neox': 1677, 'n_words': 457}