Hello friends!
About 3 month ago I turned to DDraw (DirectX 7 :red) and 2 weeks ago I decided to get familiar with a bit mor e uptodate DX version. Thus I arriced at DX9 and D3D...
Studying the D3D sections of the DX9 SDK and getting some tutorials, samples from the Internet resulted in the attached zipped package.
The zip contains the subdirs:
data - holds bitmaps used by examples
include - include files and the d3dmatrix project files
EmptyProject - 1st step, creating the d3d device
Rectangle - 2nd step, creating 2 triangles to compose a rectangle
Textured - 3rd step, creating and applying a bitmap as a texture
Rotation - 4th step, using matrices for 3D transformations,creating a 3D cube
Added
Lights - 5th step, adding lights (ambient, diffuse, point) to the scene
Sprites - creating many sprites using the d3dsprites.lib I created.
Camera and Sprites - setting up a quaternion based camera and using a sprite as mouse pointer
Every project has a small feature list at the very beginning of the main asm file.
I plan to extend these examples later in 2 directions:
- 2D sprite handling
- drawing sprites on other sprites (changable renderTarget feature)
- collision detection
- timeline based animation
- world of 3D
- improvement of the d3dmath lib
- transparent objects
- importing models
- creating and moving many 3D objects
- landscape
and many more...
Please feel free to look, criticize or use these sources. And also please report bugs, problems or any questions you might get.
2007.10.12: You can get the new version here: members.chello.hu/nemeth.gabor1/directx (http://members.chello.hu/nemeth.gabor1/directx). It won't fit here gue to the 256 kB size limit (it is quite small I have to add) :(
Greets, Gábor
Compliments Gabor, the demos run well and look fine.
Indeed, congratulations! Nice work. :U
Hi Gabor,
Very nice work :U
Hi!
I updated the projects and uploaded them onto a server: http://members.chello.hu/nemeth.gabor1/directx.
I'm still constructing the site, but the sources are already available.
I also updated the thread starting post so that it shows the last state of my directx experiment-development.
Greets, Gábor
Hello,
Good job,yes,but ...... :dazzled: :(
for lights,rotation crash
sprites do nothing
I haven't search which libraries you load,but,"invoke winmain" isn't the good way to used libcmt.
Libcmt need to recognize the name WinMain,or other one,and it's proper call.Msvcrt works in the same manner for the call.
modify this,it seem needed
Hi ToutEnMasm!
Please help me to identify the reasons for the crashes!
Did you extract all the files, the data directory as well?
These examples need the images stored in that directory. I didn't code a proper error handling, that could cause the crash.
What kind of hardware are you trying to run the examples?
My last question: Did you recompile them or the executables included in the zip are causing the problems?
To others I' like to say, please test the apps and help me to find bugs!
Greets, Gábor
Gabor,
Nothing crashes. I did not re-assemble them.
1. EmptyProject - matches your screen shot.
2. Rectangle - matches your screen shot.
3. Textured - screen is black.
4. Rotation - matches your screen shot.
5. Lights - matches your screen shot.
6. Sprites - screen is black.
7. Camera and Sprite - matches your screen shot.
Pentium D 940, Intel GMA 3000 video, Windows Vista Home Premium.
Tried to run after unpack,no crash but nothing to view,size 10,10,10,10 ? for rotation ?.
I have Read a little,the code.
Bad loop,when using WM_CREATE and others messages,you must return the value needed .
Read winhelp for that.
rc are empty,don't hurt to put a defaut icon in it
hi
i learning and create a directx app and uses Siekmanski d3d includes my problem is with
D3DXCreateTextureFromFileExA to load my image file
how can i show the image (png) with this includes
Begin
Draw
End
greets
ragdog
Hello Ragdog
This is how you can do it:
  invoke  D3DXCreateTextureFromFileExA,g_pD3DDevice,TEXT_("picture.png"),D3DX_DEFAULT,D3DX_DEFAULT,D3DX_DEFAULT,0,D3DFMT_UNKNOWN,D3DPOOL_DEFAULT,D3DX_DEFAULT,D3DX_DEFAULT,0,NULL,NULL,addr g_pTexture1
included an example
Siekmanski
[attachment deleted by admin]
thanks for your repley :U
i have this example allready and draw textures proplem hav it solved
I do have another problem with mine drawtext function I get not into my project
greets
ragdog
Hello ragdog
Microsoft did change the ID3DXFont interface since version 32 ( don't know about next versions ??? )
You can find it in "d3dx9core.inc"
IF D3D_SDK_VERSION eq 31
IID_ID3DXFont  TEXTEQU <{00b8d1536h,09eech,049b0h,{0a5h,0adh,093h,0cfh,063h,0afh,0b7h,0c6h}}>
ELSE
IID_ID3DXFont  TEXTEQU <{0d79dbb70h,05f21h,04d36h,{0bbh,0c2h,0ffh,052h,05ch,021h,03ch,0dch}}>
ENDIF
_vtID3DXFont MACRO CastName:REQ
_vtIUnknown CastName
&CastName&_GetDevice  comethod2 ?
&CastName&_GetDescAÂ Â comethod2 ?
&CastName&_GetDescWÂ Â comethod2 ?
IF D3D_SDK_VERSION eq 32
&CastName&_GetTextMetricsAÂ Â comethod2 ?
&CastName&_GetTextMetricsWÂ Â comethod2 ?
ENDIF
&CastName&_GetDCÂ Â comethod1 ?
&CastName&_GetGlyphData  comethod5 ?
&CastName&_PreloadCharacters  comethod3 ?
&CastName&_PreloadGlyphs  comethod3 ?
&CastName&_PreloadTextAÂ Â comethod3 ?
&CastName&_PreloadTextWÂ Â comethod3 ?
&CastName&_DrawTextAÂ Â comethod7 ?
&CastName&_DrawTextWÂ Â comethod7 ?
&CastName&_OnLostDevice  comethod1 ?
&CastName&_OnResetDevice  comethod1 ?
&CastName&_GetDesc  comethod2 ?
&CastName&_PreloadText  comethod3 ?
ENDM
ID3DXFont struct
_vtID3DXFont  ID3DXFont
ID3DXFont ends
LPD3DXFONTÂ Â typedef PTR DWORD
Greetings Siekmanski
I have this includes from you d3d071012.zip
here is my source http://www.masm32.com/board/index.php?topic=8119.msg59305#msg59305
with drawtext problem
thanks
ragdog
Hey!
I got terrified :dazzled: seeing how long I haven't touched this topic. I hope to be able to get back and make some significant steps.
To those who were keen on seeing my newer achievements or simply would like to know about my progress I say wait just a few weeks more!
Greets
Gábor
Hi gabor:
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: textured.asm
Textured.inc(12) : fatal error A1000: cannot open file : \masm32\d3d071012\Direc
tX\dx9macros.inc
It does not like where I unzipped your file(s).
Regards herge.
Quote from: gabor on September 05, 2008, 02:32:28 PM
Hey!
I got terrified :dazzled: seeing how long I haven't touched this topic. I hope to be able to get back and make some significant steps.
To those who were keen on seeing my newer achievements or simply would like to know about my progress I say wait just a few weeks more!
Greets
Gábor
Wow, I intend to invest some time in this soon, plz expand/update your sources, I'll be checking your webpage :green