Windows GDI w/ DirectX

Blitz3D Forums/Blitz3D Programming/Windows GDI w/ DirectX

Knight #51(Posted 2009) [#1]
Ya'll know those functions to draw triangles,rectangles,circles, and stuff?? Well if I made a Userlib that draws a triangle using the Windows GDI, can I use it in DirectX applications?


Knight #51(Posted 2009) [#2]
Yeah!!! Got my triangle to work :D Anybody know why it's flickering so much though?


Warner(Posted 2009) [#3]
Most likely because the Windows GDI and the DirectX output screen are alternating their update instruction. So at one point, the GDI is showing, and at another point the DX output object.


Kryzon(Posted 2009) [#4]
There's already a GDI decls in the code archives. You surely don't need to make another userlib.


Knight #51(Posted 2009) [#5]
I'm just trying to make it for fun :D Anyway, I know have my rotating triangle and circular movement for the spaceship. Unfortunately right know I'm taking a break so I haven't had time to combine the two files together (I made one a while back). :) Here is my code (the commented-out functions are my userlib functions).

The triangle and rotation:



The circular movement:



[edit]Combining files...Done

Circlular Movement/Rotation:



Sorry that it's not well commented or stucturarly nice;I just threw it together.