By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,191 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,191 IT Pros & Developers. It's quick & easy.

directpython api

P: 4
Do you really have to use classes and
Functions in directpython api or can you
Just write a long script.
Aug 28 '15 #1
Share this Question
Share on Google+
1 Reply


P: 4
The thing is I really wana do game programing with directx and
So all these time I searched for a good api like direct python
So I got it and am using it with python 2.4.
Am doing it the short cut maybe I don't understand it here
Is my source

Expand|Select|Wrap|Line Numbers
  1. Import d3d
  2. From d3dc import *
  3. Vertex_table = [(200.0, 200.0, 1.0, 1.0, 0xff00fff),
  4.                 (250.0, 100.0, 1.O, 1.0, 0xfff0000),
  5.                 (200.0, 200.0, 1.0, 1.0, Oxfff0000),
  6.                ]
  7. (1)--d3d.createDevice()
  8. (2)--d3d.clear()
  9. (4)--d3d.beginScene()
  10. (5)--d3d.setState(RS.FVF, FVF.XYZRHW | FVF.DIFFUSE)
  11. (6)--d3d.drawVertices(TYPE.TRIANGLELIST, Vertex_table)
  12. (7)--d3d.endScene()
  13. (8)--d3d.present()
Please tell me how can make this triangle move around on the screen. Thanks
Aug 28 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.