0
  1. Trang chủ >
  2. Công Nghệ Thông Tin >
  3. Kỹ thuật lập trình >

beginning opengl game programming 2004 phần 3 pdf

beginning opengl game programming 2004 phần 3 pdf

beginning opengl game programming 2004 phần 3 pdf

... screenshot of this example inFigure 3. 12.Chapter 3 OpenGL States and Primitives60Figure 3. 11 A polygon can be an arbitrary number of vertices. 03 BOGL_GP CH 03 3/1/04 2 :34 PM Page 60TLFeBOOKAs you ... culling; it’s used by other OpenGL subsystems, includinglighting.Chapter 3 OpenGL States and Primitives54 03 BOGL_GP CH 03 3/1/04 2 :34 PM Page 54TLFeBOOKglVertex3f((x+1.0), 0.0, (z+1.0));}glEnd();}}The ... < 3; x++){glBegin(GL_QUAD_STRIP);for (int z = 0; z < 4; z++){glVertex3f(x, 0.0, z);glVertex3f((x+1.0), 0.0, z);}glEnd();}}Handling Primitives 63 03 BOGL_GP CH 03 3/1/04 2 :34 PM...
  • 42
  • 425
  • 0
beginning opengl game programming 2004 phần 1 potx

beginning opengl game programming 2004 phần 1 potx

... 0.0);glEnd();glBegin(GL_POLYGON);glColor3f(1.0, 1.0, 1.0);glVertex3f(-1.0, 2.0, 0.0);glColor3f(1.0, 1.0, 0.0);glVertex3f( -3. 0, -0.5, 0.0);glColor3f(0.0, 1.0, 1.0);glVertex3f(-1.5, -3. 0, 0.0);A Sneak Peek 1101 BOGL_GP CH01 3/ 1/04 ... GL_DEPTH_BUFFER_BIT);glBegin(GL_TRIANGLES);glColor3f(1.0, 0.0, 0.0);glVertex3f(2.0, 2.5, -1.0);glColor3f(0.0, 1.0, 0.0);glVertex3f( -3. 5, -2.5, -1.0);glColor3f(0.0, 0.0, 1.0);glVertex3f(2.0, -4.0, 0.0);glEnd();glBegin(GL_POLYGON);glColor3f(1.0, ... . .3 Chapter 2 Creating a Simple OpenGL Application . . . . . . . . . . . . . . . . . . . . . 13 Chapter 3 OpenGL States and Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 Chapter...
  • 36
  • 309
  • 0
beginning opengl game programming 2004 phần 2 ppsx

beginning opengl game programming 2004 phần 2 ppsx

... that you can turn on and off withthese functions.Chapter 3 OpenGL States and Primitives36 03 BOGL_GP CH 03 3/1/04 2 :34 PM Page 36 TLFeBOOKAs you can see, this algorithm is very similar to ... stippling. Figure 3. 4 is a screenshot of this line example.Handling Primitives 49Figure 3. 3 A sample stipple pattern demonstrating how the bit order is interpreted. 03 BOGL_GP CH 03 3/1/04 2 :34 PM Page ... they’re related to throughout the book. 03 BOGL_GP CH 03 3/1/04 2 :34 PM Page 35 TLFeBOOKclass we use throughout the rest of the book to encapsulate the OpenGL- specific code fromthe operating...
  • 38
  • 375
  • 0
beginning opengl game programming 2004 phần 4 ppsx

beginning opengl game programming 2004 phần 4 ppsx

... following:glBegin(GL_TRIANGLES);glNormal3f(–0.707f, 0.707f, 0.0);glVertex3f( 3. 0, 0.0, 2.0);glNormal3f(0.707f, 0.707f, 0.0);glVertex3f(2.0, 0.0, 0.0);glNormal3f(0.0, 0.707f, –0.707f);glVertex3f(–1.0, 0.0, 3. 0);glEnd();Calculating ... ydirection.glBegin(GL_TRIANGLES);glNormal3f(0.0, 1.0, 0.0);glVertex3f( 3. 0, 0.0, 2.0);glVertex3f(2.0, 0.0, 0.0);glVertex3f(–1.0, 0.0, 3. 0);glEnd();Lighting in OpenGL 115Figure 5.6 The surface normal.05 BOGL_GP CH05 3/ 1/04 ... triangleglBegin(GL_TRIANGLES);glColor3f(1.0f, 0.0f, 0.0f); // red vertexglVertex3f(–10.0f, -10.0f, –5.0f);glColor3f(0.0f, 1.0f, 0.0f); // green vertexglVertex3f(20.0f, -10.0f, –5.0f);glColor3f(0.0f, 0.0f, 1.0f);...
  • 39
  • 340
  • 0
beginning opengl game programming 2004 phần 5 ppt

beginning opengl game programming 2004 phần 5 ppt

... the top of the CGfxOpenGL.cppfile:unsigned char letterA[] = {0xC0, 0x 03, 0xC0, 0x 03, 0xC0, 0x 03, 0xC0, 0x 03, 0xC0, 0x 03, 0xDF, 0xFB,0x7F, 0xFE,0x60, 0x06,0x30, 0x0C,0x30, 0x0C,0x18, 0x18,0x18, ... affect textureObjects[0]glBindTexture(GL_TEXTURE_3D, textureObjects[1]);Using the Texture Map 1 53 07 BOGL_GP CH07 3/ 1/04 10: 03 AM Page 1 53 TLFeBOOKAn OpenGL Bitmap ExampleThe following example ... GL_RGBA, 32 , 0, GL_RGBA, GL_UNSIGNED_BYTE, imageData);3D TexturesExtensionExtension name:EXT_texture3DName string:GL_EXT_texture3DPromoted to core: OpenGL 1.2Function names:glTexImage3DEXT()Tokens:GL_TEXTURE_3D_EXTUsing...
  • 34
  • 468
  • 0
beginning opengl game programming 2004 phần 6 pps

beginning opengl game programming 2004 phần 6 pps

... example:glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, 3. 0);Texture Parameters 1 73 07 BOGL_GP CH07 3/ 1/04 10: 03 AM Page 1 73 TLFeBOOKChecking the Name StringCallingglGetString()withGL_EXTENSIONSreturns ... pixels);ExtensionExtension name:EXT_texture3DName string:GL_EXT_texture3DPromoted to core: OpenGL 1.2Function names:glTexSubImage3DEXT(),glCopyTexSubImage3DEXT()Most of the parameters should ... improves to:PFNGLCOPYTEXSUBIMAGE3DEXTPROC pglCopyTexSubImage3DEXT = NULL;pglCopyTexSubImage3DEXT = (PFNGLCOPYTEXSUBIMAGE3DEXTPROC)wglGetProcAddress(“glCopyTexSubImage3DEXT”);As long as wglGetProcAddress()doesn’t...
  • 36
  • 373
  • 0
beginning opengl game programming 2004 phần 7 docx

beginning opengl game programming 2004 phần 7 docx

... GL_COMPILE);glBegin(GL_TRIANGLE_FAN);glVertex3f(0.0, 1.0, 0.0);glVertex3f(-1.0, 0.0, 1.0);glVertex3f(1.0, 0.0, 1.0);glVertex3f(1.0, 0.0, -1.0);glVertex3f(-1.0, 0.0, -1.0);glEnd();glEndList();}Display Lists 22510 BOGL_GP CH10 3/ 1/04 ... DrawPyramid(){glBegin(GL_TRIANGLE_FAN);glVertex3f(0.0, 1.0, 0.0);glVertex3f(-1.0, 0.0, 1.0);glVertex3f(1.0, 0.0, 1.0);glVertex3f(1.0, 0.0, -1.0);glVertex3f(-1.0, 0.0, -1.0);glEnd();}Because this ... inorder, just as if they were inserted into your code.Display Lists 2 23 10 BOGL_GP CH10 3/ 1/04 10:05 AM Page 2 23 TLFeBOOKtexEnvColor [3] = m_interpol;glActiveTexture(GL_TEXTURE1);glTexEnvfv(GL_TEXTURE_ENV,...
  • 25
  • 338
  • 0
beginning opengl game programming 2004 phần 8 pptx

beginning opengl game programming 2004 phần 8 pptx

... (x,y)GL_C4UB_V3F* Color, 4 elements (r,g,b,a), and position, 3 elements (x,y,z)GL_C3F_V3FColor, 3 elements (r,g,b), and position, 3 elements (x,y,z)GL_N3F_V3FNormals, 3 elements, and position, 3 elements ... elements (r,g,b) and position, 3 elements (x,y,z)GL_T2F_N3F_V3FTexture coordinates, 2 elements (s,t), normals, 3 elements, and position, 3 elements (x,y,z)GL_T2F_C4F_N3F_V3FTexture coordinates, ... elements (x,y,z)GL_C4F_N3F_V3FColor, 4 elements (r,g,b,a), normals, 3 elements, and position, 3 elements (x,y,z)GL_T2F_V3FTexture coordinates, 2 elements (s,t), and position, 3 elements (x,y,z)GL_T4F_V4FTexture...
  • 25
  • 321
  • 0
beginning opengl game programming 2004 phần 9 pps

beginning opengl game programming 2004 phần 9 pps

... theChapter 13 ■The Endgame278Figure 13. 1 Classes and their dependencies in the game. Table 13. 1 Chess Game ClassesClass DescriptionCGfxOpenGLThe OpenGL rendering class. The majority of OpenGL ... passes.12 BOGL_GP CH12 3/ 1/04 10:06 AM Page 266TLFeBOOK277The Endgamechapter 13 The endgame. This is the end, and we have a game for you. We’ve covered quite abit of OpenGL in this book, ... 1.0);}The Accumulation Buffer 2 73 Figure 12.4 Soft shadows.12 BOGL_GP CH12 3/ 1/04 10:06 AM Page 2 73 TLFeBOOKFigure 13. 1 is a diagram showingall of the classes we use in the game, along with their dependen-cies,...
  • 26
  • 369
  • 0
beginning opengl game programming 2004 phần 10 pps

beginning opengl game programming 2004 phần 10 pps

... function, 233234 glInterleavedArrays() function, 236237 glMultiDrawArrays() function, 231232 glMultiDrawElements() function, 233 interleaved arrays, 235237 locking, 238239 Marbles demo, 239 –241multiple ... 295–298binding texture objects, 1 53 154bitmap fonts, 249–2 53 display lists for, 250bitmaps, 133138 data, specifying, 134 drawing, 135136 example of, 136138 positioning, 134135 blend equations, 125–126blend ... W.COURSEP T R.COM / GAMEDE V Beginning C++ Game Programming ISBN: 1-59200-205-6$29.99 Game Art for TeensISBN: 1-59200 -30 7-9$29.99 Beginning DirectX 9ISBN: 1-59200 -34 9-4$29.99 Game Programming for...
  • 36
  • 403
  • 0

Xem thêm

Từ khóa: giáo án tiếng pháp 11 phần 3 pdflearning ios game programming by michael daley pdf downloadsams teach yourself game programming in 24 hours pdfjava game programming for dummies free pdfdelphi graphics and game programming exposed with directx pdfbeginning mobile phone game programming pdfBáo cáo quy trình mua hàng CT CP Công Nghệ NPVNghiên cứu sự hình thành lớp bảo vệ và khả năng chống ăn mòn của thép bền thời tiết trong điều kiện khí hậu nhiệt đới việt namNghiên cứu vật liệu biến hóa (metamaterials) hấp thụ sóng điện tử ở vùng tần số THzBiện pháp quản lý hoạt động dạy hát xoan trong trường trung học cơ sở huyện lâm thao, phú thọGiáo án Sinh học 11 bài 13: Thực hành phát hiện diệp lục và carôtenôitGiáo án Sinh học 11 bài 13: Thực hành phát hiện diệp lục và carôtenôitĐỒ ÁN NGHIÊN CỨU CÔNG NGHỆ KẾT NỐI VÔ TUYẾN CỰ LY XA, CÔNG SUẤT THẤP LPWANPhối hợp giữa phòng văn hóa và thông tin với phòng giáo dục và đào tạo trong việc tuyên truyền, giáo dục, vận động xây dựng nông thôn mới huyện thanh thủy, tỉnh phú thọPhát triển mạng lưới kinh doanh nước sạch tại công ty TNHH một thành viên kinh doanh nước sạch quảng ninhTrả hồ sơ điều tra bổ sung đối với các tội xâm phạm sở hữu có tính chất chiếm đoạt theo pháp luật Tố tụng hình sự Việt Nam từ thực tiễn thành phố Hồ Chí Minh (Luận văn thạc sĩ)Phát triển du lịch bền vững trên cơ sở bảo vệ môi trường tự nhiên vịnh hạ longThơ nôm tứ tuyệt trào phúng hồ xuân hươngSở hữu ruộng đất và kinh tế nông nghiệp châu ôn (lạng sơn) nửa đầu thế kỷ XIXKiểm sát việc giải quyết tố giác, tin báo về tội phạm và kiến nghị khởi tố theo pháp luật tố tụng hình sự Việt Nam từ thực tiễn tỉnh Bình Định (Luận văn thạc sĩ)BT Tieng anh 6 UNIT 2Giáo án Sinh học 11 bài 14: Thực hành phát hiện hô hấp ở thực vậtTrách nhiệm của người sử dụng lao động đối với lao động nữ theo pháp luật lao động Việt Nam từ thực tiễn các khu công nghiệp tại thành phố Hồ Chí Minh (Luận văn thạc sĩ)BÀI HOÀN CHỈNH TỔNG QUAN VỀ MẠNG XÃ HỘIĐổi mới quản lý tài chính trong hoạt động khoa học xã hội trường hợp viện hàn lâm khoa học xã hội việt namMÔN TRUYỀN THÔNG MARKETING TÍCH HỢP