Hi there!
I'm looking for a good graphics library (Not OpenGL!) for c++.
I'm common to some languages but new to c++. I know the basics and OOP.
My question: What's a recommended graphics library to add pixels to the screen very fast?
Thank you
bye!
This is a discussion on A good graphics library? within the C++ Programming forums, part of the General Programming Boards category; Hi there! I'm looking for a good graphics library (Not OpenGL!) for c++. I'm common to some languages but new ...
Hi there!
I'm looking for a good graphics library (Not OpenGL!) for c++.
I'm common to some languages but new to c++. I know the basics and OOP.
My question: What's a recommended graphics library to add pixels to the screen very fast?
Thank you
bye!
Probably not the fastest, but SDL does this.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
If it's not the fastest, is there a faster one?
Propably it will be enough for now.
I found it and try to impement it. Let's see wheter it works this time.
I tried some others but they didn't work...
Do I have to use Win32 projects or is a console app enoguh?
I don't think SDL works in Console mode, you have to use a "Window" app.
Of course, the Windows API itself has GDI(+) that does draw pixels to the screen (or off-screen for that matter) quite well.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Really? So i don't have to use a library at all? Show me how the GDI does that
Is the GDI included to c++ in VisualStudio 2005 PROF_EDITION ?
allegro is also another one, comparable to SDL, I can't tell you whether or not its any faster as i don't have much experience in graphics programming.
to use sdl or allegro, you'll need to know the correct linker commands to use the functions from their libraries, otherwise the compiler is going to say it doesn't know what you're talking about.
as far as whether or not you need to use the win32 api for either of those...
i'm pretty sure you create an *emtpy* project, and add all the stuff you need. if you want your app to be *windowed* then you'll need to include "windows.h", although you shouldn't need to use much of the win32 api to accomplish this (i.e. you won't need all those millions of lines of code that typically go into a win32 app.)
hope this helps somewhat.
Hm, but isnt that as matsp said possible with GDI?
I mean: I'm kinda confues with adding libraries to VC... I tried a couple of times and it never worked...
GDI is part of Windows base functionality - it is how your windows appear on the screen, and how this text in this post eventually will be visible on someones machine [assuming that machine is running Windows - at least before Vista, Vista has some new concepts when it comes to drawing to the screen].
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
So, how do I add some pixels to the screen/window now?
Well, first of all you need to implement enough code to put up a window, once you have done that, here's a reference of "Drawing" functions:
http://msdn2.microsoft.com/en-us/lib...06(VS.85).aspx
Bitmap functions:
http://msdn2.microsoft.com/en-us/lib...43(VS.85).aspx
All windows functions by category:
http://msdn2.microsoft.com/en-us/lib...86(VS.85).aspx
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
You should really look into Programming Windows 5th Edition by Charles Petzold.
Todd
Note also if you want to really draw individual pixels, it's probably best to create a bitmapsurface, draw pixels there, and then BitBlt the bitmap to the screen [if you want to see updated pixels as it draws, have a count of how many pixels you've been drawing and BitBlt every <choose a number, 256, 1000, 50 or whatever makes most sense>].
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
hm... any examples?
I'm pretty sure Google can come up with loads - but I don't have any here...
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
google is where i searched. but for me, as i dont know much about GDI, it is hard to find the good examples. i thought you might are?