Skip to main content
GameDev.net gamedev.net
🔒 Locked

The Dilema

Started by ageny6 Jan 3, 2003 at 9:46 PM 11 replies 400+ views
Original Post
ageny6
ageny6
I have surfaces, lots of surfaces, to draw. I am not using directX as an API, but am using window API''s to create my program. Assosiated with each surface, I have a texture that is being stretched to the four corners of the surfaces in respect to the 3D transformation of those points. Now, my dilema is quite simple. What API should I use to draw those textured surfaces (exclusing DX)??? SetBitmapBits? Bitblt? Any other? And how can I properly use these APIs (because I always seem to have a problem when I attempt to correcty use the API) Thanks Jonathan
My signature used to suck. But it's much better and more accurate now.
Zipster
Zipster
OpenGL
ageny6
ageny6
If I was to choose within the spectrum of Window''s APIs or self made drawing rootines (like in the good old day of game programming), what would be my best bet?

Jonathan
My signature used to suck. But it's much better and more accurate now.
bishop_pass
bishop_pass
OpenGL
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in
JonnyQuest
JonnyQuest
Try it, but if you want absolute max performance, use your own code and optimize the hell out of it.

OpenGL suggesters: I think it''s obvious he doesn''t want to or can''t use a 3D API for whatever reason.

- JQ
Full Speed Games. Are back.
~phil
Coincoin
Coincoin
quote:
Try it, but if you want absolute max performance, use your own code and optimize the hell out of it.
How is that possible? Unless the poor guy wants to program a full 3D API and develop brand new drivers that will interact with all the hardware out there, there is no way he will even get close to OpenGL and DirectX performances.

---

So ageny6, you have basically three choices:

- GDI
- DirectX
- OpenGL

GDI is slow as hell. Unless you don't care about speed, it is a poor choice. If you don't give a shnitz about performance, that's probably the simplest you could find.

It seems you refuse to use DirectX for some reason. Direct3D is the fastest API you could find (along with OpenGL) and the easier to use with programmable pipeline. However, the COM interface could be a pain in the ass at the beggining.

OpenGL is almost as fast if not equal to Direct3D (depending on hardware and software implementation). Some people say it's easier to use. Could be true if you use things such a GLU to help you. Also, stay away from programmable pipeline with OGL unless you don't care about making a different implementation for each hardware vendor.

quote:
If I was to choose within the spectrum of Window's APIs or self made drawing rootines (like in the good old day of game programming), what would be my best bet?
Reinventing the wheel is no longer the way to go in software programming these days. Corporations and associations such as ARB and Microsoft invest millions and even billions to make your life easier. Throwing that through the window because you prefer to do everything yourself a-la DOS will make you loose precious time and money at reinventing things that are already widely used. Unless you have a freaking good reason, you should stick to either OGL or DX for high performance.

EDIT : Removed error
______________________________
Oooh, you found the horadric cube!

[edited by - Coincoin on January 5, 2003 9:14:37 AM]
JonnyQuest
JonnyQuest
I was not talking about hardware acceleration. Someone posted OpenGL and he basically just said he was looking for a software solution. How is DX or OpenGL faster when doing software rendering?

- JQ
Full Speed Games. Are back.
~phil
ageny6
ageny6
Allow to clear things up.

Not that I don''t want to use DX or OGL, but I want to understand the concepts of 3D graphics myself instead of taking some of the OpenGl and DX functions for granted, regardless of processing speed. It just a conceptual idea that I have given myself in order to better understand. But, as another message I posted explains, I can''t seem to do this successfully (and it is kinda frustrating me!). I asked this question simply to know if there was another alternative for drawing surfaces than the OpenGL and DX, regardless of proccessing speed (althought the fastest option would be nice).

Thank you for your concern. I will still take though other ideas as to answer my original question.



Jonathan
My signature used to suck. But it's much better and more accurate now.
bishop_pass
bishop_pass
OpenGL absolutely forces upon you the need to fully understand the entire gamut of 3d graphics programming. If you think rasterizing a polygon into pixels is what 3d graphics is all about, you are mistaken. That is the lowest of the low level for 3d graphics. One step above that is matrix transformations. And that''s pretty much all OpenGL does for you. The point of OpenGL is to provide a clean common interface to the hardware for those tasks.

OpenGL is basically to 3d graphics what printf () is to text output. Do you really care about the hardware specific parts of printf ()?

Go ahead and learn about triangle rasterization. That''s what OpenGL does. But that isn''t 3d graphics. If you think coding a replacement for OpenGL in software is going to teach you about 3d graphcis, you''re wrong. It will teach you about rasterizing triangles.

If you think by using OpenGL, you are shielding yourself from learning 3d, you are wrong. You''ll still have to learn about transformation hierarchies, filtering and sampling, octrees, interpolation, intersection tests, bounding volumes, procedural shading, fractals, L-systems, bump mapping, radiosity, ray tracing, spline interpolation, camera transformations, coordinate systems, geometry, topology, bones, skeletons, LOD, triangulation...
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in
ageny6
ageny6
Interesting! I was misinformed about OGL. I was told differently. Thanks for the Heads-Up on the API.

And a tangent to this original topic. Which API is faster? OGL or DX?

Thanks

Jonathan
My signature used to suck. But it's much better and more accurate now.
Coincoin
Coincoin
That''s a question you must not ask on these forum. This is highly flamable content and will start a OGL vs D3D war. You should read the article on begining 3D, differences between the APIs are clearly stated so that you can make a choice depending on your needs.

The speed difference is so little that if you end up needing this speed gain, you are in big trouble an should think a little bit more about your design.

500 x 1

______________________________
Oooh, you found the horadric cube!
ageny6
ageny6
Okay, i''ll try to remember that! Thanks for the tip!

Jonathan
My signature used to suck. But it's much better and more accurate now.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.