Game Engine Architecture
3.2. Data, Code, and Memory in C/C++ 99 3.2.1.2. Signed and Unsigned Integers In computer science, we use both signed and unsign ...
100 3. Fundamentals of Software Engineering for Games decreasing inverse powers of two (^1 / 2 ,^1 / 4 ,^1 / 8 ,^1 / 16 , ...). ...
101 For example, the bit patt ern shown in Figure 3.5 represents the value 0.15625, because s = 0 (indicating a positive number) ...
102 3. Fundamentals of Software Engineering for Games least signifi cant digit of the mantissa. Those trailing zeros don’t corre ...
103 IEEE Floating-Point Bit Tricks See [7], Section 2.1, for a few really useful IEEE fl oating-point “bit tricks” that can make ...
104 3. Fundamentals of Software Engineering for Games is performed on multiple quantities in parallel, using a single machine in ...
105 Ogre ::Real defi nes a real fl oating-point value. It is usually defi ned to be 32 bits wide (equivalent to a float), but it ...
106 3. Fundamentals of Software Engineering for Games z Litt le-endian. If a microprocessor stores the least signifi cant byte ( ...
107 You can have your tools endian-swap the data prior to writing it into a binary data fi le. In eff ect, you make sure that t ...
108 3. Fundamentals of Software Engineering for Games You cannot simply cast the Example object into an array of bytes and blind ...
3.2. Data, Code, and Memory in C/C++ 109 Unresolved Reference??? ??? Multiply-Defined Symbol ??? foo.cpp U32 gGlobalA ; U32 gGlo ...
110 3. Fundamentals of Software Engineering for Games The compiler only operates on one translation unit at a time, so whenever ...
111 return (a > b)? a : b; } // definition of the min() function int min(int a, int b) { return (a <= b)? a : b; } A pure ...
112 3. Fundamentals of Software Engineering for Games tion units, the compiler will not be able to identify the problem, because ...
113 to bypass the compiler’s cost/benefi t analysis and control function inlining directly. 3.2.2.3. Linkage Every defi nition i ...
114 3. Fundamentals of Software Engineering for Games // This ‘gInternalVariable’ is distinct from the one // defined in foo.cpp ...
115 types of C/C++ variables work, we need to understand the memory layout of a C/C++ program. 3.2.3.1. Executable Image When a ...
116 3. Fundamentals of Software Engineering for Games = 3.141592f;) and all global object instances that have been declared with ...
117 a new stack frame for b() is pushed on top of a()’s frame. When b() returns, its stack frame is popped, and execution contin ...
118 3. Fundamentals of Software Engineering for Games void someFunction() { U32 anInteger; // ... } Pushing and popping stack fr ...
«
2
3
4
5
6
7
8
9
10
11
»
Free download pdf