Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm currently developing an OpenGL application and I want to use Qt for the other stuff. I want to use OpenGL like I use it with GLFW and without Qt functions. Just normal OpenGL. I cant find any site which uses Qt like id like to. So I only want to use Qt for the Windows and creating context and so on, but use OpenGL for the rest.
Thanks for your time.
There is an old-school QOpenGLWidget that will create an OpenGL context. That will give a window with an area to draw on.
Other option is the Scene Graph - OpenGL Under QML - pretty much the same, but it also allows to have QML user interface (buttons, edits, etc.) above your OpenGL rendering.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 months ago.
Improve this question
Unity 3d has two viewpoints, one is game and another isscene. when you move objects in scene you can see changes happened in game in the same time. while the reverse is true. But UE4 doesn't have this function. So I wonder if I can develop a plugin for UE4 to achieve that? does anyone have a clue?
enter image description here
Unreal 4: Go to Window -> Viewport 2. Drag the window somewhere and you will have 2 viewports:
Press play, only one viewport will display the "gameview" and the other remains as "sceneview" - Moving stuff in the 2nd Viewport will not update the game!
But I found this plugin:
https://github.com/jackknobel/GameViewportSync
You can see if that works for you or use it as a reference to get started developing your own plugin.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
As an option for rendering UI over a game I am currently developing I was thinking about how viable QML (Qt5) would be. Given that you are limited to only drawing when Qt gives you the signal, how viable would writing a game such as; a first person shooter of the quality of say... ArmA 3 (graphically wise, not taking into account content creation or budget); be in Qt/QML on a desktop platform if you used QML for only a 2D interface over top of the game (think menus and HUDs)?
To be more specific, what sort of performance loss would you get by rendering a high-fidelity FPS game like this then rendering an interface over it using QML?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to find out what's the best way to display a custom design GUI for a windows application? (I wouldn't mind cross-platform compatibility but windows is enough for now ;) )
I tried using DirectX but the problem with DX is, that you are forced to either use textured quads or render shapes other than quads or triangles with a lot of vertices... I'd prefer NOT to use bitmaps due to the limited resolution. Also a problem with DirectX is, that it doesnt run on systems without a compatible graphics card...
I don't want to use any librarys like Qt or such... I want to do it by myself, I just don't know where to start... Basicly what I'd like to have as a result is something like the GUI of NI's Traktor... (picture below) I have noticed that Traktor runs basicly everywhere (so I think it does not rely on GPU). Any suggestions?
You could do all your drawing in WM_PAINT
Use BeginPaint
Create your object
SelectObject
Draw your stuff or what ever
Then DeleteObject
You can even make a colour Transparent
If you want to draw your GUI in a different shap
Use SetLayeredWindowAttributes set the colour that you want transparent
Also look up Custom Draw
There are alot of examples out there
If you want to stick with windows, you can use GDI.
I'd prefer NOT to use bitmaps due to the limited resolution.
You can always create bitmaps dynamically. There are lots of open source libraries to help with the drawing, or you can use GDI for this again.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am interested in making a GUI-intensive strategy game with C++ and GTK+. What I would like to know is how feasible it would be to add 2D game graphics to a GTK program. Basically I would be wanting something like a game screen, with interactable 2D graphics, flanked by menus and the ability to navigate to other screens that would be GUI only.
Note that I have never used GTK before, nor have I before programed a GUI (nor graphics either).
It's certainly possible with GTK, but you have to ask yourself whether you're using the right tool for the job. Use Clutter, which is much more suited to animation and integrates with GTK; or perhaps better yet, use a game programming toolkit.
Here's an example of two non-intensive proof-of-concept games written with Clutter, with links to their source code.
It's possible. I did it with GTK and Vala some time ago. Here is a blog post I wrote about it. Basically it's very much like the games you make with Java and Swing. Just override the expose signal and create a timer for regular redraws. Here's an article on developing a 2D Snake game in PyGTK.
In pseudocode, all you do for the game infrastructure is:
start()
{
tick_timer( 1.0 / FPS );
load_all_sprites_etc();
}
tick()
{
update();
game_board.expose(); // game_board is a GTKWidget, preferably a DrawingArea
}
expose_event() // connected to game_board
{
drawing_code();
}
update()
{
game_physics();
game_logic();
}
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
as the title says, I want to add my main window a banner in the bottom of the window that shows text that runs from left to right, just like you can see in your TV when watching fox/CNN...
I'm using QT 4.5.2
Thanks a lot :)
You have many options. You could:
Create a custom widget and override QWidget::paintEvent()
Drawing your text to an image and then repainting that image as often as needed
Creating a QGraphicsScene and then moving an appropriate text item around.
QTimeline and/or QTimer will likely be useful in your implementation. The key idea is that you need to draw something at different positions at consistent intervals. If you redraw frequently enough, it will look like an animation.