예제 #1
0
ParticleRenderer::ParticleRenderer()
: m_pos(0),
  m_numParticles(0),
  m_pointSize(1.0f),
  m_particleRadius(0.125f * 0.5f),
  m_program(0),
  m_vbo(0),
  m_colorVBO(0)
{
    _initGL();
}
ParticleRenderer::ParticleRenderer()
: m_pos(0),
  m_numParticles(0),
  m_pointSize(1.0f),
  m_particleRadius(0.125f * 0.5f),
  m_program(0),
  m_vbo(0),
  m_colorVBO(0),
  m_fHalfViewRadianFactor(0.5f * 3.1415926535f/180.0f)
{
    _initGL();
}
예제 #3
0
ParticleRenderer::ParticleRenderer()
: m_pos(0),
  m_numParticles(0),
  m_pointSize(1.0f),
  m_spriteSize(2.0f),
  m_vertexShader(0),
  m_pixelShader(0),
  m_program(0),
  m_texture(0),
  m_pbo(0),
  m_vboColor(0)
{
    _initGL();
}
예제 #4
0
ParticleRenderer::ParticleRenderer()
: m_pos(0),
  m_numParticles(0),
  m_pointSize(1.0f),
  m_particleRadius(0.125f * 0.5f),
  m_program(0),
  m_vbo(0),
  m_colorVBO(0)
{
    _initGL();
#ifndef BT_NO_PROFILE
	m_profileIterator = CProfileManager::Get_Iterator();
#endif //BT_NO_PROFILE
}
예제 #5
0
ParticleRenderer::ParticleRenderer()
    : m_pos(0),
      m_numParticles(0),
      m_maxNumParticles(0),
      m_pointSize(1.0f),
      //m_particleRadius(0.125f * 0.5f),
      // RMK smaller particles
      m_particleRadius(0.125f * 0.05f),
      //m_particleRadius(0.125f * 0.001f),
      m_program(0),
      m_vbo(0),
      m_colorVBO(0)
{
    _initGL();
}
예제 #6
0
ParticleRenderer::ParticleRenderer(uint3 dim)
: m_pos(0),
  m_numParticles(0),
  m_particleRadius(0.125f * 0.05f),
  m_program_sphere(0),
  m_program_cosmos(0), 
  m_texture(0),
  m_spriteSize(2.0f),
  m_vbo(0),
  m_colorVBO(0),
  b_renderSkyBox(true),
  b_renderFloor(false),
  floorTex(0),
  _displayMode(PARTICLE_SPHERES)
{
	m_gridDim = dim;
    _initGL();
}
ParticleRenderer::ParticleRenderer(unsigned int windowWidth, unsigned int windowHeight)
    : m_pos(0),
      m_numParticles(0),
      m_pointSize(1.0f),
      m_spriteSize(2.0f),
      m_vertexShader(0),
      m_vertexShaderPoints(0),
      m_fragmentShader(0),
      m_programPoints(0),
      m_programSprites(0),
      m_texture(0),
      m_pbo(0),
      m_vboColor(0),
      m_windowWidth(windowWidth),
      m_windowHeight(windowHeight),
      m_bFp64Positions(false)
{
    m_camera[0] = 0;
    m_camera[1] = 0;
    m_camera[2] = 0;
    _initGL();
}
예제 #8
0
// init window
void Display::setOptions (int w, int h, bool fs)
{
	if (_window)
	{
		SDL_DestroyWindow(_window);
		SDL_GL_DeleteContext(_ctx);
	}

	_window =
		SDL_CreateWindow(_title.c_str(),
			SDL_WINDOWPOS_CENTERED,
			SDL_WINDOWPOS_CENTERED,
			_width = w, _height = h,
			SDL_WINDOW_SHOWN |
			SDL_WINDOW_OPENGL |
			(fs ? SDL_WINDOW_FULLSCREEN : 0));

	if (!_window)
	{
		die() << "unable to create SDL window";
		return;
	}

	// vsync
	SDL_GL_SetSwapInterval(1);
	
	// create openGL context
	_ctx = SDL_GL_CreateContext(_window);

	if (!_ctx)
	{
		die() << "unable to create OpenGL context";
		return;
	}

	_initGL();
}
예제 #9
0
Renderer::Renderer()
	: m_pos(0),
	m_numParticles(0),
	m_pointSize(1.0f),
	m_particleRadius(0.125f * 0.5f),
	//m_program(0),
	m_vbo(0),
	m_colorVBO(0),
	mWindowW(1024),
	mWindowH(768),
	mFov(60.0f),
	m_downSample(1),
	m_imageTex(0),
	m_postprocessingTex(0),
	m_depthTex(0),
	m_imageFbo(0),
	m_postprocessingFbo(0)
	  //m_indexBuffer(0)
{
	txParticle = LoadTexture("data/water.bmp");
	m_displayTexProg = new GLSLProgram(passThruVS, texture2DPS);
	m_postprocessing = new GLSLProgram(passThruVS, postprocessingPS);
    _initGL();
}
예제 #10
0
UnholyGameViewController::UnholyGameViewController() : GameViewController() {
    _initGL();
}
MultiGameViewController::MultiGameViewController() : GameViewController() {
	_initGL();
}