directpython api

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • george123456
    New Member
    • Aug 2015
    • 4

    directpython api

    Do you really have to use classes and
    Functions in directpython api or can you
    Just write a long script.
  • george123456
    New Member
    • Aug 2015
    • 4

    #2
    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

    Code:
    Import d3d
    From d3dc import *
    Vertex_table = [(200.0, 200.0, 1.0, 1.0, 0xff00fff),
                    (250.0, 100.0, 1.O, 1.0, 0xfff0000),
                    (200.0, 200.0, 1.0, 1.0, Oxfff0000),
                   ]
    (1)--d3d.createDevice()
    (2)--d3d.clear()
    (4)--d3d.beginScene()
    (5)--d3d.setState(RS.FVF, FVF.XYZRHW | FVF.DIFFUSE)
    (6)--d3d.drawVertices(TYPE.TRIANGLELIST, Vertex_table)
    (7)--d3d.endScene()
    (8)--d3d.present()
    Please tell me how can make this triangle move around on the screen. Thanks
    Last edited by Rabbit; Aug 29 '15, 12:39 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Comment

    Working...