Community Reputation

About Total_Titillation

I recently noticed that there is a new release of Qt. I don’t have any personal experience developing games or applications with it, but I’m looking for an API or framework that will simplify creation of GUI for my applications, written in C++ & OpenGL. At this stage I’m less worried about cross-platform, but this is something that I could benefit from in future.
I understand that Qt's real strength lies in its flexibility and cross-platform functionality. Obviously this comes with a trade-off; less control over the main loop.
I have spent a few days pouring over articles and blogs and not really seen much about Qt 5 and the rest of the information regarding Qt seems to point to it not being a great choice for 3D games. I wanted to get a discussion going as most of the information I’ve found seems to be quite dated.
So I guess my questions are:
Is Qt a viable for 3D application/games development?
For instance, if I wanted to make a 3D application that had multiple viewports with relevant GUI and a viewport rending a relatively large amount of polys (say 6 million) with some degree of 3D texturing and multiple passes / shaders. Could I use Qt?
From what I’ve read, using GUI elements of Qt seem to take a lot of CPU time. I recognise that there are optimisations you can do within your program, but Qt’s GUI is a big plus and I wouldn’t really want to use Qt if I couldn’t take advantage of it.

Ah, sorry, I missed that. Typically when someone posts an image, they are showing what they want to do, not what they don't want to do.
Still, what I said stands, as you stated. With a heightmap, there are always going to be some slopes, as long as some hexes are raised and some are lowered. The hexes "in between" will be ugly. I still stand with my assertion that the best bet would be to ditch the heightmap and just use straight meshes.
Edit: Reading the OP more closely, I'm not sure there really is a way to do what you want. It seems like you don't really have a clear vision of what you want. It might help if you somehow manually constructed a mock-up of what you have in mind, since that might help you to visualize solutions to how to implement it.
If you are wanting to have a mix of rolling height-map terrain and cliffs both, then typically this is implemented using a combination of height-map for the rolling terrain, and meshes for the cliffs that are placed on the terrain to cover the "ugly" hexes where hexes slope from high to low.
Thanks, I think you're right. I'm going to do a bit more reading, turn my application into a more flexible level editor and implement a few different approaches.
One thing I have come accross is Spinodal Decomposition on a Hexagonal Lattice. Which looks interesting and I have since found a few papers that explain plenty of interesting procedural techniques, This one in particular.

Currently I'm working on a little project just for a bit of fun. It is a C++, WinAPI application using OpenGL.
I hope it will turn into a RTS Game played on a hexagon grid and when I get the basic game engine done, I have plans to expand it further.
At the moment my application consists of a VBO that holds vertex and heightmap information. The heightmap is generated using a midpoint displacement algorithm (diamond-square).
In order to implement a hexagon grid I went with the idea explained here. It shifts down odd rows of a normal grid to allow relatively easy rendering of hexagons without too many further complications (I hope).
Allows for:
After a few days it is beginning to come together and I've added mouse picking, which is implemented by rendering each hex in the grid in a unique colour, and then sampling a given mouse position within this FBO to identify the ID of the selected cell (visible in the top right of the screenshot below).
In the next stage of my project I would like to look at generating more 'playable' terrains. To me this means that the shape of each hexagon should be more regular than those seen in the image above.
So finally coming to my point, is there:A way of smoothing or adjusting the vertices in my current method that would bring all point of a hexagon onto one plane (coplanar). A better approach to procedural terrain generation that would allow for better control of this sort of thing. A way to represent my vertex information in a different way that allows for this.To be clear, I am not trying to achieve a flat hex grid with raised edges or platforms (as seen below).
I would like all the geometry to join and lead into the next bit.
I'm hope to achieve something similar to what I have now (relatively nice undulating hills & terrain) but with more controllable plateaus. This gives me the flexibility of cording off areas (unplayable tiles) later on, where I can add higher detail meshes if needed.
Any feedback is welcome, I'm using this as a learning exercise so please - all comments welcome!

I'm currently working on a breakout type game set in space.
I want to do a range of different particle effects, the first of which is a rocket booster type trail for the player's ship.
The system I using is a modified version of the particle tutorial found on NeHe.
Most of the tutorials and examples I have looked as used addative blending for this (glBlendFunc(GL_SRC_ALPHA, GL_ONE) - I think).
However, if I use this method I get a nice result if the background is dark, but if the background colour is approaching white you can haldy see the effect.
A snapshot of the effect on a dark background.
[img]http://www.henryprescott.com/images/gamedev/booster.png[/img]
[img]http://www.henryprescott.com/images/gamedev/booster-white.png[/img]
So i guess my question is, am I using the correct method of blending? Is there a way I can achieve the same affect no matter the background colour?
I'm guessing if I was to use normal alpha blending (glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)) I would have to modify my particle system to move through a set number of colours to achieve the same affect that I have currently?
Any help would be much appreciated, thank you!

1)Everything seems to work fine, other than the skybox appearing white (I think). 2)Yes 3)Rendering the font is causing this problem. 4)I Want to know how I can 'adjust' the font rendering class to get it back to normal. I'm using Graphic Remedy it allows you to look at the textures, buffers being used in your program - It's a good profiler. How do i check glGetError? Also two other things: 1) The problem doesn't seem to be modelview matrix related. 2) Are you checking glGetError? Here is an example log from GeDEBugger(Big file sorry). [Edit] I have tried disabling the depth buffer when rendering the font and it does nothing. In previous projects the texturing was done by a shader, perhaps this is why I am having problems. What is however strange is that my GUI is still working (uses textures) so I can't be a texture related problem.

For my last few projects I have been using some of the utility files that I found whilst looking at a few demos here. Namely a file called opengl.h - mainly used to manage shaders a bit like glew and another file gl_font. gl_font is a class they use to render fonts on screen using vertex buffer objects. However, when I use this to render the framerate in my game it draws everything but the skybox correctly. For some reason the skybox is rendered white as seen here, if I do not render the font it looks like this. Here are some parts of the gl_font class that I think are most important: void GLFont::begin() { HWND hWnd = GetForegroundWindow(); RECT rcClient; GetClientRect(hWnd, &rcClient); int w = rcClient.right - rcClient.left; int h = rcClient.bottom - rcClient.top; glPushAttrib(GL_CURRENT_BIT | GL_LIGHTING_BIT); glDisable(GL_LIGHTING); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, m_fontTexture); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glOrtho(0.0f, w, h, 0.0f, -1.0f, 1.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glBindBuffer(GL_ARRAY_BUFFER, m_vertexBuffer); drawTextBegin(); } I have trie changing glPushAttrib(GL_CURRENT_BIT | GL_LIGHTING_BIT); to glPushAttrib(GL_CURRENT_BIT | GL_LIGHTING_BIT | GL_TEXTURE_BIT); and the background texture returns, but the font isn't rendered. void GLFont::end() { drawTextEnd(); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindTexture(GL_TEXTURE_2D, 0); glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glPopAttrib(); } This is an image of the depth buffer when the font is rendered and this is what is looks like when it is not. Could anyone shed some light on this problem please? Any help would be much appreciated! Thanks. [Edited by - Total_Titillation on January 6, 2011 10:02:20 AM]

I have tried my old texture manager and the textures are loading fine. What is the best way to manager textures? My previous version loads all of the textures at the start and then passes pointers when needed. [Edited by - Total_Titillation on November 7, 2010 11:19:01 AM]

OK I have done as you suggested; as you can see in the following images, I made the top right corner of the red face 0.2 taller than everything else and the top left corner of the white face 0.2 taller: Without mapping them to the sphere the edges don't meet, and when mapping them to a sphere it has the same problem. All the values of the geometry are between -1 and 1 and I'm using the following to map them: vert.x = x * sqrtf(1.0f - y * y * 0.5f - z * z * 0.5f + y * y * z * z / 3.0f); vert.y = y * sqrtf(1.0f - z * z * 0.5f - x * x * 0.5f + z * z * x * x / 3.0f); vert.z = z * sqrtf(1.0f - x * x * 0.5f - y * y * 0.5f + x * x * y * y / 3.0f); which looked like this As far as I can tell as you approach 1 or -1 the function seems to curve the geometry a lot more. But I don't see how I can deform the geometry without creating gaps, as if I add height to a face it will create graps at the edges and this will be transferred onto the sphere. Edit: I'm guessing one way would be to store the height info for use in a shader, then in the shader get the vector from the centre to the point on the spheres surface and add or take away height for each vertex?

I'm currently trying to create a procedural planet generating tool. I have started off by mapping a cube to a sphere like so: I know this has been covered quite alot but I couldn't really find anything specific. I'm using Libnoise to heightmap a cube using 3D Perlian noise. I am able to generate a seamless cubmap. I have checked this in photoshop and though I had to rotate the heightmap images to get them to fit in the net I think they are the correct orientation. I have tried getting the perlin value for the co ordinates after they have been mapped to the sphere, but they don't meet at the edges. At the moment I am creating geometry between -0.8 and +0.8 and then adding 0.2 * heightmap value(between -1 and 1). Either I am making use of the heightmap data wrongly or the heightmaps are not orientated correctly (I suspect it is a little of both). Any help would be much appreciated! Thanks, Henry. [Edited by - Total_Titillation on November 3, 2010 6:39:39 PM]

I'm trying to use glfog() to hide clipping points in my terrain editor. However, because I am playing around with matrix multiplications, the glFog() seems to be working on the wrong axis. Here is my renderFrame() method: void RenderFrame() { glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE); glViewport(0, 0, g_windowWidth, g_windowHeight); glClearColor(0.3f, 0.5f, 0.9f, 0.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMultMatrixf(&g_camera.getProjectionMatrix()[0][0]); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glMultMatrixf(&g_camera.getViewMatrix()[0][0]); RenderTerrain(); RenderText(); } Here are a few screenshots to illustrate the problem: image 1 image 2 image 3 As the camera turns to look down the Y axis, the fog takes affect. How can I fix this? Any help would be much appreciated thank you! [Edited by - Total_Titillation on August 1, 2010 3:13:08 PM]