Archived

This topic is now archived and is closed to further replies.

Non-API Specific Graphics

This topic is 5573 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here''s a question a friend of mine had that I really couldn''t answer very well, just wanted to see if anyone here knew a way to answer this question. :-D OpenGL and DirectX take care of drawing your graphics to the screen for you. So all the math for drawing the actual pixel matrix is taken care of. Recently I began to look at the Sonique visuals plugin architecture, and it requires that you set the color value for each pixel in the pixel matrix yourself, then sonique takes draws these pixels to its designated visual windows. This is very similar to several other types of programs. My question is how does one go about drawing in such a fassion when you dont have opengl or directx to do all the work for you? Does this make sense? Where can I find information for writing this kind of code? www.studentgamedevelopers.com

Share this post


Link to post
Share on other sites
In windosw you can use something called GDI(graphisc device interface. Its basically using wm_paint messages. If you have more questiong I will try to answer in my right mind. try sarching around msdn for it.Im hoping you that that helped.

------------------------------
p.s. excuse me english. im from L.A.

Share this post


Link to post
Share on other sites
A fast way to draw something on a window is to select a bitmap into it, have a memory buffer in which you do your actual rendering and every frame call SetDIBits to bring this buffer on the screen.

Just stay away from SetPixel and such gdi functions if you do anything serious cause they are awfully slow.






Runicsoft -- home of my open source Function Parser and more

Share this post


Link to post
Share on other sites
Well, DirectX serves the purpose to bring you closer to the hardware, thus getting past windows and dealing with memory is what you want. The gdi functions are even higher up than directx and normally wouldn''t be used. Using directx... really doesn''t do the things for you... I think the gdi does that more.

Normally, say you made your own os, you would have to access video memory via a driver, or specifically by addresses and that''s how pixels would get drawn to the screen.

___________________________
Freeware development:
ruinedsoft.com

Share this post


Link to post
Share on other sites