A
download View.h
Language: C++
LOC: 31
Project Info
TableHockey3D(tablehockey)
Server: SourceForge
Type: cvs
...ey\CVSROOT\tablehockey\src\
   Application.cpp
   Application.h
   Camera.cpp
   Camera.h
   Cube.cpp
   Cube.h
   Data.cpp
   Data.h
   Disk.cpp
   Disk.h
   FloatingText.cpp
   FloatingText.h
   Floor.cpp
   Floor.h
   Input.cpp
   Input.h
   Light.cpp
   Light.h
   log.cpp
   log.h
   main.cpp
   mmgr.cpp
   mmgr.h
   Model.cpp
   Model.h
   nommgr.h
   Puck.cpp
   Puck.h
   Pyramid.cpp
   Pyramid.h
   scene.cpp
   scene.h
   SmartPtr.h
   Sound.cpp
   Sound.h
   TableHockey.dsp
   TableHockey.dsw
   TestScene.cpp
   TestScene.h
   text.cpp
   text.h
   TextHelp.cpp
   TextHelp.h
   texture.cpp
   texture.h
   TexturedCube.cpp
   TexturedCube.h
   timer.cpp
   timer.h
   View.cpp
   View.h

// View.h: interface for the CView class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_VIEW_H__CBA6FB25_9DD5_11D4_A9EA_00105A2EAD2D__INCLUDED_)
#define AFX_VIEW_H__CBA6FB25_9DD5_11D4_A9EA_00105A2EAD2D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <windows.h>
#include "scene.h"
#include "text.h"

/**
 * CView is responsible for the screen output.
 *
 * CView first initializes the screen to the desired resolution and color
 * depth.
 *
 * CApplication will call "Update()" when the next frame should be shown. In
 * "pScene" is a pointer to the current scene stored. A scene describes how
 * the screen should look like (position of the objects, light, camera, etc.)
 * and processes the input. CView just calls "pScene->Update()" to do everything
 * what's necessary.
 *
 * Different functions are used to switch between the scenes, e.g. "ShowMenu()"
 * would load the menu-scene, "ShowTestScene()" would show a test scene. To add
 * your own scene write a function similar to "ShowTestScene()".
 */
class CView  
{
public:
	/// constructor
	CView();
	/// destructor
	virtual ~CView();

	/// switch to fullscreen mode
	bool SwitchToFullscreen();
	/// application exists, do all cleanup
	void Exit();
	/// kill the OpenGL window
	void KillWindow();
	/// create an OpenGL window
	bool CreateMainWindow();
	/// Initialize
	bool Init();
	/// window should be resized
	void Resize();
	/// show next frame
	void Update();

	// functions for the various scenes

	/// Show my test scenen
	bool ShowTestScene();

	/// fullscreen mode or not
	bool		bFullscreen;
	/// pointer to the current scene
	CScene		*pScene;
	/// very important handle
	HDC			hDC;
	/// main window handle
	HWND	hWnd;
private:
	bool _SetPixelFormat();
	bool _RegisterMyClass();
	HGLRC	hRC;
};

#endif // !defined(AFX_VIEW_H__CBA6FB25_9DD5_11D4_A9EA_00105A2EAD2D__INCLUDED_)

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us