Questions tagged [c++]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
478 views

Path finding algorithm for (x,y) coordinates in c++ [duplicate]

I am trying to code a path finding function in c++ . It should work like that, you supply the start point (x1,y1) and the end point(x2,y2) and it returns a list of points for the shortest path. ...
user2390934's user avatar
1 vote
0 answers
339 views

Issues with the camera following the spline

I am trying to make a roller coaster and currently I have created a spline class which loads a spline from a text file . So I have all the points and I have a Catmull-Rom Spline function but I have ...
mkanakis's user avatar
  • 220
1 vote
0 answers
660 views

Directx D3D9 fails to render a primitive on a RenderTarget surface

So for some reason DrawPrimitive() doesn't seem to work with my render target surface. ...
braffolk's user avatar
1 vote
0 answers
169 views

glVertexAttribPointer stride GL_INVALID_VALUE opengl 3.3

I'm experiencing issues similar to described in this question, which was never answered. Basicly when I'm calling glVertexAttribPointer with stride greater than ...
Amadeusz's user avatar
  • 129
1 vote
1 answer
142 views

Is it possible to find the child body involved in a collision of a compound shape?

I am noob at using bullet physics. I am using it for collison detection and I want to create a compound body to represent a ship. However, in my game I need to know which part of the ship was hit. ...
Delta33's user avatar
  • 11
1 vote
1 answer
277 views

D3DXLoadSurfaceFromResource failed to load bitmap image

I'm working on a small DX9 game project for learning purpose. I'm current dealing with resources manager file (*.rc) which I'm not used to (I have only worked with direct file until now). If I use <...
Hai Hoang's user avatar
  • 113
1 vote
1 answer
485 views

C++ SFML: Font is clear and the other time blurred

This is my code. ...
RayShawnOfNapalm's user avatar
1 vote
0 answers
78 views

Inconsistent read violation when using game state machine [closed]

I am getting some very inconsistent read violation errors with my FSM. It is very hard to reproduce but it always happens when the FSM is switching between states. It breaks at this block: ...
user avatar
1 vote
1 answer
751 views

Passing heightmap data to btHeightfieldTerrainShape constructor

I was searching for a couple of hours, but I didn't find final solution, after trying many ways. I'm trying to get heightmap heights data, and pass it to btHeightfieldTerrainShape. Let's say my ...
skprime's user avatar
  • 105
1 vote
0 answers
207 views

How can I build a C++11 vertex attribute class?

How would you build a flexible and efficient vertex attribute class in C++11? What I have: Vertex attribute roles for using them in shaders: ...
Bim's user avatar
  • 181
1 vote
0 answers
202 views

Isometric map (2D) - Click detection - Mouse mapping - How to implement it? [duplicate]

I'm building an isometric engine. I use TILE_SIZE * TILE_SIZE (minecraft like) tiles. (I'm using 64 * 64 tiles but I can change the number when I want) I can access for each tiles to this ...
user86831's user avatar
1 vote
0 answers
190 views

Cocos2d How do I transition to a scene

So I have mainScene and I have LogoScene, I am wondering If i can make logoscene show a logo, then transition to mainscene. here is what i have ...
sn0wfall's user avatar
1 vote
1 answer
169 views

C++ class hierarchy issue [closed]

I am taking the step of moving on from Java over to c++, I have been working on my own custom game engine in java for a while so have a good understanding of polymophism, inheritance etc. Now to the ...
user3163393's user avatar
1 vote
1 answer
271 views

Setting sound panning

I'm trying to set sound panning in my game depending on camera position, rotation and audio source position. I was able to set sound panning depending on camera position (listener), and audio source ...
skprime's user avatar
  • 105
1 vote
0 answers
139 views

Perspective correct interpolation of normal values

I'm currently writing a software rasterizer and I'm at the point where I can draw arbitrary triangles with vertex colors and perspective correct texture mapping. I do point and directional lighting by ...
lelgetrekt's user avatar
1 vote
0 answers
164 views

Texture Wrapping isn't getting applied to my object

I have a Drawable Class, a Cube Class, and a Texture class. I feel like the texture wrapping isn't being applied due to some values being passed by reference, or just being discarded. My cube just ...
Omar Martinez's user avatar
1 vote
1 answer
1k views

How to enable depth test with QOpenGLWidget? It renders black screen

Currently I am writing a small application with Qt and OpenGl and I choosed QOpenGLWidget for rendering graphics. That's how I declared my widget: ...
Denis's user avatar
  • 127
1 vote
0 answers
842 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 ...
Gabriel Roy's user avatar
1 vote
0 answers
265 views

Renderering problem with flat terrain

i was testing out my game engine last night, but stumbled across this unexpected result. Here is a picture: As it appears, it is renderering 1 triangle and not renderering the other triangles. I ...
TheThirtyFirst's user avatar
1 vote
0 answers
1k 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. ...
skimon's user avatar
  • 186
1 vote
0 answers
138 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 ...
ahmed andre's user avatar
1 vote
1 answer
253 views

How to convert Triangle/OBB test to OBB/OBB test?

I'm using the collision library OZCollide and I want to do OBB vs. OBB collision tests. The problem is, that this function doesn't seem to exist but instead there is a AABB vs. OBB and a Triangle vs. ...
Anonymous Anonymous's user avatar
1 vote
0 answers
2k 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 ...
Alian.Vesuf's user avatar
1 vote
0 answers
267 views

error: ‘struct RakNet::SocketDescriptor’ has no member named ‘socketFamily’| [closed]

when i run my client code i get this error i using code::blocks and im linux system in the tutorial that i follow the code working without any errors my includes files in the project ...
Mohamed Elsharkawey's user avatar
1 vote
0 answers
166 views

Skin Mesh Animation Shader Issue

I'm having troubles with properly animating a skin mesh from an .fbx file. I feel like the issue is in the shader, but not sure what is going on. All I know is that I am getting unexpected results ...
mythos's user avatar
  • 348
1 vote
0 answers
336 views

How to render IDirect3DSurface9 in my window?

I have some code that captures the screen and save data into a surface. g_pDirect3D_Device->GetFrontBufferData(0, pSurface); All is ok, now I want to display <...
victorio's user avatar
1 vote
1 answer
187 views

How can I avoid referring directly to the state type when transition to new states in a state machine?

I finally found a good way to implement a "stack-of-states" to manage what screen I am on. Minimal example: ...
Daniel Cordell's user avatar
1 vote
0 answers
299 views

Memory leak with glfwSetWindowTitle? [closed]

I am using GLFW for a game, and I have a function which allows me to set the window title. ...
Jacques Nel's user avatar
1 vote
1 answer
188 views

Sprite Sheet Texture not being rendered

I'm making space invaders (in OpenGL/SDL) and I've run into a problem when trying to draw the sprite for the spaceship from the spritesheet. In my entity class, I have a pointer for the sprite that ...
loremIpsum1771's user avatar
1 vote
0 answers
412 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 ...
Jorgusss's user avatar
1 vote
0 answers
223 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 ...
Nickal's user avatar
  • 111
1 vote
0 answers
527 views

Custom Scene Component Do Not Register Children

I have made a class that is derived from USceneComponent which contains 4 references for itself and two UStaticMeshComponents. Simply I am trying to make a tree structure. When I first create actor (...
oguzh4n's user avatar
  • 111
1 vote
0 answers
132 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 ...
ScazzoMatto's user avatar
1 vote
2 answers
2k views

How do i set Lua variables?

You can pretty easily read variables, but what about writing them to the lua file? Ive given it a little go, but it doesnt seem to work... ...
user avatar
1 vote
0 answers
28 views

Adding newly created objects into a vector inside the object? [closed]

Would some thing like this work? ...
CPlusPlusProgrammer's user avatar
1 vote
0 answers
643 views

Any tips on figuring out programming in Unreal Engine (without focusing mainly on blueprints, or at least a fairly even mix of the two?) [closed]

So for the past few months I've been attempting to learn Unreal Engine. Most tutorials feature blueprints which I guess makes sense as it's new and simple and their solution to artists trying to make ...
user76939's user avatar
1 vote
0 answers
470 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: ...
Oscar's user avatar
  • 261
1 vote
0 answers
264 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 ...
a_vasilkov's user avatar
1 vote
0 answers
1k 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 ...
P. Avery's user avatar
  • 575
1 vote
0 answers
937 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 ...
eShredder's user avatar
1 vote
0 answers
230 views

A reference to a Blueprint Game Mode

I am new to Unreal Engine with a very basic knowledge of working with the blueprints and code together. I am having trouble with making a reference of my Blueprint Game Mode in the code. The question ...
Abhiroop Tandon's user avatar
1 vote
0 answers
849 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 ...
JLC's user avatar
  • 11
1 vote
1 answer
933 views

Converting normalized device coordinates to world space coordinates flipping my sprites

I'm trying to convert my game's camera system to use world space coordinates rather than OpenGL's default normalized device coordinates, however in doing so my sprites are being rendered improperly as ...
BossLetsPlays's user avatar
1 vote
0 answers
178 views

C++ - what is the best library that I can use to create GUI if a textview already exists [closed]

I have a 2D char array in the textView.Basically,I need to map each char to a texture and render the whole view. Given a limited time, what is the possible best library that I can use? The header for ...
Aisen Wang's user avatar
1 vote
0 answers
908 views

How to setup a Visual Studio 2015 Android C++ project to use SFML and targets an Android device?

In Visual Studio I have installed the cross platform tools to set up a C++ project for Android and iOS such as the Android SDK, NDK and the corresponding USB drivers required to debug the program on a ...
Enchanter's user avatar
1 vote
0 answers
243 views

Error "glGenBuffers is ambiguous" in Eclipse Mars [closed]

I have called a function, which is part of OpenGL correctly. uint vboId; glGenBuffers(1, &vboId); This is definitely correct because the program successfully ...
Lucien's user avatar
  • 1,176
1 vote
0 answers
339 views

SDL-2.0 library not working with codeblocks-13.12-mingw-tdm [closed]

I started following lazyfoo's sdl 2.0 tutorials. This is the very first tutorial that explains how to set up SDL 2.0 with code::blocks - SDL 2.0 with code::blocks setup. I am doing exactly what it ...
anonymous's user avatar
  • 514
1 vote
0 answers
745 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 ...
Dan's user avatar
  • 13
1 vote
1 answer
373 views

sf::Shader not working properly on texture

I'm having trouble getting my sf::Shader to work on an sf::Texture that I've drawn myself. The vertex shader is pretty standard (I think it's just a copy of the example from SFML's page). The fragment ...
Andy M's user avatar
  • 203
1 vote
0 answers
115 views

Which game engine to use for Android TV? [closed]

I am trying to tinker a bit on Android TV game development and I am trying to figure out which would be the best suited 2D/3D game engine for this purpose or, alternatively, which are the main aspects ...
mgfernan's user avatar
  • 111

1
50 51
52
53 54
87