473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

directpython api

Do you really have to use classes and
Functions in directpython api or can you
Just write a long script.
Aug 28 '15 #1
1 1446
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

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

Similar topics

1
by: Jérôme Le Bougeant | last post by:
Hello, I have DirectPython 0.5 (http://directpython.sourceforge.net/) and python2.4 (directx9.0C installed). Samples do not work, I have this error : "RuntimeError: Failed to create a device"...
0
by: vedran | last post by:
Hello, I using directpython for making 3d miniature applications,but I have one problem about directpython. This is my code for example: import d3d import d3dc import d3dx
1
by: vedran | last post by:
Hello, How can I move objects in directpython???
3
by: Gigs_ | last post by:
can someone tell me which is better for making 3d game in python. something like tennis simulation thx
0
by: ...:::JA:::... | last post by:
Hello, I have problem with building directpython ( .exe ) application , actually when I finish building application and when I run it, in log file I get an error: Traceback (most recent call...
0
by: ...:::JA:::... | last post by:
Hello, Is there any real easy example for loading an texture in your directpython window??? For example this is my code: # loading directpython modules import d3dx import d3d from d3dc...
3
by: vedrandekovic | last post by:
Hello, I'am using DirectPython 0.8, wxPython 2.8.4.2 (ansi) for Python 2.5 and I'm running it on windows XP SP2. When I run my wx program, and this program run directpython code: (I run it...
2
by: veki | last post by:
Hello, I've got IBM Thinkpad 30 laptop with configuration: IBM Thinkpad R30 P3 Mobile Celeron 900mhz 128mb sdram pc133 15gb hdd cd-rom Teac cd-224e 56K V.90/92 10/100 Ethernet
0
by: george123456 | last post by:
Hay all Please I need some one who knows the direct python api. I am rendering a 3d model to the screen and wants to know how How to move this model to x axis or y axis must i use matrix or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.