Create 3D objects insite Cocos2d-x
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Create 3D objects insite Cocos2d-x

on

  • 691 views

 

Statistics

Views

Total Views
691
Views on SlideShare
691
Embed Views
0

Actions

Likes
1
Downloads
9
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Create 3D objects insite Cocos2d-x Presentation Transcript

  • 1. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References SEMINAR Create 3D objects inside Cocos2D-x Name: Phùng Hoàng Bắc Hà Nội, ngày 17 tháng 08 năm 2013 Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 1 / 13
  • 2. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents Introduction 3D objects Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 2 / 13
  • 3. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents Introduction 3D objects Create 3D objects inside Cocos2D-x Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 2 / 13
  • 4. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 2 / 13
  • 5. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 2 / 13
  • 6. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 2 / 13
  • 7. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents 1 Introduction 3D objects 2 Create 3D objects inside Cocos2D-x 3 Demo 4 Conclusion 5 References Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 3 / 13
  • 8. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Introduction 3D objects Define 1. 3D objects Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 4 / 13
  • 9. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Introduction 3D objects Define 1. 3D objects 3D objects are objects that occurs on a three-axis Cartesian coordinate system. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 4 / 13
  • 10. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Introduction 3D objects Define 1. 3D objects 3D objects are objects that occurs on a three-axis Cartesian coordinate system. Cocos2D-x is, as you might infer from its name, a 2d gaming library. But, as it uses OpenGL internally to draw its stuff, we might leverage it to create some 3D objects on the mix. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 4 / 13
  • 11. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Introduction 3D objects Define 1. 3D objects 3D objects are objects that occurs on a three-axis Cartesian coordinate system. Cocos2D-x is, as you might infer from its name, a 2d gaming library. But, as it uses OpenGL internally to draw its stuff, we might leverage it to create some 3D objects on the mix. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 4 / 13
  • 12. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents 1 Introduction 3D objects 2 Create 3D objects inside Cocos2D-x 3 Demo 4 Conclusion 5 References Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 5 / 13
  • 13. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 14. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Define 2. Vector3D Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 15. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Define 2. Vector3D Typedef struct { GLfloat x ; GLfloat y ; GLfloat z ; } Vector3D ; Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 16. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Define 2. Vector3D Typedef struct { GLfloat x ; GLfloat y ; GLfloat z ; } Vector3D ; But it has some issues like : 1 Doesn’t allow you to draw sprites on top of the boxes. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 17. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Define 2. Vector3D Typedef struct { GLfloat x ; GLfloat y ; GLfloat z ; } Vector3D ; But it has some issues like : 1 Doesn’t allow you to draw sprites on top of the boxes. 2 The gluLookAt call shouldn’t be inside the Box class draw method. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 18. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Define 2. Vector3D Typedef struct { GLfloat x ; GLfloat y ; GLfloat z ; } Vector3D ; But it has some issues like : 1 Doesn’t allow you to draw sprites on top of the boxes. 2 The gluLookAt call shouldn’t be inside the Box class draw method. 3 The color shading is hardcoded. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 19. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Define 2. Vector3D Typedef struct { GLfloat x ; GLfloat y ; GLfloat z ; } Vector3D ; But it has some issues like : 1 Doesn’t allow you to draw sprites on top of the boxes. 2 The gluLookAt call shouldn’t be inside the Box class draw method. 3 The color shading is hardcoded. 4 And so on, so on... Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 20. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Create 3D objects inside Cocos2D-x Cocos2D-x use vector 2D but with C++ we can define vector 3D. Define 2. Vector3D Typedef struct { GLfloat x ; GLfloat y ; GLfloat z ; } Vector3D ; But it has some issues like : 1 Doesn’t allow you to draw sprites on top of the boxes. 2 The gluLookAt call shouldn’t be inside the Box class draw method. 3 The color shading is hardcoded. 4 And so on, so on... Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 6 / 13
  • 21. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents 1 Introduction 3D objects 2 Create 3D objects inside Cocos2D-x 3 Demo 4 Conclusion 5 References Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 7 / 13
  • 22. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Demo Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 8 / 13
  • 23. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents 1 Introduction 3D objects 2 Create 3D objects inside Cocos2D-x 3 Demo 4 Conclusion 5 References Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 9 / 13
  • 24. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Although I don’t recommend using Cocos2D-x for making a complete 3D game, adding some 3D objects might bring some interesting effects. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 10 / 13
  • 25. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Contents 1 Introduction 3D objects 2 Create 3D objects inside Cocos2D-x 3 Demo 4 Conclusion 5 References Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 11 / 13
  • 26. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References References [1] http ://build-failed.blogspot.com/2012/05/create-3d-objects-inside-cocos2d-x.html [2] http ://jameshui.tumblr.com/post/29459200037/rendering-simple-3d-objects-and- md2-models-with [3] http ://www.cocos2d-x.org/news/67 Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 12 / 13
  • 27. Introduction 3D objects Create 3D objects inside Cocos2D-x Demo Conclusion References Thanks for listening. Phùng Hoàng Bắc (Framgia Việt Nam) Create 3D objects inside Cocos2D-x Hà Nội , 17/08/2013 13 / 13