This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
/// VoxelList.cpp | |
/// | |
/// Created by Davide Pasca - 2012/7/4 | |
/// See the file "license.txt" that comes with this project for | |
/// copyright info. | |
//================================================================== | |
#include "stdafx.h" | |
#include "VoxelList.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
class DummyWin32OGLContext | |
{ | |
HWND mHWND; | |
HGLRC mHGLRC; | |
public: | |
PFNWGLCHOOSEPIXELFORMATARBPROC mpWglChoosePixelFormatARB; | |
PFNWGLCREATECONTEXTATTRIBSARBPROC mpWglCreateContextAttribsARB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set runtimepath=$HOME/Dropbox/Settings/vimfiles,$VIM,$VIMRUNTIME | |
source $HOME/Dropbox/Settings/vimrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//==================================== | |
// with exception handling | |
//==================================== | |
BitMap *LoadBMP( const char *fname ) | |
{ | |
File file(fname); | |
U32 id = file.ReadVal(); | |
int w = file.ReadVal(); | |
int h = file.ReadVal(); | |
int bpp = file.ReadVal(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
#if defined(DE3_NORMAL_SHORT) | |
//================================================================== | |
typedef Vec4<short> Normal; | |
static const u_int GL_NOR_TYPE = GL_SHORT; | |
static const u_int GL_NOR_NORMALIZED = GL_TRUE; | |
static const u_int GL_NOR_STRIDE = sizeof(short) * 4; | |
DFORCEINLINE Normal MakeNormal( float xf, float yf, float zf ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// are we waiting for the introduction to go away ? | |
if ( mStater[STATE_IN_COMM_INTRODUCTION].IsActive() ) | |
{ | |
if NOT( moCharDlgWin->IsActive() ) // is finally the dialog gone ? | |
{ | |
mStater[STATE_IN_COMM_INTRODUCTION].Deactivate(); // the wait has ended | |
updateHomeButtonsState(); // set the fighters button on hover | |
} | |
} | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
template <class _T> | |
class VecOwn | |
{ | |
DVec<_T> mVec; | |
public: | |
~VecOwn() | |
{ | |
clear_free(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
class RandPool | |
{ | |
DVec<U32> mVals; | |
size_t mIterIdx; | |
public: | |
RandPool( size_t size, U32 seed=0 ) | |
: mIterIdx(0) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DGLUT | |
{ | |
//================================================================== | |
void CheckGLErr( const char *pFileName, int line ) | |
{ | |
GLenum err = glGetError(); | |
while (err != GL_NO_ERROR) | |
{ | |
const char *pErr = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "const auto" is just too common not to have an alias | |
#define c_auto const auto | |
class Type; // forward declaration if possible | |
//================================================================== | |
class ClassName | |
{ | |
size_t mMember = 0; // 'm' prefix for member variable | |
U8 *mpPointer {}; // 'mp' prefix for member pointer |
OlderNewer