Making my own gfx engine
I was wondering today, as I was working with OpenGL, how would I make my own gfx engine? I was thinking that the only "good" way to do it would be to do it with Assembly, but I don't feel like learning that. Then I thought about Dll's and all that stuff the OpenGL uses, and I don't know how to do that :)....
so, is there any "good" way of making a gfx engine (probably a 2d one) that would be able to go in to a full screen mode and draw to a buffer? And this would all work without ANY api calls.....or is it not possible to do this without some knowledge of dll's and assembly?
-Just a thought, I'm thinking that this might be a fun little project to work on.....
Truthfully, the only think you truly need for a gfx engine is a putpixel or setpixel or some sort of pixel ploting function. From there its all algoryhtems for lines and texture corrections etc. etc. I would say you could try one of the following:
--Making your own setpixel function call in assymbly(for speed), and base all your c++ code around that.
--Base all your graphic algorythems in assymbly, including memory management -- the whole kit and caboodle (sp).
--Use the default setpixel from the win32 gui (slow) and go from there.
I created my own 3d engine (wire mode only) in visual basic and it only took 1 day. Granted it wasnt that powerfull-or very fast at all, but it was a good learning expeirence.
so i'm guessing i'll just have to look around for the assembly functions to place a pixel.......well, i'll do that then! thanks
no, you dont absolutely need assembly, although it is very nice at times.
graphics engines arent that hard to make. If you want to make one, I suggest learning using the 13h DOS graphics mode. It is awesome, and an excellent learning tool.
I myself have made my own graphics engine (with no api calls like u said) using the 13h graphics mode. I have ported it slightly (but not completely) also to 11Bh and 112h.
If you have no clue what I am talking about when i say 13h, 11Bh, and 112h graphics modes, check out www.brackeen.com. It is an awesome website for this kind of stuff.
You dont need assembly to place a pixel onto the screen. You can do it just as quickly in C++. For example, in 13h I would do this:
making your own graphics engine is very low level compared to using stuff like DirectX and OpenGL, so be prepared to be working down and dirty with the memory and all. It is quite fun actually :)
This is one reason why I strongly believe that people should NOT begin their game and graphics programming with OpenGL and DirectX. They dont learn HOW things work when they start with those API's. In my opinion, always start with a low down graphics mode, like 13h, creating your own gfx library, and then once you have a solid understanding, move on to OpenGL and DirectX.
Anyways, hope this helps.
I agree with David, it can be a huge help, but plenty of people would rather skip the software rendering (me included) and just get an academic understanding of how a renderer works (which is also me) and just move onto OpenGL or some other API.