Ok, I have a buffer of pixels from DirectDraw, Right? Right.
I made a SET_PIXEL macro to set pixels.
I figured out how to draw a solid line like that.
I also know how to draw a scaled slice of a bitmap instead of a color.
I can draw a scaled square bitmap image easily (Source RECT to Destination RECT).
But...
How in the world do I draw a triangle? Does anybody know how? The only clue I have is to use the slice bitmap line drawer!
Once that is complete, I can build a 3D engine off of that and optimize it. I'm not using Direct3D or OpenGL's 3D system, i'm writing my own and it's a very difficult task.
Do you have any idea on how to draw a triangle?
Drawing Triangles (For my 3D engine)I'm writing my own 3D engine, but...
Page 1 of 1
8 Replies - 3257 Views - Last Post: 17 November 2005 - 10:56 AM
Replies To: Drawing Triangles (For my 3D engine)
#2
Re: Drawing Triangles (For my 3D engine)
Posted 15 November 2005 - 01:00 PM
Unfortunately i'm not as advanced w/ c++ as I can be yet and I can offer no help what so ever. I am, however, curious to find the answer to the question out. You say this is homework - for what kind of class?
#3
Re: Drawing Triangles (For my 3D engine)
Posted 15 November 2005 - 01:07 PM
Why are you reinventing the wheel?
DirectDraw was never made to do this, Direct3d has been optimized way way deep in its core, so what do you have to gain from trying to implement 3d using a 2d engine?
DirectDraw was never made to do this, Direct3d has been optimized way way deep in its core, so what do you have to gain from trying to implement 3d using a 2d engine?
#4
Re: Drawing Triangles (For my 3D engine)
Posted 16 November 2005 - 10:58 AM
1: This is for something I am doing on my own.
2: That didn't answer my question, but I'm writing my own 3D engine because I want to. I read a tutorial on drawing interpolated lines and the guy said I could write a texture mapped 3D engine if I knew how to draw triangles with the line. I'm 're-inventing the wheel' because I want to (and I saw the finished product in a dream).
Now... Does anybody know any idea or clue about how to draw a triangle with a interpolated line?
I need some help...
(Oh yeah! And Direct3D is mircosoft complicated which is another reason).
2: That didn't answer my question, but I'm writing my own 3D engine because I want to. I read a tutorial on drawing interpolated lines and the guy said I could write a texture mapped 3D engine if I knew how to draw triangles with the line. I'm 're-inventing the wheel' because I want to (and I saw the finished product in a dream).
Now... Does anybody know any idea or clue about how to draw a triangle with a interpolated line?
I need some help...
(Oh yeah! And Direct3D is mircosoft complicated which is another reason).
This post has been edited by WolfCoder: 16 November 2005 - 10:59 AM
#5
Re: Drawing Triangles (For my 3D engine)
Posted 16 November 2005 - 06:56 PM
Read this:
Tricks of the 3D Game Programming Gurus-Advanced 3D Graphics and Rasterization(by Andre LaMothe).
The book teaches creating a 3D texture-mapped, lit video game for the PC with a software rasterizer which can be written by the reader. The book also covers the principles of 3D graphics.
Tricks of the 3D Game Programming Gurus-Advanced 3D Graphics and Rasterization(by Andre LaMothe).
The book teaches creating a 3D texture-mapped, lit video game for the PC with a software rasterizer which can be written by the reader. The book also covers the principles of 3D graphics.
#6
Re: Drawing Triangles (For my 3D engine)
Posted 16 November 2005 - 07:06 PM
you will also be able to get some more help from: (www.gamedev.net)
fourms, see how that goes!
fourms, see how that goes!
#7
Re: Drawing Triangles (For my 3D engine)
Posted 17 November 2005 - 10:50 AM
NO! NO! NO!!!!
...
I am not asking for books and stuff,
I am asking for anyone who knows how to draw a triangle using a draw_line function!
Please, please, please don't ask me why, just help.
Please.
...
I am not asking for books and stuff,
I am asking for anyone who knows how to draw a triangle using a draw_line function!
Please, please, please don't ask me why, just help.
Please.
#8
Re: Drawing Triangles (For my 3D engine)
Posted 17 November 2005 - 10:52 AM
Go to gamedev and ask there, thats along the lines of the sick things they do there.
#9
Re: Drawing Triangles (For my 3D engine)
Posted 17 November 2005 - 10:56 AM
<Whine!>
But i'm asking for people in D.I.C.
</Whine!>
But i'm asking for people in D.I.C.
</Whine!>
Page 1 of 1
|
|

New Topic/Question
Reply





MultiQuote





|