|
======================================================
???????????????? ???? ????
<c++ programming language>???????????
????Aear?????, ???
======================================================
????C++??????Aear??????????????????C++??????????????????C++?OO?????????????Aear????????????????????????????? ISO, <<The C++ programming language>>???????????
??????Aear??????????? Aear??????DirectX??shader??game???????????????????????????????????aear????????????????????????????Aear??????????????????????DirectX?OpenGL??API??????????????????????????????????????
1. ?? ???????????????????????????????
2. ???????? ??????????
3. C/C++????????? ?????????????1?3?????????
4. ????????? ???????????
===========????????Aear??????????????=========
5. ????????????
6. ???????????????
7. Windows ?????????????????
8. ????
9. API (DirectX OpenGL)?
5?7????????????????????????1?8????DirectX?OpenGL???1????????1???????
??Aear??????????50%???30%?????????????????????? 20%?????10%?????????????????????????DirectX?OpenGL????????Demo??????????????????????????????????????????????????Blizzard?????????
Requirements
* Strong C/C++ and PC programming skills.
* Minimum of 2 years experience programming at least one title that has already shipped.
* A passion for games and game development.
* Good communication skills.
* Bachelor's degree in Computer Science or a related field.
Plusses
* Graphics or sound programming experience.
* Strong math background.
* Experience in game design.
* Knowledge of Win32 and DirectX API's.
* Prior work experience on an MMORPG.
????DirectX????2???plus??????????????????blizzard??????????????DirectX????
=====================???=====================
???????????????????const ? reference????????????C?????????C++?????????
C++????object?????????object????? ??????object class?
class CBitmap{
public:
CBitmap();
~CBitmap();
private:
const static UINT32 MAX_BUFFER_SIZE = 65536;
UINT32 m_Height;
UINT32 m_Width;
BYTE m_Buffer[MAX_BUFFER_SIZE];
};
??????????DrawBitmap???????????????
========?????========
void DrawBitmap(CBitmap Bitmap);
========?????========
void DrawBitmap(CBitmap & Bitmap);
?????????????????????????CBitmap object????Bitmap????????DrawBitmap????????????????????CBitmap???????????m_Buffer?????????reference??? "&"?????????????DrawBitmap??????Bitmap?????????????????????????const???????DrawBitmap???????
void DrawBitmap(const CBitmap & Bitmap);
??????DrawBitmap??????CBitmap????const????????????
class CBitmap{
public:
CBitmap();
~CBitmap();
UINT32 GetHeight(void) const;
void SetHeight(void);
private:
const static UINT32 MAX_BUFFER_SIZE = 65536;
UINT32 m_Height;
UINT32 m_Width;
BYTE m_Buffer[MAX_BUFFER_SIZE];
};
UINT32 CBitmap::GetHeight(void) const
{
return m_Height;
}
void CBitmap::SetHeight(UINT32 Height)
{
m_Height = Height;
}
??????? UINT32 GetHeight(void) const; ??const??????????????CBitmap????????SetHeight()???m_Height,???????const. ?DrawBitmap????????const?????????const????
void DrawBitmap(const CBitmap & Bitmap)
{
Bitmap.GetHeight(); // ???????
Bitmap.SetHeight(100); // ???Bitmap?const??
}
??????????class????????????????? const ???????????????
??????CBitmap????????????CNormalMap?????????????CNormalMap?code??
class CBitmap {
.....
// ??
Private:
CNormalMap NormalMap;
public:
CNormalMap GetNormalMap(void);
}
???????????????????????????CNormalMap?????????????????????????????????Class??????????????????CNormalMap?????????????????????????????2?????????
class CBitmap {
.....
// ??
Private:
CNormalMap NormalMap;
public:
CNormalMap GetNormalMap(void);
const CNormalMap & GetStaticNormalMap(void);
}
????C++????????????
class CBitmap {
.....
// ??
Private:
CNormalMap NormalMap;
public:
CNormalMap GetNormalMap(void);
const CNormalMap & GetNormalMap(void) const;
}
?????????NormalMap?????????GetStaticNormalMap() ?? GetNormalMap() ?const??????????????reference????
===============================================
C++?????????const?reference?????????? ????Design Pattern??????Design Pattern?????????????OO??????????Aear????Design Pattern???????????????????????????Design Pattern?????????Inheritance ? Delegation.
??Inheritance?????????C++???????????????CBitmap?????????????CTexture??????CBitmap??????GetBitmapHeight??????????
class CTexture : public CBitmap {
public:
CTexture();
~CTexture();
};
?????????????????????CBitmap??CTexture?????????Delegation??????
class CTexture {
public:
CTexture();
~CTexture();
private:
CBitmap InternalBitmap;
public:
UINT32 GetHeight(void) { return InternalBitmap.GetBitmapHeight(); };
};
??Inheritance?Delegation?????Aear?????????????????????????????Aear????????Delegation?????????Inheritance?????????class????????????????????
???????? ??CTexture?CBitmap???GetBitmapHeight ?????CTexture????Bitmap?????????mipmap?????????? GetTextureHeight()? ??GetTextureHeight??????texture size???? ??????????????????????GetBitmapHeight?????????????????????texture??????????????????
????????????Delegation???????????Design Pattern?Interface??????Inheritance ???????.
?????????????????????????????????????BLOG????????? http://blog.sina.com.cn/u/1261532101 ???? |
|