Managed C++ for game tools?

Started by
23 comments, last by Ukrzuel 12 years, 11 months ago

What does QT use for rendering graphics to the screen?

It depends on the platform. But for speed, you'd have to go outside of QT wrappers.

Mind you, cutie isn't that cute, since you immediately know if a GUI has been made using QT or not.
Advertisement

What does QT use for rendering graphics to the screen?

For example, if I clicked at (16, 32) on a bitmap, could I have a graphic drawn at that location. This is pretty much all I need, which is easy to do in GDI+ but very slow at the moment. I just need a buffer pretty much and I'll use my normal way of exporting locations for objects, ect... plus an array for the tile locations.

I'll check out the QT website some more, I did watch some youtube videos and must same I'm impressed with how fast I had seen a window with buttons and text boxes up and running.


There are several classes you can use for rendering.
  • QImage
  • QPixmap (which I use for rendering)
  • QBitmap
  • etc.
To draw the content of these classes you need to inherit from the class QWidget and overload the function repaint() which gets called everytime your widget needs to get repainted. In this function you need to use the class QPainter to finally draw something on the screen.

Visit my blog, follow me on twitter or check out my bitbucket repositories.


It depends on the platform. But for speed, you'd have to go outside of QT wrappers.

Mind you, cutie isn't that cute, since you immediately know if a GUI has been made using QT or not.


I guess for a tool like a 2D leveleditor the rendering speed of Qt should be more than enough.

Visit my blog, follow me on twitter or check out my bitbucket repositories.

Alrighty, so my options look like:

1. C# Forms with embed XNA (Which I've done before)

2. QT using OpenGL/Direct X for displaying graphics

3. C++ Using SDL, ect... To make the editor from scratch. (I've done this a few times, mind you making the GUI was a pain in the butt)

After my day at the office I will research more into QT and see if this will be practical.

Thanks again.
Thanks Felix, I was reading a bit on QPainter, wasn't sure how powerful it was going to be. Mind you when I program anything from a game to an editor, I make sure it only draws what you can see. However having a 2000x500 buffer to draw on might be too big for some software rendering. I could just make different buffers for every few screen width/height if I had to.

Edit: I was just looking on the SFML website:

http://www.sfml-dev.org/tutorials/1.6/graphics-qt.php

Pretty easy setup with QT!

This topic is closed to new replies.

Advertisement