C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.

learn more… | top users | synonyms

11
votes
0answers
395 views

Ogre PSSM Grass Receiving Shadows

So I made the switch to Ogre3D (v1.7) and using PagedGeometry. What I'm trying to do is make a simple scene with a terrain, some trees and grasses. In a nutshell, I would like to achieve this kind of ...
5
votes
0answers
88 views

Diamond-Square algorithm output is random and noisy

I have implemented a rough interpretation of the Diamond-Square algorithm in C++ to create some semi-realistic fractal terrain, but the output just seems like a random y value at each point rather ...
3
votes
0answers
69 views

Tick frame: update order problems

Sorry, it's a bit long story but I hope you can help me. First of all: I have an entity class called SceneObject. The SceneObject has components (eg. RenderableMesh, Camera) and transformation data ...
3
votes
0answers
46 views

“UObject” has no member “BeginPlay”

so I loaded up UE4 to work on a new project. I created 2 C++ classes, one for a bullet, one for a canon. Upon loading into Visual Studio 2015 I immediately get the error "UObject" has no member ...
3
votes
0answers
17 views

RWTexture3D in Compute Shader on Intel HD 4000

I'm having some weird issues running a Compute Shader with DirectX 11 on an Intel HD 4000 GPU. The goal is to write different shapes into a DXGI_FORMAT_R32_FLOAT 3D Texture with a size of ...
3
votes
0answers
58 views

Easing towards stepped value

I'm currently developing this rhythm game in lua (on top of a c++ engine) and I'm having trouble keeping a steady playhead position for the song currently playing. The playhead position that the ...
3
votes
0answers
50 views

Optimal batching for 2D objects with transparency

I have a collection of 2d objects with transparency. Each object has a depth value to determine draw order and a material. I'm trying to batch them in an optimal way to minimize draw calls. Assume ...
3
votes
0answers
58 views

How to link assimp lib to universal app

I cannot make assimp object loader work with universal app, and I got the same problem as this one: Assimp and directX12 universal apps I tried the static library approach mentioned in the answer of ...
3
votes
0answers
136 views

How do I sample a cubic shadow map in DirectX 11?

I've implemented a cubic shadow map for dealing with omni-directional light sources in my scene. By defualt it produces hard shadows Obviously a shadow map with higher resolution (currently using ...
3
votes
0answers
112 views

OpenGL Planet Generation - Simple Matrix Issue (Planet “Spins” With Mouse)

I originally asked this question on StackOverflow & was directed here by a commenter. Im currently working on a OpenGL planet rendering. I'm using the Tessellation pipeline. So far things are ...
2
votes
0answers
33 views

Moving Draw functions out of GameObjects

This is basically the issue as in Tactics for moving the render logic out of the GameObject class with the topic already discussed here and here However I'm not really satisfied with the given ...
2
votes
0answers
110 views

One big asset file or many small asset files?

I'm working on a game and I'm wondering if it is better for performance and memory usage to have one large file containing all my assets (the assets are in a custom format) with a look up table at the ...
2
votes
0answers
162 views

OpenGL Render Queue Design

I am currently designing the rendering system for a 2D game built in C++ and OpenGL, and am unsure about how to go about implementing a sorting procedure to maximise efficiency and minimize OpenGL ...
2
votes
0answers
105 views

Scene Graph: Does anybody have a real world example?

I'm trying to wrap my head around how scene graphs work, and how to apply that to my game, in the context of all my game objects, including assets, cameras, units, shaders, etc. All I can find are ...
2
votes
0answers
180 views

OpenGL textures make very low fps

I loaded some textures just one time before I go to my mainloop(glutMainLoop). I am using SDL for the texture loading. However, when I compile, my game is running at 6-10 fps. When I don't load the ...
2
votes
0answers
82 views

SDL2 SDL_CreateTexture returns pointer to existing texture

I have an initialized renderer in SDL2 that works fine. I create some textures from images using SDL_CreateTextureFromSurface and store them in a vector. Afterwards, I create an empty texture so as ...
2
votes
0answers
158 views

Creating random nebulae for scrolling space background

If you've ever seen a picture of space, you'll most likely see that there is some kind of pretty nebula in the background. I would like to find out how I could create random, semi-realistic looking ...
2
votes
0answers
69 views

How do you fix wobbling shadow edges?

I've implemented an omni-directional shadow map and I've noticed a rather unwanted behaviour on the shadows. It seems like when the angle between the occluded points and the light source is really ...
2
votes
0answers
37 views

How to increase the number of available chapters for an HL2: EP2 mod?

I created a mod for Half-Life 2: Episode 2 that has 39 chapters (or maps, here it is the same). The problem is that the game seems to see only 32: when clicking "new game", and clicking next, I count ...
2
votes
0answers
284 views

Reading Color data from UTexture2D in UE4

Here's my code: // get RenderTarget2D static ConstructorHelpers::FObjectFinder<UTextureRenderTarget2D> TargetObj(TEXT("/Game/Textures/RenderTexture")); // generate a UTexture2D CameraTexture = ...
2
votes
0answers
556 views

implementing shadows into my 2D GLSL-based lighting system

I'm writing a lighting system in OPENGL using GLSL shaders, and I'm pretty happy with the light casting I have so far, but I'm totally stuck on casting shadows. Everything I've found online on this ...
2
votes
0answers
149 views

DX 11 Specular Highlights in Deferred Renderer

I am currently implementing a deferred renderer in DX11.1. Right now I am having a problem that I can't seem to crack with specular highlights when I have multiple light sources. I keep a vector of ...
2
votes
0answers
761 views

Weird y offset when using custom frag shader (Cocos2d-x)

I'm trying to mask a sprite so I wrote a simple fragment shader that renders only the pixels that are not hidden under another texture (the mask). The problem is that it seems my texture has its ...
2
votes
0answers
243 views

Text alignment in OpenGL with FreeType2

I'm trying to implement font rendering and have got into some trouble with glyph metrics. Here's the code where I get the metrics: Glyph gl; gl.width = face->glyph->metrics.width / 64; ...
2
votes
0answers
2k views

Arcball 3D camera

I have checked multiple threads before posting, but i havent been able to figure this one out. Ok so i have been following this tutorial, but im not using glm, ive been implementing everything up ...
2
votes
0answers
312 views

Full screen shader causes performance hit

I basically want to have a shader run that can do something like toon shading, or grayscale the whole screen, or radial lighting. To do this, I create a new bitmap each time the display resizes that ...
1
vote
0answers
135 views

OpenGL ArcBall Camera

I'm currently working on a OpenGl Project and I have alot of difficulty understanding how arcball camera work. From what I have read online, all I have to do is to rotate a camera around a target and ...
1
vote
0answers
19 views

trouble getting correct transforms for multiple meshes from assimp importer

I have had excellent success in extracting almost everything i need from a collada file that i imported with assimp, however I am struggling to get the correct transforms for each mesh in the file. ...
1
vote
0answers
42 views

rendering a terrain

I'm trying to render a terrain using directx 11 and applying a heightmap to it. I load the heightmap then I copy it to a integer vector, then for each vertex position I assign the Y position of that ...
1
vote
0answers
38 views

Swept AABB vs AABB Calculation Error

I'm having issues running simple AABB vs AABB collision detection. I'm able to successfully detect collisions without checking with velocity. But for some reason my code keeps prematurely firing ...
1
vote
0answers
55 views

C++ Modern OpenGL - Calculate Vertex Normals

I'm learning modern OpenGL and i just got started so go easy on me :). Right now im trying to understand normals but im having some difficulties. On my program i have this class which i use to draw ...
1
vote
0answers
33 views

OpenGL texture not loading onto the model

I am still learning and I'd like to apologize if I don't explain something clear enough or anything like that. please forgive me :) So I am experimenting with 3D graphics for my university ...
1
vote
0answers
39 views

Drawing multiple polygons with vertex buffer object

I tried to create program in which I would draw multiplepoygons here is fragment of what I have done: GLuint VertexArrayID; exampleof drawing triangle(I have more polygons, like circle, and so ...
1
vote
0answers
19 views

Updating aiScene in ASSIMP with skeleton data

I am working on a project where I take an unrigged closed mesh, import it using ASSIMP, auto-rig it using the algorithm provided by Ilya Baran and Jovan Popovic and again export it using ASSIMP. I ...
1
vote
0answers
51 views

Implementing Browser in Unreal Engine 4.10

I am looking to add some oauth to a game I am working on. I can get the user auth to work in the browser that comes with UE4, however there is not any capability to detect changes to the currently ...
1
vote
0answers
35 views

Adjust the Camera Viewport Rect in Unreal Engine

Am new to Unreal Engine. I want to adjust the Camera Viewport Rect so that the camera will render to half of the screen. This is achieved in Unity by changing the Camera Viewport Rect property. How ...
1
vote
0answers
125 views

Recognize pattern in 3D building environment

I'm currently developing 3rd person building game (as bacheleor thesis). I need to recognize constructed patterns co I can mark corresponding structure as some building (so player can start using that ...
1
vote
0answers
41 views

Cell height with heightmap for collision detection

Hello everyone I'm programming a game with c++ and openGL. My world is generated from a heightmap (100x100 matrix with values 0-255) and now I need a function that returns the actual height based on ...
1
vote
0answers
21 views

Cannot obtain correct bone transform matrix data

I tried to obtain bone transform matrix for animation implemented with Directx11 and FBX sdk. I found this function in some web resources: fbxCluster->GetLink()->EvaluateGlobalTransform(); // ...
1
vote
0answers
65 views

2d grid vision(eye sensor) for a neural network bot?

I have a 2d grid and neural network bots living above it. What is a good way to give them vision of tiles in front of them? Below I describe my idea that I don't know how to efficiently(or ...
1
vote
0answers
75 views

Loading FBX Files into a DirectX 9 Application

I'm having an extremely difficult time trying to convert an FBX file into a format that can be used with DirectX. I've read a lot of articles on forums all over the internet and have followed ...
1
vote
0answers
92 views

Using linestrip and geomtry shader for a ribbon trail effect? Problem with vertex orders

I'm using DirectX 11 and c++ and I've been trying to make a ribbon trail renderer. I was hoping to be able to not have to build every vertex on the CPU side, just keeping the, uuh, "keyframes", or ...
1
vote
0answers
53 views

Implementing Separating Axis Theorem in 3D with C++/OpenGL

Using an Octree data structure provided to me by an acquaintance that gives min/max bounding box values, I've been able to write an algorithm that takes the global centre points, face normals and half ...
1
vote
0answers
35 views

Direct3D11: Directional Shadow Maps

I've recently implemented shadow maps on my project. However, I'd like to add a feature that allows the light direction to be dynamically changed, so that the terrain can be viewed using different ...
1
vote
0answers
45 views

State machines and map transitions

I've implemented a [basic] FSM in my game and it currently does its job very well. Recently I have come across a "problem" that I need to show a "Loading map. Please wait..." screen for as long the ...
1
vote
0answers
117 views

OpenGL RayCasting and Intersection with plane

I have been trying for a couple of days to raycast. I have a Renderable/Texture/Primitive/Whatever placed in the WORLD at 0.0f,0.0f,0.0f, and when I click the mouse I want to know at what X,Y ...
1
vote
0answers
227 views

Restart a 2D game - OpenGL, GLUT

I started learning OpenGL and GLUT by making a snake game. The problem I encountered is that when I press the "new game" in the menu, the window has to be resized so that the content of the window to ...
1
vote
0answers
18 views

How can i apply texture to cylinders created using Ogre Procedural Geometry Library?

I am using Procedural::CatmullRomSpline3 to create cylinders between 3 control points, now instead of solid cylinders i need to create dashed/ dotted cylinders so is there a direct way to do so or ...
1
vote
0answers
39 views

Application is crashing with Ogre::ItemIdentityException

I am new to OGRE and i am trying to create a 3D line using following tutorial: http://www.ogre3d.org/tikiwiki/Line+3D and application is crashing with following exception Ogre::ItemIdentityException.
1
vote
0answers
132 views

What LuaJit threading archietecture should I use?

I am in the process of designing my own Game Engine for use in a real time CRPG - think Baulder's Gate. I know most of my specifications right now, and I am currently in a planning phase. I chose Lua ...